Skip to content

Commit 793d366

Browse files
committed
move the footer component to the settings page
1 parent 7c18049 commit 793d366

4 files changed

Lines changed: 27 additions & 25 deletions

File tree

src/App.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { Suspense, useEffect, useLayoutEffect, useState } from 'react'
22
import 'react-contexify/dist/ReactContexify.css'
33
import 'src/assets/App.css'
4-
import { Footer, Header } from 'src/components/Layout'
4+
import { Header } from 'src/components/Layout'
55
import { BookmarksSidebar } from 'src/features/bookmarks'
66
import { MarketingBanner } from 'src/features/MarketingBanner'
77
import { setupAnalytics, setupIdentification, trackPageView } from 'src/lib/analytics'
@@ -59,8 +59,6 @@ function App() {
5959
<ScrollCardsNavigator />
6060
<AppContentLayout setShowSettings={setShowSettings} />
6161
<BookmarksSidebar showSidebar={showSideBar} onClose={() => setShowSideBar(false)} />
62-
63-
<Footer />
6462
</div>
6563
</>
6664
)

src/assets/App.css

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,16 @@ a {
6767
}
6868

6969
.AppFooter {
70-
flex: 0 0 auto;
70+
display: flex;
7171
flex-direction: row;
72-
text-align: right;
73-
margin-top: 12px;
72+
justify-content: center;
73+
align-items: center;
74+
margin-top: 24px;
7475
}
7576
.AppFooter .linkItem {
7677
font-size: 12px;
7778
color: var(--primary-text-color);
7879
text-decoration: none;
79-
text-transform: uppercase;
8080
margin-right: 12px;
8181
cursor: pointer;
8282
display: inline-flex;
@@ -92,7 +92,7 @@ a {
9292
.AppContent {
9393
position: relative;
9494
overflow-y: hidden;
95-
padding-bottom: 12px;
95+
padding: 12px 0;
9696
}
9797
.Cards {
9898
padding: 1%;
@@ -102,6 +102,7 @@ a {
102102
position: relative;
103103
overflow-y: hidden;
104104
scroll-snap-type: x mandatory;
105+
scroll-padding-left: 12px;
105106
}
106107
.HorizontalScroll {
107108
-ms-overflow-style: none;
@@ -198,7 +199,7 @@ a {
198199
border-radius: 10px;
199200
overflow: hidden;
200201
flex-direction: column;
201-
height: 78vh;
202+
height: 82vh;
202203
width: 10vw;
203204
flex: 0 0 auto;
204205
scroll-snap-align: start;
@@ -210,7 +211,7 @@ a {
210211
flex-direction: column;
211212
overflow-x: hidden;
212213
scroll-snap-type: y mandatory;
213-
height: calc(80vh - 1% - 46px);
214+
height: calc(86vh - 1% - 46px);
214215
}
215216

216217
.scrollable {
@@ -253,7 +254,6 @@ a {
253254
font-size: 16px;
254255
padding-top: 16px;
255256
padding-bottom: 8px;
256-
cursor: pointer;
257257
position: relative;
258258
}
259259

@@ -291,7 +291,7 @@ a {
291291
z-index: 1;
292292
cursor: grab;
293293
display: none;
294-
color: var(--card-action-button-color);
294+
color: #96a2ae;
295295
font-size: 24px;
296296
}
297297

@@ -489,7 +489,7 @@ a {
489489
flex-direction: row;
490490
flex-wrap: wrap;
491491
gap: 4px;
492-
margin-top: 12px;
492+
margin-top: 24px;
493493
}
494494

495495
.tag {

src/components/Layout/Footer.tsx

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
1-
import React from 'react'
2-
import {
3-
repository,
4-
supportLink,
5-
privacyPolicyLink,
6-
termsAndConditionsLink,
7-
dataSourcesLink,
8-
} from 'src/config'
9-
import { RiCodeSSlashFill } from 'react-icons/ri'
101
import { HiLightBulb } from 'react-icons/hi'
2+
import { RiCodeSSlashFill } from 'react-icons/ri'
3+
import { privacyPolicyLink, repository, supportLink, termsAndConditionsLink } from 'src/config'
114
import { trackPageView } from 'src/lib/analytics'
5+
import { getAppVersion } from 'src/utils/Os'
126

137
export const Footer = () => {
8+
const appVersion = getAppVersion()
149
return (
1510
<footer className="AppFooter">
1611
<a className="linkItem" href={supportLink} onClick={() => trackPageView('Feature Request')}>
@@ -34,9 +29,16 @@ export const Footer = () => {
3429
onClick={() => trackPageView('Privacy Policy')}>
3530
Privacy policy
3631
</a>
37-
<a className="linkItem" href={dataSourcesLink} onClick={() => trackPageView('Data Sources')}>
38-
Data sources
39-
</a>
32+
{appVersion && (
33+
<a
34+
className="linkItem"
35+
href={repository}
36+
target="_blank"
37+
rel="noreferrer"
38+
onClick={() => trackPageView('Source Code')}>
39+
v{appVersion}
40+
</a>
41+
)}
4042
</footer>
4143
)
4244
}

src/features/settings/components/SettingsModal.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import ReactModal from 'react-modal'
44
import Select, { ActionMeta, MultiValue, SingleValue } from 'react-select'
55
import Toggle from 'react-toggle'
66
import 'react-toggle/style.css'
7+
import { Footer } from 'src/components/Layout'
78
import { SUPPORTED_CARDS, SUPPORTED_SEARCH_ENGINES, supportLink } from 'src/config'
89
import { Tag, useRemoteConfigStore } from 'src/features/remoteConfig'
910
import {
@@ -259,6 +260,7 @@ export const SettingsModal = ({ showSettings, setShowSettings }: SettingsModalPr
259260
</p>
260261
</div>
261262
</div>
263+
<Footer />
262264
</div>
263265
</ReactModal>
264266
)

0 commit comments

Comments
 (0)