Skip to content

Commit

Permalink
Update Footer (#1331)
Browse files Browse the repository at this point in the history
* Add link to “terms” page on the footer

* Add Discord to universal footer

* Lint fix
  • Loading branch information
aaronmgdr authored and tkporter committed Oct 24, 2019
1 parent faafaa9 commit de10a42
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/web/src/shared/Button.3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ type PrimaryProps = {

type InlineProps = {
kind: BTN.INLINE
style?: TextStyle
} & AllButtonProps

type NavProps = {
Expand Down
19 changes: 18 additions & 1 deletion packages/web/src/shared/Footer.3.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import Link from 'next/link'
import * as React from 'react'
import { StyleSheet, Text, View } from 'react-native'
import { I18nProps, NameSpaces, withNamespaces } from 'src/i18n'
import { I18nProps, NameSpaces, Trans, withNamespaces } from 'src/i18n'
import Discord from 'src/icons/Discord'
import Discourse from 'src/icons/Discourse'
import MediumLogo from 'src/icons/MediumLogo'
import Octocat from 'src/icons/Octocat'
Expand Down Expand Up @@ -70,6 +71,11 @@ const Social = React.memo(function _Social() {
<Discourse color={colors.dark} size={height} />
</a>
</Link>
<Link href={CeloLinks.discord}>
<a>
<Discord color={colors.dark} size={height} />
</a>
</Link>
</View>
</Responsive>
)
Expand Down Expand Up @@ -132,13 +138,24 @@ const Details = React.memo(function _Details({ t }: { t: I18nProps['t'] }) {
<Responsive medium={[textStyles.left, styles.detailsText, fonts.legal]}>
<Text style={[textStyles.center, styles.detailsText, fonts.legal]}>{t('disclaimer')}</Text>
</Responsive>
<Responsive medium={[textStyles.left, styles.detailsText, fonts.legal]}>
<Text style={[textStyles.center, styles.detailsText, fonts.legal]}>
<Trans i18nKey={'footerReadMoreTerms'}>
<LinkButon>Terms of Service</LinkButon>
</Trans>
</Text>
</Responsive>
<Responsive medium={[textStyles.left, fonts.legal]}>
<Text style={[textStyles.center, fonts.legal]}>{t('copyRight')}</Text>
</Responsive>
</View>
)
})

function LinkButon({ children }) {
return <Button kind={BTN.INLINE} href={menu.TERMS.link} text={children} style={fonts.legal} />
}

const styles = StyleSheet.create({
social: {
flexDirection: 'row',
Expand Down
4 changes: 4 additions & 0 deletions packages/web/src/shared/menu-items.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ export const menuItems = {
name: 'Privacy Policy',
link: '/privacy',
},
TERMS: {
name: 'Terms',
link: '/terms',
},
MEDIUM: {
name: 'Medium',
link: 'https://medium.com/@celo.org',
Expand Down
3 changes: 2 additions & 1 deletion packages/web/static/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@
"cookiesAgree": "agree",
"cookiesDisagree": "disagree",
"trueGold": ["真金不怕火煉", "True gold fears no fire"],
"copyRight": "Designed & Built by C Labs, © Celo 2019"
"copyRight": "Designed & Built by C Labs, © Celo 2019",
"footerReadMoreTerms": "Read more in <0>Celo Terms of Service</0>"
}

0 comments on commit de10a42

Please sign in to comment.