Skip to content

Commit 965c48f

Browse files
committed
Merge branch 'master' into fix/colorsSmart
2 parents 0261abc + 15e1441 commit 965c48f

File tree

6 files changed

+72
-84
lines changed

6 files changed

+72
-84
lines changed

src/components/forms/PersonalData.form.tsx

Lines changed: 5 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,7 @@ const validationSchema = () => Yup.object().shape({
2323
.string()
2424
.email("E-mail inválido")
2525
.required("Preenchimento do email obrigatório"),
26-
githubUser: Yup.string().required("Preenchimento do usuário Github obrigatório"),
27-
cpf: Yup
28-
.string()
29-
.matches(/^\d{3}\.\d{3}\.\d{3}-\d{2}$/, "CPF inválido")
30-
.required("Preenchimento do CPF obrigatório"),
26+
githubUser: Yup.string().required("Preenchimento do usuário Github obrigatório")
3127
})
3228

3329
const useStyles = makeStyles((theme: Theme) => ({
@@ -45,23 +41,6 @@ const useStyles = makeStyles((theme: Theme) => ({
4541
}
4642
}))
4743

48-
const formatCPF = (value: string): string => {
49-
// Remove tudo que não é dígito
50-
const numbers = value.replace(/\D/g, '')
51-
52-
// Aplica a máscara: 000.000.000-00
53-
if (numbers.length <= 3) {
54-
return numbers
55-
} else if (numbers.length <= 6) {
56-
return numbers.replace(/(\d{3})(\d{1,3})/, '$1.$2')
57-
} else if (numbers.length <= 9) {
58-
return numbers.replace(/(\d{3})(\d{3})(\d{1,3})/, '$1.$2.$3')
59-
} else {
60-
return numbers.replace(/(\d{3})(\d{3})(\d{3})(\d{1,2})/, '$1.$2.$3-$4')
61-
}
62-
}
63-
64-
6544
const PersonalDataForm = (props: PersonalDataFormProps) => {
6645
const classes = useStyles();
6746
const { user, onSuccess, showOnlyEmailField = false } = props
@@ -72,9 +51,7 @@ const PersonalDataForm = (props: PersonalDataFormProps) => {
7251
name: user.name,
7352
email: user.email,
7453
githubUser: user.githubUser,
75-
githubID: user.githubID,
76-
linkedin: user.linkedin,
77-
cpf: user.cpf,
54+
githubID: user.githubID
7855
}
7956

8057
const onSubmit = async (values: any) => {
@@ -94,11 +71,6 @@ const PersonalDataForm = (props: PersonalDataFormProps) => {
9471

9572
const formik = useFormik({ initialValues, validationSchema, onSubmit });
9673

97-
const handleCPFChange = (event: React.ChangeEvent<HTMLInputElement>) => {
98-
const formatted = formatCPF(event.target.value)
99-
formik.setFieldValue('cpf', formatted)
100-
}
101-
10274
return (
10375
<React.Fragment>
10476
<form onSubmit={formik.handleSubmit}>
@@ -110,7 +82,7 @@ const PersonalDataForm = (props: PersonalDataFormProps) => {
11082
>
11183
{!showOnlyEmailField && <>
11284
<HeaderTitle title={"Minha Área"} description='Dados pessoais'/>
113-
<Grid item xs={12} md={4}>
85+
<Grid item xs={12} md={6}>
11486
<HacktoberfestTextInput
11587
fullWidth
11688
onChange={formik.handleChange}
@@ -128,7 +100,7 @@ const PersonalDataForm = (props: PersonalDataFormProps) => {
128100
}}
129101
/>
130102
</Grid>
131-
<Grid item xs={12} md={4}>
103+
<Grid item xs={12} md={6}>
132104
<HacktoberfestTextInput
133105
color="primary"
134106
value={formik.values.githubID}
@@ -140,21 +112,9 @@ const PersonalDataForm = (props: PersonalDataFormProps) => {
140112
}}
141113
/>
142114
</Grid>
143-
<Grid item xs={12} md={4}>
144-
<HacktoberfestTextInput
145-
color="primary"
146-
value={formik.values.linkedin}
147-
fullWidth
148-
variant="outlined"
149-
label="LinkedIn"
150-
InputProps={{
151-
disabled: true
152-
}}
153-
/>
154-
</Grid>
155115
</>
156116
}
157-
<Grid item xs={12} md={7}>
117+
<Grid item xs={12}>
158118
<HacktoberfestTextInput
159119
onChange={formik.handleChange}
160120
name="email"
@@ -171,19 +131,6 @@ const PersonalDataForm = (props: PersonalDataFormProps) => {
171131
}}
172132
/>
173133
</Grid>
174-
<Grid item xs={12} md={5}>
175-
<HacktoberfestTextInput
176-
onChange={handleCPFChange}
177-
name="cpf"
178-
value={formik.values.cpf}
179-
fullWidth
180-
variant="outlined"
181-
error={formik.touched.cpf && Boolean(formik.errors.cpf)}
182-
helperText={formik.touched.cpf && formik.errors.cpf}
183-
label="CPF"
184-
inputProps={{ maxLength: 14 }}
185-
/>
186-
</Grid>
187134
<Grid container alignItems="flex-start" justifyContent="flex-start" item xs={12} lg={12}>
188135
<LoadingButton fullWidth isLoading={isLoading}>
189136
SALVAR

src/components/hero/HeroDesktop.tsx

Lines changed: 49 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import { Grid, Typography, Button, Box } from "@material-ui/core"
44
import { Image } from "@components/image"
55
import { makeStyles, Theme } from "@material-ui/core/styles"
66
import { Edition, UserProps } from "@services/user"
7-
import Lottie from "react-lottie"
8-
import animationData from "../../themes/images/2023/drone.json"
97

108
const useStyles = makeStyles((theme: Theme) => ({
119
wrapper: {
@@ -15,6 +13,9 @@ const useStyles = makeStyles((theme: Theme) => ({
1513
width: "80%",
1614
height: "180px",
1715
},
16+
textColor: {
17+
color: "#939598",
18+
},
1819
button: {
1920
width: "320px",
2021
height: "44px",
@@ -46,7 +47,8 @@ const useStyles = makeStyles((theme: Theme) => ({
4647
background: "linear-gradient(90deg, #FFBD09 0%, #FF111E 100%)",
4748
mask: "linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)",
4849
maskComposite: "xor",
49-
WebkitMask: "linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)",
50+
WebkitMask:
51+
"linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)",
5052
WebkitMaskComposite: "xor",
5153
zIndex: -1,
5254
},
@@ -93,14 +95,13 @@ const useStyles = makeStyles((theme: Theme) => ({
9395
message: {
9496
width: "164px",
9597
height: "120px",
96-
9798
},
9899
gridItem: {
99100
height: "100%",
100101
display: "flex",
101102
flexDirection: "column",
102103
alignItems: "center",
103-
textAlign: "center"
104+
textAlign: "center",
104105
},
105106
gridMessage: {
106107
display: "flex",
@@ -214,11 +215,16 @@ const LoggedView = (user: UserProps) => {
214215
>
215216
<Spacing smart={{ margin: "0px 0px 5px" }}>
216217
<Grid item>
217-
<Typography align="left" component="p">
218-
{" "}
218+
<Typography
219+
align="left"
220+
component="p"
221+
className={classes.textColor}
222+
>
219223
Olá <b>@{user.githubUser}!</b>
220224
</Typography>
221-
<TextComponent />
225+
<div className={classes.textColor}>
226+
<TextComponent />
227+
</div>
222228
</Grid>
223229
</Spacing>
224230
<Grid item>
@@ -250,8 +256,15 @@ const LoggedView = (user: UserProps) => {
250256

251257
const ProgressMessage = (props: any) => (
252258
<div style={{ maxWidth: 400 }}>
259+
<<<<<<< HEAD
253260
<Typography align="left" component="p" color="textPrimary">
254261
{" "}
262+
||||||| 3c665ed
263+
<Typography align="left" component="p">
264+
{" "}
265+
=======
266+
<Typography align="left" component="p">
267+
>>>>>>> master
255268
Você tem <b> {props.opened} pull requests enviados</b> e{" "}
256269
<b>{props.merged} aceito(s) </b>{" "}
257270
</Typography>
@@ -316,38 +329,49 @@ const DesktopView = (props: DesktopViewProps) => {
316329
variant="h1"
317330
align="center"
318331
style={{
319-
fontSize: '24px',
332+
fontSize: "24px",
320333
fontWeight: 700,
321-
fontStyle: 'normal',
322-
lineHeight: '31.47px',
323-
letterSpacing: '6%',
324-
textAlign: 'center',
334+
fontStyle: "normal",
335+
lineHeight: "31.47px",
336+
letterSpacing: "6%",
337+
textAlign: "center",
325338
marginTop: "1.2vw",
326-
color: "#000000"
339+
color: "#000000",
327340
}}
328341
component="h2"
329342
>
330343
01.10.2025 — 31.10.2025
331344
</Typography>
332345
<Typography
333346
style={{
334-
fontSize: '18px',
347+
fontSize: "18px",
335348
fontWeight: 400,
336-
fontStyle: 'normal',
337-
letterSpacing: '0%',
338-
color: '#939598',
339-
textAlign: 'center',
349+
fontStyle: "normal",
350+
letterSpacing: "0%",
351+
color: "#939598",
352+
textAlign: "center",
340353
marginTop: "1vw",
341-
width: "446px"
354+
width: "446px",
342355
}}
343-
align="center">
344-
O Hacktober está aberto a todos os que desejam trilhar o caminho da colaboração e deixar sua marca nos projetos open source.
356+
align="center"
357+
>
358+
O Hacktober está aberto a todos os que desejam trilhar o caminho da
359+
colaboração e deixar sua marca nos projetos open source.
345360
</Typography>
346361
{props.user ? <LoggedView {...props.user} /> : <UnloggedView />}
347362
</Grid>
348-
<Grid item sm={4} className={classes.gridItem} >
349-
<Box display="flex" alignItems="center" justifyContent="center" height="100%" paddingLeft={"440px"}>
350-
<Image className={classes.character} src={`2025/ilustracao-home.svg`} />
363+
<Grid item sm={4} className={classes.gridItem}>
364+
<Box
365+
display="flex"
366+
alignItems="center"
367+
justifyContent="center"
368+
height="100%"
369+
paddingLeft={"440px"}
370+
>
371+
<Image
372+
className={classes.character}
373+
src={`2025/ilustracao-home.svg`}
374+
/>
351375
</Box>
352376
</Grid>
353377
<Grid item sm={4} className={classes.gridMessage}>

src/components/navigation/Navigation.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ const NavigationItems = (props: NavigationItemsProps) => {
126126
{props.items.map((def: NavigationItemProps) => (
127127
<NavigationItem key={def.label} {...def} />
128128
))}
129-
{isLogged && <NavigationItem label="minha área" link="/minha-area" />}
129+
{isLogged && <NavigationItem label="Minha Área" link="/minha-area" />}
130130
</ul>
131131
)
132132
}

src/components/user-info-alert/UserInfoAlert.tsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,18 @@ const COOKIE_NAME = "ACCEPT_GLOBO_HACKTOBERFEST_LGPD"
1212
const COOKIE_EXPIRATION = 330
1313

1414
const useStyles = makeStyles((theme: Theme) => ({
15+
snackbarRoot: {
16+
[theme.breakpoints.down("lg")]: {
17+
left: "8px",
18+
right: "8px",
19+
display: "flex",
20+
zIndex: 1400,
21+
position: "fixed",
22+
alignItems: "center",
23+
justifyContent: "center",
24+
transform: "none",
25+
},
26+
},
1527
snackbar: {
1628
backgroundColor: theme.palette.background.paper,
1729
color: '#000',
@@ -32,6 +44,9 @@ const useStyles = makeStyles((theme: Theme) => ({
3244
justifyContent: "space-between",
3345
width: "100%",
3446
gap: "8px",
47+
[theme.breakpoints.down("sm")]: {
48+
flexFlow: "column",
49+
},
3550
},
3651
message: {
3752
flex: 1,
@@ -105,6 +120,7 @@ const UserInfoAlert = () => {
105120
return (
106121
!hideSnackbar ? (
107122
<Snackbar
123+
className={classes.snackbarRoot}
108124
anchorOrigin={{ vertical: "bottom", horizontal: "center" }}
109125
open
110126
>

src/pages/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ const useStyles = makeStyles((theme: Theme) => ({
108108
},
109109
backgroundImage: {
110110
position: "absolute",
111+
maxWidth: "100vw",
111112
zIndex: 1,
112113
[theme.breakpoints.down("sm")]: {
113114
width: "240%",

static/2025.png

85.5 KB
Loading

0 commit comments

Comments
 (0)