diff --git a/apps/nextjs/src/components/navbar.tsx b/apps/nextjs/src/components/navbar.tsx new file mode 100644 index 00000000..1ee89bf2 --- /dev/null +++ b/apps/nextjs/src/components/navbar.tsx @@ -0,0 +1,33 @@ +import React from "react"; +import { SignInButton, useAuth, UserButton } from "@clerk/nextjs"; + +export default function NavBar() { + const { isSignedIn } = useAuth(); + + return ( +
+ {isSignedIn ? "" : } + + + +
+ ); +} diff --git a/apps/nextjs/src/pages/inviteuser.tsx b/apps/nextjs/src/pages/inviteuser.tsx new file mode 100644 index 00000000..8d2c103b --- /dev/null +++ b/apps/nextjs/src/pages/inviteuser.tsx @@ -0,0 +1,42 @@ +import React from "react"; + +import NavBar from "~/components/navbar"; + +export default function InviteUser() { + return ( +
+ +
+
Invite new user
+
e.preventDefault()} + className="flex flex-col justify-center pb-4" + > +
+ + +
+
+ + +
+ +
+
+
+ ); +} diff --git a/apps/nextjs/src/pages/posts.tsx b/apps/nextjs/src/pages/posts.tsx index 050105bc..f2c17440 100644 --- a/apps/nextjs/src/pages/posts.tsx +++ b/apps/nextjs/src/pages/posts.tsx @@ -1,6 +1,6 @@ import React, { useState } from "react"; -import { SignInButton, useAuth, UserButton } from "@clerk/nextjs"; +import NavBar from "~/components/navbar"; import { api } from "~/utils/api"; import Post from "../components/post"; @@ -18,34 +18,9 @@ function Posts() { setMyPostToggle(false); }; - const { isSignedIn } = useAuth(); - return (
-
- {isSignedIn ? "" : } - - - -
+
{myPostToggle ? (