From cac8e16449d8b68e128fe65314ad3f0f00070043 Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Fri, 16 Dec 2022 16:25:08 +0800 Subject: [PATCH] Flip the landing and about page so non-logged in users hit the landing page --- packages/web/pages/about.tsx | 9 +++ packages/web/pages/index.tsx | 107 ++++++++++++++++++++++++++++++----- 2 files changed, 101 insertions(+), 15 deletions(-) diff --git a/packages/web/pages/about.tsx b/packages/web/pages/about.tsx index 6b50cf2bc..29c5c310b 100644 --- a/packages/web/pages/about.tsx +++ b/packages/web/pages/about.tsx @@ -5,6 +5,9 @@ import { } from '../components/templates/landing/LandingSectionsContainer' import { LandingHeader } from '../components/templates/landing/LandingHeader' import { LandingFooter } from '../components/templates/landing/LandingFooter' +import { useGetViewerQuery } from '../lib/networking/queries/useGetViewerQuery' +import { useRouter } from 'next/router' +import { PageMetaData } from '../components/patterns/PageMetaData' const mobileContainerStyles = { alignSelf: 'center', @@ -40,6 +43,12 @@ const subHeadingStyles = { export default function LandingPage(): JSX.Element { return ( <> + + - } - - if (viewerData?.me) { - router.push('/home') - return - } + if (!isLoading && router.isReady && viewerData?.me) { + router.push('/home') + return <> + } else if (isLoading) { + return } return ( <> - - + + + + + + + Omnivore is the read-it-later app for serious readers. + + + Distraction free. Privacy focused. Open source. + + + + Save interesting articles, newsletter subscriptions, and documents + and read them later — focused and distraction free. Add notes and + highlights. Organize your reading list the way you want and sync it + across all your devices. + + + + + + + + ) }