mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Merge pull request #1563 from omnivore-app/fix/opengraph-landing
Fix the opengraph image to always return on the landing page
This commit is contained in:
commit
0cf9ba3e92
2 changed files with 11 additions and 4 deletions
|
|
@ -5,8 +5,6 @@ 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 = {
|
||||
|
|
|
|||
|
|
@ -43,13 +43,22 @@ const subHeadingStyles = {
|
|||
|
||||
export default function LandingPage(): JSX.Element {
|
||||
const router = useRouter()
|
||||
const { viewerData, viewerDataError, isLoading } = useGetViewerQuery()
|
||||
const { viewerData, isLoading } = useGetViewerQuery()
|
||||
|
||||
if (!isLoading && router.isReady && viewerData?.me) {
|
||||
router.push('/home')
|
||||
return <></>
|
||||
} else if (isLoading) {
|
||||
return <LoadingView bgColor="#FEFCF5" />
|
||||
return (
|
||||
<>
|
||||
<PageMetaData
|
||||
title="Omnivore"
|
||||
path="/"
|
||||
ogImage="/static/images/og-homepage.png"
|
||||
/>
|
||||
<LoadingView bgColor="#FEFCF5" />
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
|
|||
Loading…
Reference in a new issue