Skip to content

Commit

Permalink
Merge pull request #14 from FGA0138-MDS-Ajax/front
Browse files Browse the repository at this point in the history
Front
  • Loading branch information
Jose1277 authored Jun 27, 2024
2 parents 22bc097 + 826eb73 commit 115d2d6
Show file tree
Hide file tree
Showing 57 changed files with 1,080 additions and 442 deletions.
61 changes: 61 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions projeto/client/actions/cadastro.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
"use server";

import * as z from "zod";

import { CadastroSchema } from "@/schemas";

export const register = async (values: z.infer<typeof CadastroSchema>) => {
const validatedFields = CadastroSchema.safeParse(values);

if(!validatedFields.success) {
return { error: "Campos inválidos!" };
}

return { success: "Bem vindo!" };
};
15 changes: 15 additions & 0 deletions projeto/client/actions/login.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
"use server";

import * as z from "zod";

import { LoginSchema } from "@/schemas";

export const login = async (values: z.infer<typeof LoginSchema>) => {
const validatedFields = LoginSchema.safeParse(values);

if(!validatedFields.success) {
return { error: "Campos inválidos!" };
}

return { success: "Bem vindo!" };
};
48 changes: 0 additions & 48 deletions projeto/client/app/auth/home/page.tsx

This file was deleted.

File renamed without changes.
73 changes: 73 additions & 0 deletions projeto/client/app/home/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
"use client";

import React from 'react';
import { cn } from '@/lib/utils';
import { Match } from '@/app/models/match';
import { Bebas_Neue } from 'next/font/google';
import { GridTimes } from '@/components/auth/home/grid';
import { CardTimes } from '@/components/auth/home/card-times';


const font = Bebas_Neue({
subsets: ['latin'],
weight: ['400'],
});

const h1ClassName = "text-4xl font-semibold text-black drop-shadow-md text-center mt-8 mb-8";
const h2ClassName = "text-3xl font-semibold text-black drop-shadow-md";
const divCardsClassName = "w-full pt-4 pb-4";

// Partidas exemplos
const lib = new Match("Libertadores", "24/06/2024 13:30", "Time A", "Time B", ["Globo", "SporTV"]);
const br = new Match("Brasileirão", "24/06/2024 13:30", "Time A", "Time B", ["Globo", "SporTV"]);

export default function HomePage() {
return (
<div className="min-h-full w-full">
<div className="h-full grid grid-cols-2 divide-x-2 divide-black">

<div className="pt-2 pl-4 pr-4">
<h1 className={cn(h1ClassName,font.className
)}>Rodada X</h1>
<GridTimes />
</div>

<div className="pt-2 pl-4 pr-4">
<h1 className={cn(h1ClassName,font.className)}
>Time Usuário</h1>

<div className="grid grid-rows-3 divide-y-2 divide-black content-between">
<div className="w-full pb-4">
<h2 className={cn(
h2ClassName,font.className)}
>Brasileirão</h2>

<div className='w-432px mx-auto'>
<CardTimes match={br}/>
</div>

</div>

<div className={divCardsClassName}>
<h2 className={cn(h2ClassName,font.className)}
>Libertadores</h2>

<div className='w-432px mx-auto'>
<CardTimes match={lib}/>
</div>
</div>

<div className={divCardsClassName}>
<h2 className={cn(h2ClassName,font.className)}
>Canais de Transmissão</h2>
</div>

</div>

</div>

</div>
</div>

);
};
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import React from 'react';
import { Bebas_Neue } from 'next/font/google';
import { cn } from '@/lib/utils';
import { Button } from '@/components/ui/button';
import { LoginButton } from '@/components/auth/login-button';
import Navbar from '@/components/Navbar';
import Sidebar from '@/components/Sidebar';


