Remove propz stuff that was breaking meta tags

This commit is contained in:
James Grugett 2022-09-20 19:32:36 -05:00
parent 66b63881a1
commit fe77615111

View File

@ -20,7 +20,6 @@ import { Bet, listAllBets } from 'web/lib/firebase/bets'
import { Comment, listAllComments } from 'web/lib/firebase/comments' import { Comment, listAllComments } from 'web/lib/firebase/comments'
import Custom404 from '../404' import Custom404 from '../404'
import { AnswersPanel } from 'web/components/answers/answers-panel' import { AnswersPanel } from 'web/components/answers/answers-panel'
import { fromPropz, usePropz } from 'web/hooks/use-propz'
import { Leaderboard } from 'web/components/leaderboard' import { Leaderboard } from 'web/components/leaderboard'
import { resolvedPayout } from 'common/calculate' import { resolvedPayout } from 'common/calculate'
import { formatMoney } from 'common/util/format' import { formatMoney } from 'common/util/format'
@ -45,8 +44,7 @@ import { FeedComment } from 'web/components/feed/feed-comments'
import { Title } from 'web/components/title' import { Title } from 'web/components/title'
import { FeedBet } from 'web/components/feed/feed-bets' import { FeedBet } from 'web/components/feed/feed-bets'
export const getStaticProps = fromPropz(getStaticPropz) export async function getStaticProps(props: {
export async function getStaticPropz(props: {
params: { username: string; contractSlug: string } params: { username: string; contractSlug: string }
}) { }) {
const { username, contractSlug } = props.params const { username, contractSlug } = props.params
@ -84,14 +82,6 @@ export default function ContractPage(props: {
slug: string slug: string
backToHome?: () => void backToHome?: () => void
}) { }) {
props = usePropz(props, getStaticPropz) ?? {
contract: null,
username: '',
comments: [],
bets: [],
slug: '',
}
const inIframe = useIsIframe() const inIframe = useIsIframe()
if (inIframe) { if (inIframe) {
return <ContractEmbedPage {...props} /> return <ContractEmbedPage {...props} />