From e94559c4f628ebe5843d5b11b56bd62ddb3bd040 Mon Sep 17 00:00:00 2001 From: Ben Grant Date: Sat, 19 Jun 2021 10:32:09 +1000 Subject: [PATCH] Hide extension buttons in android app --- crabfit-frontend/src/pages/Home/Home.tsx | 60 ++++++++++--------- .../src/pages/Privacy/privacyStyle.ts | 2 + 2 files changed, 34 insertions(+), 28 deletions(-) diff --git a/crabfit-frontend/src/pages/Home/Home.tsx b/crabfit-frontend/src/pages/Home/Home.tsx index c434b9e..8a6bd55 100644 --- a/crabfit-frontend/src/pages/Home/Home.tsx +++ b/crabfit-frontend/src/pages/Home/Home.tsx @@ -39,6 +39,7 @@ import { import api from 'services'; import { detect_browser } from 'utils'; +import { useTWAStore } from 'stores'; import logo from 'res/logo.svg'; import timezones from 'res/timezones.json'; @@ -63,6 +64,7 @@ const Home = ({ offline }) => { const [browser, setBrowser] = useState(undefined); const { push } = useHistory(); const { t } = useTranslation(['common', 'home']); + const isTWA = useTWAStore(state => state.TWA); useEffect(() => { const fetch = async () => { @@ -231,38 +233,40 @@ const Home = ({ offline }) => {

Crab Fit helps you fit your event around everyone's schedules. Simply create an event above and send the link to everyone that is participating. Results update live and you will be able to see a heat-map of when everyone is free.
Learn more about how to Crab Fit.

- - {['chrome', 'firefox', 'safari'].includes(browser) && ( + {isTWA !== true && ( + + {['chrome', 'firefox', 'safari'].includes(browser) && ( + + )} - )} - - + >{t('home:about.android_app')} + + )}

Created by Ben Grant, Crab Fit is the modern-day solution to your group event planning debates.

The code for Crab Fit is open source, if you find any issues or want to contribute, you can visit the repository. By using Crab Fit you agree to the privacy policy.

{t('home:about.content.p6')}

diff --git a/crabfit-frontend/src/pages/Privacy/privacyStyle.ts b/crabfit-frontend/src/pages/Privacy/privacyStyle.ts index 7597810..74746a4 100644 --- a/crabfit-frontend/src/pages/Privacy/privacyStyle.ts +++ b/crabfit-frontend/src/pages/Privacy/privacyStyle.ts @@ -7,6 +7,8 @@ export const Note = styled.p` padding: 12px 16px; margin: 16px 0; box-sizing: border-box; + font-weight: 500; + line-height: 1.6em; & a { color: ${props => props.theme.mode === 'light' ? props.theme.primaryDark : props.theme.primaryLight};