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
f7a44198
Commit
f7a44198
authored
Mar 23, 2022
by
email
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: update about site dialog
parent
dedea0dd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
3 deletions
+18
-3
AboutSiteDialog.tsx
web/src/components/AboutSiteDialog.tsx
+18
-3
No files found.
web/src/components/AboutSiteDialog.tsx
View file @
f7a44198
import
{
useEffect
,
useState
}
from
"react"
;
import
utils
from
"../helpers/utils"
;
import
{
showDialog
}
from
"./Dialog"
;
import
showStarHistoryDialog
from
"./StarHistoryDialog"
;
import
"../less/about-site-dialog.less"
;
...
...
@@ -5,6 +7,19 @@ import "../less/about-site-dialog.less";
interface
Props
extends
DialogProps
{}
const
AboutSiteDialog
:
React
.
FC
<
Props
>
=
({
destroy
}:
Props
)
=>
{
const
[
lastUpdatedAt
,
setLastUpdatedAt
]
=
useState
(
""
);
useEffect
(()
=>
{
try
{
fetch
(
"https://api.github.com/repos/justmemos/memos/commits/main"
).
then
(
async
(
res
)
=>
{
const
data
=
(
await
res
.
json
())
as
any
;
setLastUpdatedAt
(
utils
.
getDateTimeString
(
new
Date
(
data
.
commit
.
committer
.
date
)));
});
}
catch
(
error
)
{
setLastUpdatedAt
(
"2017/12/31"
);
}
},
[]);
const
handleCloseBtnClick
=
()
=>
{
destroy
();
};
...
...
@@ -26,15 +41,15 @@ const AboutSiteDialog: React.FC<Props> = ({ destroy }: Props) => {
<
p
>
Built with `Golang` and `React`.
</
p
>
<
br
/>
<
p
>
🏗
This project
is working in progress,
<
br
/>
and very pleasure to welcome your
{
" "
}
<
a
href=
"https://github.com/justmemos/memos/issues"
>
issues
</
a
>
and
<
a
href=
"https://github.com/justmemos/memos/pulls"
>
PR
</
a
>
.
🏗
<
a
href=
"https://github.com/justmemos/memos"
>
This project
</
a
>
is working in progress,
<
br
/>
and very pleasure to welcome your
{
" "
}
<
a
href=
"https://github.com/justmemos/memos/issues"
>
issues
</
a
>
.
</
p
>
<
br
/>
<
span
className=
"btn"
onClick=
{
showStarHistoryDialog
}
>
Star History
</
span
>
<
p
className=
"updated-time-text"
>
Last updated on
<
span
className=
"pre-text"
>
2021/12/12 14:38:15
</
span
>
🎉
Last updated on
<
span
className=
"pre-text"
>
{
lastUpdatedAt
}
</
span
>
🎉
</
p
>
</
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