diff --git a/README.md b/README.md index 6f3ba40..405f2de 100644 --- a/README.md +++ b/README.md @@ -151,4 +151,4 @@ B3yond/ ├─ docker-compose.yml ├─ .env # env do backend └─ README.md -``` +``` \ No newline at end of file diff --git a/frontend/src/app/App.tsx b/frontend/src/app/App.tsx index 8cdc75f..0332700 100755 --- a/frontend/src/app/App.tsx +++ b/frontend/src/app/App.tsx @@ -28,7 +28,7 @@ const theme = createTheme({ const router = createBrowserRouter([ { - element: , // AuthProvider fica dentro do RootLayout + element: , children: [ { path: '/', element: }, { path: '/login', element: }, @@ -36,19 +36,19 @@ const router = createBrowserRouter([ { path: '/app', element: ( - - + // + // - - + // + // ), }, { path: '/profile', element: ( - + // - + // ), }, ], diff --git a/frontend/src/app/RootLayout.tsx b/frontend/src/app/RootLayout.tsx index 94fa079..3f06127 100644 --- a/frontend/src/app/RootLayout.tsx +++ b/frontend/src/app/RootLayout.tsx @@ -1,10 +1,9 @@ import { Outlet } from 'react-router-dom'; -import { AuthProvider } from '../features/auth/hooks/useAuth'; export default function RootLayout() { return ( - + // - + // ); } diff --git a/frontend/src/app/routes.tsx b/frontend/src/app/routes.tsx index 45b7831..1839d70 100644 --- a/frontend/src/app/routes.tsx +++ b/frontend/src/app/routes.tsx @@ -10,21 +10,20 @@ export const router = createBrowserRouter([ element: , children: [ { path: '/', element: }, - { path: '/login', element: }, { path: '/app', element: ( - + // - + // ), }, { path: '/profile', element: ( - + // - + // ), }, ], diff --git a/frontend/src/app/screens/AppHome.tsx b/frontend/src/app/screens/AppHome.tsx index 750849b..c6aa440 100644 --- a/frontend/src/app/screens/AppHome.tsx +++ b/frontend/src/app/screens/AppHome.tsx @@ -1,20 +1,21 @@ -import { useAuth } from '../../features/auth'; +import React from 'react'; +import { Box } from '@mui/material'; +import { Navbar } from '../../shared/components/Navbar'; +import { PageHeader } from '../../shared/components/PageHeader'; +import { InitiativesSection } from '../../shared/components/Home/InitiativesSection'; +import { IdeasSection } from '../../shared/components/Home/IdeasSection'; +import { InnovatorsSection } from '../../shared/components/Home/InnovatorsSection'; -export default function AppHome() { - const { user, signOut, refresh } = useAuth(); - if (user === undefined) return

Carregando…

; +const AppHome: React.FC = () => { return ( -
- {user ? ( - <> -

Bem-vindo, {user.nome}

-

ID: {user.id}

- - - - ) : ( -

Sem sessão. Vá para /auth.

- )} -
+ + + + + + + ); -} +}; + +export default AppHome; diff --git a/frontend/src/shared/components/Home/IdeasSection.tsx b/frontend/src/shared/components/Home/IdeasSection.tsx new file mode 100644 index 0000000..cde4622 --- /dev/null +++ b/frontend/src/shared/components/Home/IdeasSection.tsx @@ -0,0 +1,72 @@ +import React from 'react'; +import { Box, Typography, Paper, IconButton, Button } from '@mui/material'; +import ArrowBackIosNewIcon from '@mui/icons-material/ArrowBackIosNew'; +import ArrowForwardIosIcon from '@mui/icons-material/ArrowForwardIos'; + +export const IdeasSection: React.FC = () => { + const mockIdeias = Array(3).fill({ + usuario: 'Nome do usuário', + titulo: 'Título da ideia', + descricao: + 'Pequenas descrição da ideia. Pequenas descrição da ideia. Pequenas descrição da ideia.', + curtidas: 9, + comentarios: 12, + }); + + return ( + + + Ideias mais relevantes + + + As ideias mais curtidas do fórum da B3 + + + + + + + + {mockIdeias.map((ideia, i) => ( + + + {ideia.usuario} + + + {ideia.titulo} + + + {ideia.descricao} + + + {ideia.curtidas} curtidas + {ideia.comentarios} comentários + + + ))} + + + + + + + + + + + ); +}; diff --git a/frontend/src/shared/components/Home/InitiativesSection.tsx b/frontend/src/shared/components/Home/InitiativesSection.tsx new file mode 100644 index 0000000..3d2acad --- /dev/null +++ b/frontend/src/shared/components/Home/InitiativesSection.tsx @@ -0,0 +1,56 @@ +import React from 'react'; +import { Box, Typography, Button, Grid, Paper } from '@mui/material'; +import { CategoryTag } from '../CategoryTag'; + +export const InitiativesSection: React.FC = () => { + const mockIniciativas = Array(4).fill({ + usuario: 'Nome do usuário', + titulo: 'Este é o título da iniciativa', + descricao: 'Pequena descrição da ideia. Pequena descrição da ideia. Pequena descrição da ideia.', + categorias: ['Categoria 1', 'Categoria 1', 'Categoria 1'] + }); + + return ( + + + Últimas iniciativas + + + As iniciativas mais recentes em andamento + + + + {mockIniciativas.map((ini, index) => ( + + + + {ini.usuario} + + + {ini.titulo} + + + {ini.descricao} + + + + {ini.categorias.map((cat, i) => ( + + ))} + + + + ))} + + + + + + + ); +}; diff --git a/frontend/src/shared/components/Home/InnovatorsSection.tsx b/frontend/src/shared/components/Home/InnovatorsSection.tsx new file mode 100644 index 0000000..aa51687 --- /dev/null +++ b/frontend/src/shared/components/Home/InnovatorsSection.tsx @@ -0,0 +1,63 @@ +import React from 'react'; +import { Box, Typography, Paper, Avatar } from '@mui/material'; + +const cores = ['#FFFACD', '#D3D3D3', '#FFDAB9', '#ffffff', '#ffffff']; + +export const InnovatorsSection: React.FC = () => { + const mockRanking = Array(5).fill({ + nome: 'Nome do usuário', + username: '@usuario', + contribuições: 'XX', + comentários: 'XX', + ideias: 'XX', + iniciativas: 'XX', + }); + + return ( + + + Funcionários mais Inovadores + + + Os funcionários mais engajados na área de Inovação da B3 + + + {mockRanking.map((user, i) => ( + + + {i + 1} + + + {user.nome} + {user.username} + + + + + {user.contribuições} Contribuições + {user.comentários} Comentários + {user.ideias} Ideias + {user.iniciativas} Iniciativas + + + ))} + + ); +};