Skip to content

Commit

Permalink
Merge pull request #31 from FGA0138-MDS-Ajax/front
Browse files Browse the repository at this point in the history
Front
  • Loading branch information
Jose1277 authored Jul 1, 2024
2 parents 4d98ffc + 0860ccd commit ced5c32
Show file tree
Hide file tree
Showing 45 changed files with 3,242 additions and 899 deletions.
42 changes: 35 additions & 7 deletions projeto/client/app/home/canais/band/page.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,44 @@
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/band")
.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://seeklogo.com/images/B/bandeirantes-logo-51FB194B24-seeklogo.com.png?v=638249318130000000"
alt="Band"
width={100}
height={100}
width={200}
height={200}
/>
<div className="space-y-6 text-center">
<h1
Expand All @@ -23,12 +47,16 @@ export default function Home() {
font.className
)}
>
Band TV
Band
</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>
);
}

62 changes: 62 additions & 0 deletions projeto/client/app/home/canais/disney+/page.tsx
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>
);
}

46 changes: 37 additions & 9 deletions projeto/client/app/home/canais/espn/page.tsx
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>
);
}
}
41 changes: 34 additions & 7 deletions projeto/client/app/home/canais/globo/page.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,44 @@
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/globo")
.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://seeklogo.com/images/R/rede-globo-2022-logo-B63B368B27-seeklogo.com.png?v=638252803310000000"
alt="Globo"
width={100}
height={100}
width={200}
height={200}
/>
<div className="space-y-6 text-center">
<h1
Expand All @@ -25,10 +49,13 @@ export default function Home() {
>
Globo
</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>
);
}
}
62 changes: 62 additions & 0 deletions projeto/client/app/home/canais/paramount+/page.tsx
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>
);
}

2 changes: 2 additions & 0 deletions projeto/client/app/home/canais/premiere/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export default function Home() {
});
}, []);
return (
<div className="min-h-screen bg-custom-gradient">
<main className="flex flex-col items-center justify-center flex-grow">
<img
src="https://upload.wikimedia.org/wikipedia/pt/thumb/a/a2/Logo_Premiere_FC_2018.png/1200px-Logo_Premiere_FC_2018.png"
Expand All @@ -55,5 +56,6 @@ export default function Home() {
</div>
</div>
</main>
</div>
);
}
Loading

0 comments on commit ced5c32

Please sign in to comment.