Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Rede De Mentores
Frontend
Commits
f9d09b69
Commit
f9d09b69
authored
Jun 20, 2020
by
johnnyloreano
Browse files
Adicionei os 0's quando precisa na data, tela da Mentoria
parent
f9979d7d
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/components/RedeHorarioCard/RedeHorarioCard.jsx
View file @
f9d09b69
...
...
@@ -26,6 +26,10 @@ function RedeHorarioCard({ mentoria }) {
.
sort
((
dateTimeA
,
dateTimeB
)
=>
dateTimeA
.
dayOfTheMonth
.
split
(
'
/
'
)[
1
]
-
dateTimeB
.
dayOfTheMonth
.
split
(
'
/
'
)[
1
]);
const
timeInformation
=
sortedTimes
.
map
((
dt
)
=>
{
let
dayOfTheMonth
=
dt
.
dayOfTheMonth
.
replace
(
/ /g
,
''
).
split
(
'
/
'
);
for
(
let
i
=
0
;
i
<
2
;
i
+=
1
)
if
(
dayOfTheMonth
[
i
].
length
===
1
)
dayOfTheMonth
[
i
]
=
`0
${
dayOfTheMonth
[
i
]}
`
;
dayOfTheMonth
=
dayOfTheMonth
.
join
(
'
/
'
);
// eslint-disable-next-line max-len
const
hours
=
dt
.
times
.
map
((
time
)
=>
(
<
RedeHorarioButton
...
...
@@ -40,10 +44,9 @@ function RedeHorarioCard({ mentoria }) {
/>
));
return
(
<
Details
>
<
Label
>
{
dt
.
dayOfTheMonth
}
</
Label
>
<
Label
>
{
dayOfTheMonth
}
</
Label
>
<
Hours
>
{
hours
}
</
Hours
>
...
...
@@ -82,7 +85,7 @@ function RedeHorarioCard({ mentoria }) {
</>
<
Details
style
=
{
{
borderBottom
:
'
none
'
,
marginBottom
:
'
15px
'
,
paddingTop
:
'
10px
'
}
}
>
<
Label
>
Datas
</
Label
>
<
Label
style
=
{
{
width
:
'
30%
'
}
}
>
Horários
</
Label
>
<
Label
style
=
{
{
width
:
'
30%
'
}
}
>
Horários
</
Label
>
</
Details
>
{
timeInformation
}
</
Container
>
...
...
src/components/RedeHorarioCard/StyledComponents/Hours.jsx
View file @
f9d09b69
...
...
@@ -5,7 +5,7 @@ const Hours = styled.div`
display:flex;
flex-wrap: wrap;
> button{
margin-top:
5
px;
margin-top:
7
px;
margin-bottom: 2px;
padding: 7px 30px;
font-size: 0.8em;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment