-
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.
- Loading branch information
Showing
17 changed files
with
186 additions
and
189 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,6 @@ | ||
{ | ||
"extends": "next/core-web-vitals" | ||
"extends":[ | ||
"next/core-web-vitals", | ||
"@rocketseat/eslint-config/next" | ||
] | ||
} |
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,6 +1,7 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = { | ||
reactStrictMode: true, | ||
}; | ||
pageExtensions: ['page.tsx', 'api.ts', 'api.tsx'], | ||
} | ||
|
||
export default nextConfig; | ||
export default nextConfig |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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,3 @@ | ||
module.exports = { | ||
plugins: [require('prettier-plugin-tailwindcss')], | ||
} |
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,42 @@ | ||
import { ArrowLeft, GithubLogo } from '@phosphor-icons/react' | ||
|
||
interface HeaderProps { | ||
title: string | ||
variante: 'home' | 'create' | ||
} | ||
|
||
export function Header({ title, variante = 'home' }: HeaderProps) { | ||
function renderActionBar() { | ||
if (variante === 'home') { | ||
return ( | ||
<div className="flex w-full"> | ||
<button className="ml-auto"> | ||
<GithubLogo className="text-title" size={32} /> | ||
</button> | ||
</div> | ||
) | ||
} | ||
|
||
return ( | ||
<div className="flex w-full justify-between "> | ||
<button> | ||
<ArrowLeft className="text-title" size={32} /> | ||
</button> | ||
<button className="font-medium text-title disabled:text-text"> | ||
done | ||
</button> | ||
</div> | ||
) | ||
} | ||
|
||
return ( | ||
<header className="flex h-52 w-full justify-center bg-white"> | ||
<div className="flex w-full max-w-app flex-col justify-between pb-9 pl-6 pr-6 pt-6"> | ||
{renderActionBar()} | ||
<div className="mt-auto max-w-80 text-2xl font-medium text-title"> | ||
{title} | ||
</div> | ||
</div> | ||
</header> | ||
) | ||
} |
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,17 @@ | ||
import Link from 'next/link' | ||
|
||
interface NavItemProps { | ||
text: string | ||
} | ||
|
||
export function NavItem({ text }: NavItemProps) { | ||
return ( | ||
<Link | ||
href="#" | ||
className="min-w-button rounded-md bg-white px-3 py-2.5 text-center shadow-sm" | ||
data-active={true} | ||
> | ||
<span className="text-xs font-medium text-text">{text}</span> | ||
</Link> | ||
) | ||
} |
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 { NavItem } from './NavItem' | ||
|
||
export function NavigationBar() { | ||
return ( | ||
<nav className="flex w-full justify-center gap-2.5 px-6 py-3"> | ||
<NavItem text="In progress" /> | ||
<NavItem text="Completed" /> | ||
<NavItem text="add list" /> | ||
</nav> | ||
) | ||
} |
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,6 @@ | ||
import '@/styles/globals.css' | ||
import type { AppProps } from 'next/app' | ||
|
||
export default function App({ Component, pageProps }: AppProps) { | ||
return <Component {...pageProps} /> | ||
} |
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,26 @@ | ||
import { Html, Head, Main, NextScript } from 'next/document' | ||
|
||
export default function Document() { | ||
return ( | ||
<Html> | ||
<Head> | ||
<link rel="preconnect" href="https://fonts.googleapis.com" /> | ||
<link | ||
rel="preconnect" | ||
href="https://fonts.gstatic.com" | ||
crossOrigin="anonymous" | ||
/> | ||
<link | ||
href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" | ||
rel="stylesheet" | ||
/> | ||
</Head> | ||
<body> | ||
<main className="h-screen bg-app-bg"> | ||
<Main /> | ||
<NextScript /> | ||
</main> | ||
</body> | ||
</Html> | ||
) | ||
} |
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,11 @@ | ||
import { Header } from '@/components/Header' | ||
import { NavigationBar } from '@/components/NavigationBar' | ||
|
||
export default function Home() { | ||
return ( | ||
<div> | ||
<Header title="What do we have to do for today?" variante="home" /> | ||
<NavigationBar /> | ||
</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 @@ | ||
export { default } from './home' |
Oops, something went wrong.