Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
canifa_note
Commits
5652bb76
Unverified
Commit
5652bb76
authored
Apr 14, 2023
by
Zeng1998
Committed by
GitHub
Apr 14, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: incorrect date parsing (#1527)
* fix: incorrect date parsing * fix eslint
parent
d0c40490
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
DailyReview.tsx
web/src/pages/DailyReview.tsx
+2
-6
No files found.
web/src/pages/DailyReview.tsx
View file @
5652bb76
import
dayjs
from
"dayjs"
;
import
{
last
}
from
"lodash-es"
;
import
{
useEffect
,
useRef
,
useState
}
from
"react"
;
import
toast
from
"react-hot-toast"
;
...
...
@@ -78,9 +77,6 @@ const DailyReview = () => {
toggleShowDatePicker
(
false
);
};
const
currentMonth
=
dayjs
().
format
(
"MMM"
);
const
currentDayOfWeek
=
dayjs
().
format
(
"ddd"
);
return
(
<
section
className=
"w-full max-w-2xl min-h-full flex flex-col justify-start items-center px-4 sm:px-2 sm:pt-4 pb-8 bg-zinc-100 dark:bg-zinc-800"
>
<
MobileHeader
showSearch=
{
false
}
/>
...
...
@@ -128,11 +124,11 @@ const DailyReview = () => {
<
div
className=
"mx-auto font-bold text-gray-600 dark:text-gray-300 text-center leading-6 mb-2"
>
{
currentDate
.
getFullYear
()
}
</
div
>
<
div
className=
"flex flex-col justify-center items-center m-auto w-24 h-24 shadow rounded-3xl dark:bg-zinc-800"
>
<
div
className=
"text-center w-full leading-6 text-sm text-white bg-blue-700 rounded-t-3xl"
>
{
current
Month
[
0
].
toUpperCase
()
+
currentMonth
.
substring
(
1
)
}
{
current
Date
.
toLocaleString
(
"en-US"
,
{
month
:
"short"
}
)
}
</
div
>
<
div
className=
"text-black dark:text-white text-4xl font-medium leading-12"
>
{
currentDate
.
getDate
()
}
</
div
>
<
div
className=
"dark:text-gray-300 text-center w-full leading-6 -mt-2 text-xs"
>
{
currentDa
yOfWeek
[
0
].
toUpperCase
()
+
currentDayOfWeek
.
substring
(
1
)
}
{
currentDa
te
.
toLocaleString
(
"en-US"
,
{
weekday
:
"short"
}
)
}
</
div
>
</
div
>
</
div
>
...
...
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