-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from CS3219-AY2425S1/44-fe-page-routing
Set up page routing and base layout
- Loading branch information
Showing
13 changed files
with
99 additions
and
94 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
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,16 @@ | ||
import { NavBar } from '@/components/layout/navbar' | ||
import { inter } from '@/styles/fonts' | ||
import '@/styles/globals.css' | ||
|
||
export default function RootLayout({ | ||
children, | ||
}: Readonly<{ | ||
children: React.ReactNode | ||
}>) { | ||
return ( | ||
<> | ||
<NavBar /> | ||
<div className={`${inter.className} mx-10`}>{children}</div> | ||
</> | ||
) | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import Layout from '@/components/layout/layout' | ||
|
||
import { AppProps } from 'next/app' | ||
|
||
export default function App({ Component, pageProps }: AppProps) { | ||
return ( | ||
<Layout> | ||
<Component {...pageProps} /> | ||
</Layout> | ||
) | ||
} |
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,51 @@ | ||
import { NewSession } from '@/components/dashboard/new-session' | ||
import { ProgressCard } from '@/components/dashboard/progress-card' | ||
import { RecentSessions } from '@/components/dashboard/recent-sessions' | ||
|
||
export default function Home() { | ||
const progressData = [ | ||
{ | ||
difficulty: 'Easy', | ||
score: '10/20', | ||
progress: 50, | ||
indicatorColor: 'bg-green-700', | ||
backgroundColor: 'bg-green-500', | ||
}, | ||
{ | ||
difficulty: 'Medium', | ||
score: '15/27', | ||
progress: 60, | ||
indicatorColor: 'bg-amber-500', | ||
backgroundColor: 'bg-amber-300', | ||
}, | ||
{ | ||
difficulty: 'Hard', | ||
score: '5/19', | ||
progress: 20, | ||
indicatorColor: 'bg-red-500', | ||
backgroundColor: 'bg-red-400', | ||
}, | ||
] | ||
|
||
return ( | ||
<div className="my-4"> | ||
<h2 className="text-xl font-bold my-6">Welcome Back, Lynn</h2> | ||
<div className="flex flex-row justify-evenly -mx-2"> | ||
{progressData.map(({ difficulty, score, progress, indicatorColor, backgroundColor }, index) => ( | ||
<ProgressCard | ||
key={index} | ||
difficulty={difficulty} | ||
score={score} | ||
progress={progress} | ||
indicatorColor={indicatorColor} | ||
backgroundColor={backgroundColor} | ||
/> | ||
))} | ||
</div> | ||
<div className="flex flex-row justify-between my-4"> | ||
<NewSession /> | ||
<RecentSessions /> | ||
</div> | ||
</div> | ||
) | ||
} |
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,9 @@ | ||
import { Inter } from 'next/font/google' | ||
|
||
// define variable fonts | ||
const inter = Inter({ | ||
subsets: ['latin'], | ||
variable: '--font-inter', | ||
}) | ||
|
||
export { inter } |
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