Skip to content

Commit

Permalink
feat: add placeholder for Goals page
Browse files Browse the repository at this point in the history
  • Loading branch information
thraizz committed Mar 3, 2024
1 parent f07c55a commit 03948dd
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
RedirectIfNotLoggedIn,
RedirectIfSignedIn,
} from "./utils/RedirectIfNotLoggedIn";
import { Goals } from "./views/Goals";

export const router = createBrowserRouter([
{
Expand All @@ -30,7 +31,7 @@ export const router = createBrowserRouter([
},
{
path: "goals",
Component: () => <h1>Goals</h1>,
Component: Goals,
},
],
},
Expand Down
9 changes: 9 additions & 0 deletions src/views/Goals.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export const Goals = () => (
<div className="flex flex-grow flex-col gap-8 bg-gray-200 py-8">
<div className="flex mx-6 flex-col items-center justify-center">
<div className="w-full p-4 bg-gray-100 rounded-md shadow-md flex flex-col gap-4">
<h2 className="text-2xl font-bold">Goals</h2>
</div>
</div>
</div>
);
14 changes: 9 additions & 5 deletions src/views/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,15 @@ export const Layout = ({ children }: PropsWithChildren) => {
</div>
<UserMenu />
</div>
<div className="flex gap-2 text-lg font-semibold [&>.active]:underline border-b-2 border-gray-200 ">
<NavLink to="/dashboard">Dashboard</NavLink>
<NavLink to="/goals">Goals</NavLink>
</div>
{isLoggedIn && <SessionPicker />}
{isLoggedIn && (
<>
<div className="flex gap-2 text-lg font-semibold [&>.active]:underline border-b-2 border-gray-200 ">
<NavLink to="/dashboard">Dashboard</NavLink>
<NavLink to="/goals">Goals</NavLink>
</div>
<SessionPicker />
</>
)}
</header>
{children}
<footer className="flex flex-row items-center justify-center h-16 bg-sky-50 px-6 py-4 gap-2">
Expand Down

0 comments on commit 03948dd

Please sign in to comment.