generated from FGA0138-MDS-Ajax/template-repository
-
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.
Front
- Loading branch information
Showing
13 changed files
with
191 additions
and
42 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
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,13 +1,20 @@ | ||
import Image from 'next/image'; | ||
import { HomeButton } from '@/components/auth/home-button'; | ||
|
||
const Navbar = () => { | ||
return ( | ||
<nav className="bg-[#005B14] p-4"> | ||
<div className="container mx-auto flex justify-center items-center"> | ||
<Image src="/logo.png" alt="Logo" width={60} height={60} /> | ||
<nav className="bg-[#005B14] p-4 relative"> | ||
<div className="container mx-auto flex justify-between items-center"> | ||
<div className="container mx-auto flex justify-center items-center"> | ||
<Image src="/logo.png" alt="Logo" width={60} height={60} /> | ||
</div> | ||
<div className="absolute right-8 top-5 bg-transparent text-black hover:bg-gray-200 text-lg font-semibold py-2 px-4 rounded-lg"> | ||
<HomeButton mode="redirect">Home</HomeButton> | ||
</div> | ||
</div> | ||
</nav> | ||
); | ||
}; | ||
|
||
export default Navbar; | ||
|
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,35 @@ | ||
"use client"; | ||
|
||
import { useRouter } from "next/navigation"; | ||
|
||
interface LoginButtonProps { | ||
children: React.ReactNode; | ||
mode?: "modal" | "redirect", | ||
asChild?: boolean; | ||
}; | ||
|
||
export const CadastroButton = ({ | ||
children, | ||
mode = "redirect", | ||
asChild | ||
}: LoginButtonProps) => { | ||
const router = useRouter(); | ||
|
||
const onClick = () => { | ||
router.push("/auth/register"); | ||
}; | ||
|
||
if (mode === "modal") { | ||
return ( | ||
<span> | ||
TODO: Implement modal | ||
</span> | ||
) | ||
} | ||
|
||
return( | ||
<span onClick={onClick} className="cursor-pointer"> | ||
{children} | ||
</span> | ||
) | ||
} |
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
"use client"; | ||
|
||
import { useRouter } from "next/navigation"; | ||
|
||
interface LoginButtonProps { | ||
children: React.ReactNode; | ||
mode?: "modal" | "redirect", | ||
asChild?: boolean; | ||
}; | ||
|
||
export const HomeButton = ({ | ||
children, | ||
mode = "redirect", | ||
asChild | ||
}: LoginButtonProps) => { | ||
const router = useRouter(); | ||
|
||
const onClick = () => { | ||
router.push("/auth/home"); | ||
}; | ||
|
||
if (mode === "modal") { | ||
return ( | ||
<span> | ||
TODO: Implement modal | ||
</span> | ||
) | ||
} | ||
|
||
return( | ||
<span onClick={onClick} className="cursor-pointer"> | ||
{children} | ||
</span> | ||
) | ||
} |
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,19 @@ | ||
"use client"; | ||
|
||
import { Match } from "@/app/models/match"; | ||
import { CardTimes } from "@/components/auth/home/card-times"; | ||
|
||
// Cria um vetor de 8 instâncias de Match | ||
const matches: Match[] = [ | ||
new Match("Libertadores", "24/06/2024 13:30", "Time A", "Time B", ["Globo", "SporTV"]), | ||
]; | ||
|
||
export const GridLiberta = () => { | ||
return ( | ||
<div className="grid grid-cols-2 gap-2"> | ||
{matches.map((match, index) => ( | ||
<CardTimes key={index} match={match} /> | ||
))} | ||
</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,19 @@ | ||
"use client"; | ||
|
||
import { Match } from "@/app/models/match"; | ||
import { CardTimes } from "@/components/auth/home/card-times"; | ||
|
||
// Cria um vetor de 8 instâncias de Match | ||
const matches: Match[] = [ | ||
new Match("Brasileirão", "24/06/2024 13:30", "Time A", "Time B", ["Globo", "SporTV"]), | ||
]; | ||
|
||
export const GridBrasileirao = () => { | ||
return ( | ||
<div className="grid grid-cols-2 gap-2 "> | ||
{matches.map((match, index) => ( | ||
<CardTimes key={index} match={match} /> | ||
))} | ||
</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
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