-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
moved app to root instead of src to match modern next
- Loading branch information
1 parent
62a903a
commit 8983c4e
Showing
18 changed files
with
2,902 additions
and
968 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"extends":[ "next/core-web-vitals", "prettier" ] | ||
"extends": ["next/core-web-vitals", "prettier"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
'use client'; | ||
|
||
import Link from 'next/link'; | ||
import Image from 'next/image'; | ||
import Avatar from '../../public/temp_profile_image.png'; | ||
import { usePathname } from 'next/navigation'; | ||
|
||
export default function Navbar() { | ||
const currentPathname = usePathname(); | ||
|
||
const isActive = (pathname: string) => { | ||
return currentPathname === pathname ? ' border-b border-black' : ''; | ||
}; | ||
|
||
return ( | ||
<nav className="border-black navbar border-b" data-testid="navbar"> | ||
<div className="flex-1"> | ||
<Link | ||
href="/" | ||
className="btn btn-ghost text-xl normal-case" | ||
data-testid="home-link" | ||
> | ||
TRACK | ||
</Link> | ||
</div> | ||
<div> | ||
<ul className="borderrounded-lg flex p-4 md:mt-0 md:flex-row md:space-x-8 md:border-0 md:p-0"> | ||
<li className={isActive('/dashboard')}> | ||
<Link | ||
className="px-2" | ||
href="/dashboard" | ||
data-testid="navbar-dashboard-link" | ||
> | ||
Dashboard | ||
</Link> | ||
</li> | ||
<li className={isActive('/pathways')}> | ||
<Link className="px-2" href="/" data-testid="navbar-pathways-link"> | ||
Pathways | ||
</Link> | ||
</li> | ||
<li className={isActive('/about')}> | ||
<Link | ||
className="pl-2 pr-4" | ||
href="/" | ||
data-testid="navbar-about-link" | ||
> | ||
About | ||
</Link> | ||
</li> | ||
</ul> | ||
</div> | ||
<div className="flex-none gap-2"> | ||
<div className="dropdown dropdown-end"> | ||
<label tabIndex={0} className="avatar btn btn-circle btn-ghost"> | ||
<div className="w-10 rounded-full"> | ||
<Image | ||
src={Avatar} | ||
alt="default avatar blank face" | ||
data-testid="navbar-user-avatar" | ||
/> | ||
</div> | ||
</label> | ||
<ul | ||
tabIndex={0} | ||
className="menu dropdown-content menu-sm z-[1] mt-3 w-52 rounded-box p-2 shadow" | ||
> | ||
<li> | ||
<a className="justify-between">Profile</a> | ||
</li> | ||
<li> | ||
<a>Settings</a> | ||
</li> | ||
<li> | ||
<a>Logout</a> | ||
</li> | ||
</ul> | ||
</div> | ||
</div> | ||
</nav> | ||
); | ||
} |
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
src/app/dashboard/[pathway]/page.tsx → app/dashboard/[pathway]/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = { | ||
reactStrictMode: true, | ||
staticPageGenerationTimeout: 1000, | ||
} | ||
const nextConfig = {}; | ||
|
||
module.exports = nextConfig | ||
module.exports = nextConfig; |
Oops, something went wrong.