const font = Bebas_Neue({
subsets: ['latin'],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import React from 'react';
import { Bebas_Neue } from 'next/font/google';
import { cn } from '@/lib/utils';
import { Button } from '@/components/ui/button';
import { LoginButton } from '@/components/auth/login-button';
import Navbar from '@/components/Navbar';
import Sidebar from '@/components/Sidebar';


const font = Bebas_Neue({
subsets: ['latin'],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import React from 'react';
import { Bebas_Neue } from 'next/font/google';
import { cn } from '@/lib/utils';
import { Button } from '@/components/ui/button';
import { LoginButton } from '@/components/auth/login-button';
import Navbar from '@/components/Navbar';
import Sidebar from '@/components/Sidebar';

const font = Bebas_Neue({
subsets: ['latin'],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import React from 'react';
import { Bebas_Neue } from 'next/font/google';
import { cn } from '@/lib/utils';
import { Button } from '@/components/ui/button';
import { LoginButton } from '@/components/auth/login-button';
import Navbar from '@/components/Navbar';
import Sidebar from '@/components/Sidebar';


const font = Bebas_Neue({
subsets: ['latin'],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import React from 'react';
import { Bebas_Neue } from 'next/font/google';
import { cn } from '@/lib/utils';
import { Button } from '@/components/ui/button';
import { LoginButton } from '@/components/auth/login-button';
import Navbar from '@/components/Navbar';
import Sidebar from '@/components/Sidebar';

const font = Bebas_Neue({
subsets: ['latin'],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import React from 'react';
import { Bebas_Neue } from 'next/font/google';
import { cn } from '@/lib/utils';
import { Button } from '@/components/ui/button';
import { LoginButton } from '@/components/auth/login-button';
import Navbar from '@/components/Navbar';
import Sidebar from '@/components/Sidebar';


const font = Bebas_Neue({
subsets: ['latin'],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import React from 'react';
import { Bebas_Neue } from 'next/font/google';
import { cn } from '@/lib/utils';
import { Button } from '@/components/ui/button';
import { LoginButton } from '@/components/auth/login-button';
import Navbar from '@/components/Navbar';
import Sidebar from '@/components/Sidebar';


const font = Bebas_Neue({
subsets: ['latin'],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import React from 'react';
import { Bebas_Neue } from 'next/font/google';
import { cn } from '@/lib/utils';
import { Button } from '@/components/ui/button';
import { LoginButton } from '@/components/auth/login-button';
import Navbar from '@/components/Navbar';
import Sidebar from '@/components/Sidebar';


const font = Bebas_Neue({
subsets: ['latin'],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import React from 'react';
import { Bebas_Neue } from 'next/font/google';
import { cn } from '@/lib/utils';
import { Button } from '@/components/ui/button';
import { LoginButton } from '@/components/auth/login-button';
import Navbar from '@/components/Navbar';
import Sidebar from '@/components/Sidebar';


const font = Bebas_Neue({
subsets: ['latin'],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import React from 'react';
import { Bebas_Neue } from 'next/font/google';
import { cn } from '@/lib/utils';
import { Button } from '@/components/ui/button';
import { LoginButton } from '@/components/auth/login-button';
import Navbar from '@/components/Navbar';
import Sidebar from '@/components/Sidebar';


const font = Bebas_Neue({
subsets: ['latin'],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import React from 'react';
import { Bebas_Neue } from 'next/font/google';
import { cn } from '@/lib/utils';
import { Button } from '@/components/ui/button';
import { LoginButton } from '@/components/auth/login-button';
import Navbar from '@/components/Navbar';
import Sidebar from '@/components/Sidebar';


const font = Bebas_Neue({
subsets: ['latin'],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import React from 'react';
import { Bebas_Neue } from 'next/font/google';
import { cn } from '@/lib/utils';
import { Button } from '@/components/ui/button';
import { LoginButton } from '@/components/auth/login-button';
import Navbar from '@/components/Navbar';
import Sidebar from '@/components/Sidebar';

const font = Bebas_Neue({
subsets: ['latin'],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import React from 'react';
import { Bebas_Neue } from 'next/font/google';
import { cn } from '@/lib/utils';
import { Button } from '@/components/ui/button';
import { LoginButton } from '@/components/auth/login-button';
import Navbar from '@/components/Navbar';
import Sidebar from '@/components/Sidebar';


const font = Bebas_Neue({
subsets: ['latin'],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import React from 'react';
import { Bebas_Neue } from 'next/font/google';
import { cn } from '@/lib/utils';
import { Button } from '@/components/ui/button';
import { LoginButton } from '@/components/auth/login-button';
import Navbar from '@/components/Navbar';
import Sidebar from '@/components/Sidebar';


const font = Bebas_Neue({
subsets: ['latin'],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import React from 'react';
import { Bebas_Neue } from 'next/font/google';
import { cn } from '@/lib/utils';
import { Button } from '@/components/ui/button';
import { LoginButton } from '@/components/auth/login-button';
import Navbar from '@/components/Navbar';
import Sidebar from '@/components/Sidebar';


const font = Bebas_Neue({
subsets: ['latin'],
Expand Down
Loading

0 comments on commit 115d2d6

Please sign in to comment.