Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
99185dfa
authored
May 18, 2025
by
Apple\Apple
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🔖
chore: Remove useless codes in `Footer.js`
parent
fc361c1c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
17 deletions
+4
-17
web/src/components/Footer.js
+4
-17
No files found.
web/src/components/Footer.js
View file @
99185dfa
import
React
,
{
useEffect
,
useState
,
use
Context
}
from
'react'
;
import
React
,
{
useEffect
,
useState
,
use
Memo
}
from
'react'
;
import
{
useTranslation
}
from
'react-i18next'
;
import
{
getFooterHTML
,
getSystemName
}
from
'../helpers'
;
import
{
Layout
,
Tooltip
}
from
'@douyinfe/semi-ui'
;
import
{
StyleContext
}
from
'../context/Style/index.js'
;
import
{
getFooterHTML
}
from
'../helpers'
;
const
FooterBar
=
()
=>
{
const
{
t
}
=
useTranslation
();
const
systemName
=
getSystemName
();
const
[
footer
,
setFooter
]
=
useState
(
getFooterHTML
());
const
[
styleState
]
=
useContext
(
StyleContext
);
let
remainCheckTimes
=
5
;
const
loadFooter
=
()
=>
{
let
footer_html
=
localStorage
.
getItem
(
'footer_html'
);
...
...
@@ -18,7 +13,7 @@ const FooterBar = () => {
}
};
const
defaultFooter
=
(
const
defaultFooter
=
useMemo
(()
=>
(
<
div
className
=
'custom-footer'
>
<
a
href
=
'https://github.com/Calcium-Ion/new-api'
...
...
@@ -40,18 +35,10 @@ const FooterBar = () => {
One
API
<
/a
>
<
/div
>
);
)
,
[
t
])
;
useEffect
(()
=>
{
const
timer
=
setInterval
(()
=>
{
if
(
remainCheckTimes
<=
0
)
{
clearInterval
(
timer
);
return
;
}
remainCheckTimes
--
;
loadFooter
();
},
200
);
return
()
=>
clearTimeout
(
timer
);
},
[]);
return
(
...
...
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