Skip to content

Commit

Permalink
fix(passport): fixes issue when data is undefined (#2607)
Browse files Browse the repository at this point in the history
  • Loading branch information
poolsar42 authored Aug 15, 2023
1 parent ace4ca9 commit 186d677
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions apps/passport/app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export const loader: LoaderFunction = getRollupReqFunctionErrorWrapper(
})
}

return ogTheme
return json(ogTheme)
}
let appProps
if (context.appProps) {
Expand Down Expand Up @@ -167,20 +167,22 @@ export const loader: LoaderFunction = getRollupReqFunctionErrorWrapper(
export const meta: MetaFunction = ({ data }) => {
return {
charset: 'utf-8',
title: data.title ?? 'Passport - Rollup',
title: data?.title ? data.title : 'Passport - Rollup',
viewport: 'width=device-width,initial-scale=1',
'og:url': 'https://passport.rollup.id',
'og:title': data.title ?? 'Passport - Rollup',
'og:description': data.description ?? 'Simple & Secure Private Auth',
'og:image':
data.image ??
'https://uploads-ssl.webflow.com/63d2527457e052627d01c416/64c91dd58d5781fa9a23ea85_OG%20(2).png',
'og:title': data?.title ? data.title : 'Passport - Rollup',
'og:description': data?.description
? data.description
: 'Simple & Secure Private Auth',
'og:image': data?.image
? data.image
: 'https://uploads-ssl.webflow.com/63d2527457e052627d01c416/64c91dd58d5781fa9a23ea85_OG%20(2).png',
'twitter:card': 'summary_large_image',
'twitter:site': '@rollupid_xyz',
'twitter:creator': '@rollupid_xyz',
'twitter:image':
data.image ??
'https://uploads-ssl.webflow.com/63d2527457e052627d01c416/64c91dd58d5781fa9a23ea85_OG%20(2).png',
'twitter:image': data?.image
? data.image
: 'https://uploads-ssl.webflow.com/63d2527457e052627d01c416/64c91dd58d5781fa9a23ea85_OG%20(2).png',
'theme-color': '#ffffff',
'mobile-web-app-capable': 'yes',
'apple-mobile-web-app-capable': 'yes',
Expand Down

0 comments on commit 186d677

Please sign in to comment.