Skip to content

Commit 4101ced

Browse files
authored
Merge pull request #198 from raiane-oliveira/main
Autenticação, Mensagens de Erro, Componente de Modal e outras melhorias
2 parents ba4f14a + c46cbb2 commit 4101ced

File tree

92 files changed

+2375
-1912
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+2375
-1912
lines changed

package-lock.json

Lines changed: 46 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"@mui/icons-material": "^5.14.11",
2424
"@mui/material": "^5.14.11",
2525
"@radix-ui/react-checkbox": "^1.0.4",
26+
"@radix-ui/react-dialog": "^1.0.5",
2627
"@radix-ui/react-dropdown-menu": "^2.0.6",
2728
"@radix-ui/react-popover": "^1.0.7",
2829
"@radix-ui/react-scroll-area": "^1.0.5",
@@ -35,6 +36,7 @@
3536
"eslint-config-next": "13.4.12",
3637
"formik": "^2.4.2",
3738
"framer-motion": "^10.13.0",
39+
"jwt-decode": "^4.0.0",
3840
"next": "13.4.12",
3941
"phosphor-react": "^1.4.1",
4042
"react": "18.2.0",

src/assets/logos/sou-junior-black.svg

Lines changed: 4 additions & 0 deletions
Loading

src/components/atoms/CardSchedulingMentor/index.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {
55
StyledName,
66
TitleContainer,
77
ButtonsContainer,
8-
InfoButton,
98
} from './styled'
109
import Image from 'next/image'
1110
import ModalSchedMentor from '../ModalSchedMentor'
@@ -14,6 +13,7 @@ import { IMentors } from '@/services/interfaces/IUseMentorsService'
1413
import userWithoutImage from '@/assets/userDefault.png'
1514
import { Tag } from '../Tag'
1615
import { Button } from '../Button'
16+
import { Modal } from '../Modal'
1717

1818
interface MentorsProps {
1919
mentor: IMentors
@@ -34,7 +34,6 @@ export default function CardScheduling({ mentor }: MentorsProps) {
3434

3535
return (
3636
<CardContainer>
37-
<ModalSchedMentor onClose={handleModal} mentor={mentor} open={open} />
3837
<TitleContainer>
3938
<Image
4039
width={80}
@@ -60,7 +59,14 @@ export default function CardScheduling({ mentor }: MentorsProps) {
6059
) : (
6160
<Button disabled>Agendar Mentoria</Button>
6261
)}
63-
<InfoButton onClick={handleModal}>Saiba mais</InfoButton>
62+
63+
<Modal.Root open={open} onOpenChange={handleModal}>
64+
<Modal.Control asChild>
65+
<Button variant="tertiary">Saiba mais</Button>
66+
</Modal.Control>
67+
68+
<ModalSchedMentor mentor={mentor} />
69+
</Modal.Root>
6470
</ButtonsContainer>
6571
</CardContainer>
6672
)

src/components/atoms/CardSchedulingMentor/styled.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -40,24 +40,6 @@ export const StacksContainer = styled.span`
4040
flex-wrap: wrap;
4141
`
4242

43-
const BaseButton = styled.button`
44-
padding: 1rem 1.5rem;
45-
border-radius: 0.5rem;
46-
font-size: 1rem;
47-
line-height: 0.9rem;
48-
border: none;
49-
`
50-
51-
export const InfoButton = styled(BaseButton)`
52-
background-color: #ffff;
53-
color: #003986;
54-
text-align: center;
55-
56-
&:hover {
57-
color: #002c66;
58-
}
59-
`
60-
6143
export const ButtonsContainer = styled.span`
6244
display: flex;
6345
gap: 0.5rem;

0 commit comments

Comments
 (0)