Skip to content

Commit ce75dff

Browse files
committed
fix footer warnings
1 parent ce5ac81 commit ce75dff

1 file changed

Lines changed: 16 additions & 28 deletions

File tree

src/components/Layout/Footer.tsx

Lines changed: 16 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -11,42 +11,30 @@ import { HiLightBulb } from 'react-icons/hi'
1111
import { trackPageView } from 'src/lib/analytics'
1212

1313
export const Footer = () => {
14-
const onSourceCodeClick = () => {
15-
trackPageView('Source Code')
16-
window.open(repository, '_blank')
17-
}
18-
19-
const onNewFeatureRequest = () => {
20-
trackPageView('Feature Request')
21-
window.open(supportLink)
22-
}
23-
24-
const onPrivacyPolicyClick = () => {
25-
trackPageView('Privacy Policy')
26-
window.open(privacyPolicyLink)
27-
}
28-
const onTermsClick = () => {
29-
trackPageView('Terms And Conditions')
30-
window.open(termsAndConditionsLink)
31-
}
32-
const onDataSourcesClick = () => {
33-
trackPageView('Data Sources')
34-
window.open(dataSourcesLink)
35-
}
36-
3714
return (
3815
<footer className="AppFooter">
39-
<a className="linkItem" href="#" onClick={() => onNewFeatureRequest()}>
16+
<a className="linkItem" href={supportLink} onClick={() => trackPageView('Feature Request')}>
4017
<HiLightBulb className="linkItemIcon" /> New Feature?
4118
</a>
42-
<a className="linkItem" href="#" onClick={() => onSourceCodeClick()}>
19+
<a
20+
className="linkItem"
21+
href={repository}
22+
target="_blank"
23+
onClick={() => trackPageView('Source Code')}
24+
rel="noreferrer">
4325
<RiCodeSSlashFill className="linkItemIcon" /> Source code
4426
</a>
45-
<a className="linkItem" href="#" onClick={() => onTermsClick()}>{`Terms & conditions`}</a>
46-
<a className="linkItem" href="#" onClick={() => onPrivacyPolicyClick()}>
27+
<a
28+
className="linkItem"
29+
href={termsAndConditionsLink}
30+
onClick={() => trackPageView('Terms And Conditions')}>{`Terms & conditions`}</a>
31+
<a
32+
className="linkItem"
33+
href={privacyPolicyLink}
34+
onClick={() => trackPageView('Privacy Policy')}>
4735
Privacy policy
4836
</a>
49-
<a className="linkItem" href="#" onClick={() => onDataSourcesClick()}>
37+
<a className="linkItem" href={dataSourcesLink} onClick={() => trackPageView('Data Sources')}>
5038
Data sources
5139
</a>
5240
</footer>

0 commit comments

Comments
 (0)