Show resolution panel above recommented markets

This commit is contained in:
Ian Philips 2022-10-03 10:11:24 -06:00
parent d5d1284306
commit 5ae9049295

View File

@ -160,6 +160,7 @@ export function ContractPageContent(
const { backToHome, comments } = props const { backToHome, comments } = props
const contract = useContractWithPreload(props.contract) ?? props.contract const contract = useContractWithPreload(props.contract) ?? props.contract
const user = useUser() const user = useUser()
const isCreator = user?.id === contract.creatorId
usePrefetch(user?.id) usePrefetch(user?.id)
useTracking( useTracking(
'view market', 'view market',
@ -204,7 +205,18 @@ export function ContractPageContent(
}) })
return ( return (
<Page rightSidebar={<ContractPageSidebar contract={contract} />}> <Page
rightSidebar={
<>
<ContractPageSidebar contract={contract} />
{isCreator && (
<Col className={'xl:hidden'}>
<RecommendedContractsWidget contract={contract} />
</Col>
)}
</>
}
>
{showConfetti && ( {showConfetti && (
<FullscreenConfetti recycle={false} numberOfPieces={300} /> <FullscreenConfetti recycle={false} numberOfPieces={300} />
)} )}
@ -273,7 +285,7 @@ export function ContractPageContent(
comments={comments} comments={comments}
/> />
</Col> </Col>
<RecommendedContractsWidget contract={contract} /> {!isCreator && <RecommendedContractsWidget contract={contract} />}
<ScrollToTopButton className="fixed bottom-16 right-2 z-20 lg:bottom-2 xl:hidden" /> <ScrollToTopButton className="fixed bottom-16 right-2 z-20 lg:bottom-2 xl:hidden" />
</Page> </Page>
) )
@ -294,7 +306,7 @@ const RecommendedContractsWidget = memo(
return null return null
} }
return ( return (
<Col className="mt-2 gap-2 px-2 sm:px-0"> <Col className="mt-2 gap-2 px-2 sm:px-1">
<Title className="text-gray-700" text="Recommended" /> <Title className="text-gray-700" text="Recommended" />
<ContractsGrid <ContractsGrid
contracts={recommendations} contracts={recommendations}