feat: improve frontend (#387)

* fork

* fork

* chore: update style

---------

Co-authored-by: JustSong <songquanpeng@foxmail.com>
This commit is contained in:
Yolo°
2023-08-12 10:49:30 +08:00
committed by GitHub
parent be780462f1
commit c58f710227
10 changed files with 98 additions and 26 deletions

View File

@@ -14,10 +14,11 @@ const Home = () => {
const { success, message, data } = res.data;
if (success) {
let oldNotice = localStorage.getItem('notice');
if (data !== oldNotice && data !== '') {
showNotice(data);
localStorage.setItem('notice', data);
}
if (data !== oldNotice && data !== '') {
const htmlNotice = marked(data);
showNotice(htmlNotice, true);
localStorage.setItem('notice', data);
}
} else {
showError(message);
}