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.
Merge pull request #31 from FGA0138-MDS-Ajax/front
Front
- Loading branch information
Showing
45 changed files
with
3,242 additions
and
899 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
'use client'; | ||
|
||
import React, {useEffect, useState} from "react"; | ||
import { Bebas_Neue } from "next/font/google"; | ||
import { cn } from "@/lib/utils"; | ||
import {CardTimes} from "@/components/home/card-times"; | ||
import {Match} from "@/models/match"; | ||
|
||
const font = Bebas_Neue({ | ||
subsets: ["latin"], | ||
weight: ["400"], | ||
}); | ||
|
||
export default function Home() { | ||
const [matches, setMatches] = useState<Match[]>([]); | ||
|
||
useEffect(() => { | ||
fetch("http://localhost:8000/api/v2/games/disney+") | ||
.then(response => response.json()) | ||
.then(data => { | ||
const matchInstances = data.map((matchData: any) => new Match( | ||
matchData.campeonato, | ||
matchData.data_hora, | ||
matchData.time_1, | ||
matchData.time_2, | ||
matchData.channels | ||
)); | ||
setMatches(matchInstances); | ||
}) | ||
.catch(error => { | ||
console.error('Erro ao buscar os dados:', error); | ||
}); | ||
}, []); | ||
return ( | ||
<div className="min-h-screen bg-custom-gradient"> | ||
<main className="flex flex-col items-center justify-center flex-grow"> | ||
<img | ||
src="projeto\client\public\disney.png" | ||
alt="Disney+" | ||
width={200} | ||
height={200} | ||
/> | ||
<div className="space-y-6 text-center"> | ||
<h1 | ||
className={cn( | ||
"text-6xl font-semibold text-white drop-shadow-md", | ||
font.className | ||
)} | ||
> | ||
Disney+ | ||
</h1> | ||
<div className="grid grid-cols-2 gap-2"> | ||
{matches.map((match, index) => ( | ||
<CardTimes key={index} match={match} /> | ||
))} | ||
</div> | ||
</div> | ||
</main> | ||
</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 |
---|---|---|
@@ -1,34 +1,62 @@ | ||
import React from "react"; | ||
'use client'; | ||
|
||
import React, {useEffect, useState} from "react"; | ||
import { Bebas_Neue } from "next/font/google"; | ||
import { cn } from "@/lib/utils"; | ||
import {CardTimes} from "@/components/home/card-times"; | ||
import {Match} from "@/models/match"; | ||
|
||
const font = Bebas_Neue({ | ||
subsets: ["latin"], | ||
weight: ["400"], | ||
}); | ||
|
||
export default function Home() { | ||
const [matches, setMatches] = useState<Match[]>([]); | ||
|
||
useEffect(() => { | ||
fetch("http://localhost:8000/api/v2/games/espn") | ||
.then(response => response.json()) | ||
.then(data => { | ||
const matchInstances = data.map((matchData: any) => new Match( | ||
matchData.campeonato, | ||
matchData.data_hora, | ||
matchData.time_1, | ||
matchData.time_2, | ||
matchData.channels | ||
)); | ||
setMatches(matchInstances); | ||
}) | ||
.catch(error => { | ||
console.error('Erro ao buscar os dados:', error); | ||
}); | ||
}, []); | ||
return ( | ||
<div className="min-h-screen bg-custom-gradient"> | ||
<main className="flex flex-col items-center justify-center flex-grow"> | ||
<img | ||
src="https://cdn-icons-png.flaticon.com/128/16574/16574426.png" | ||
alt="ESPN" | ||
width={100} | ||
height={100} | ||
alt="Espn" | ||
width={200} | ||
height={200} | ||
/> | ||
|
||
<div className="space-y-6 text-center"> | ||
<h1 | ||
className={cn( | ||
"text-6xl font-semibold text-white drop-shadow-md", | ||
font.className | ||
)} | ||
> | ||
ESPN | ||
Espn | ||
</h1> | ||
<p className="text-lg text-black"> | ||
Os próximos jogos transmitidos por essa emissora | ||
</p> | ||
<div className="grid grid-cols-2 gap-2"> | ||
{matches.map((match, index) => ( | ||
<CardTimes key={index} match={match} /> | ||
))} | ||
</div> | ||
</div> | ||
</main> | ||
</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
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,62 @@ | ||
'use client'; | ||
|
||
import React, {useEffect, useState} from "react"; | ||
import { Bebas_Neue } from "next/font/google"; | ||
import { cn } from "@/lib/utils"; | ||
import {CardTimes} from "@/components/home/card-times"; | ||
import {Match} from "@/models/match"; | ||
|
||
const font = Bebas_Neue({ | ||
subsets: ["latin"], | ||
weight: ["400"], | ||
}); | ||
|
||
export default function Home() { | ||
const [matches, setMatches] = useState<Match[]>([]); | ||
|
||
useEffect(() => { | ||
fetch("http://localhost:8000/api/v2/games/paramount+") | ||
.then(response => response.json()) | ||
.then(data => { | ||
const matchInstances = data.map((matchData: any) => new Match( | ||
matchData.campeonato, | ||
matchData.data_hora, | ||
matchData.time_1, | ||
matchData.time_2, | ||
matchData.channels | ||
)); | ||
setMatches(matchInstances); | ||
}) | ||
.catch(error => { | ||
console.error('Erro ao buscar os dados:', error); | ||
}); | ||
}, []); | ||
return ( | ||
<div className="min-h-screen bg-custom-gradient"> | ||
<main className="flex flex-col items-center justify-center flex-grow"> | ||
<img | ||
src="projeto\client\public\paramount+.png" | ||
alt="paramount+" | ||
width={200} | ||
height={200} | ||
/> | ||
<div className="space-y-6 text-center"> | ||
<h1 | ||
className={cn( | ||
"text-6xl font-semibold text-white drop-shadow-md", | ||
font.className | ||
)} | ||
> | ||
Paramount+ | ||
</h1> | ||
<div className="grid grid-cols-2 gap-2"> | ||
{matches.map((match, index) => ( | ||
<CardTimes key={index} match={match} /> | ||
))} | ||
</div> | ||
</div> | ||
</main> | ||
</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
Oops, something went wrong.