From dca7205a4768bbf4ea02b7b6d5688a1fe26bd575 Mon Sep 17 00:00:00 2001 From: Marshall Polaris Date: Thu, 1 Sep 2022 19:37:41 -0700 Subject: [PATCH] Disable group prefetching from contract links (#836) * Kill dead code * Stop prefetching groups when viewing contract * Tidy markup --- web/components/contract/contract-details.tsx | 58 +++++++------------- 1 file changed, 19 insertions(+), 39 deletions(-) diff --git a/web/components/contract/contract-details.tsx b/web/components/contract/contract-details.tsx index 8edf9299..e0eda8d6 100644 --- a/web/components/contract/contract-details.tsx +++ b/web/components/contract/contract-details.tsx @@ -8,6 +8,7 @@ import { import clsx from 'clsx' import { Editor } from '@tiptap/react' import dayjs from 'dayjs' +import Link from 'next/link' import { Row } from '../layout/row' import { formatMoney } from 'common/util/format' @@ -26,7 +27,7 @@ import { Button } from 'web/components/button' import { Modal } from 'web/components/layout/modal' import { Col } from 'web/components/layout/col' import { ContractGroupsList } from 'web/components/groups/contract-groups-list' -import { SiteLink } from 'web/components/site-link' +import { linkClass } from 'web/components/site-link' import { getGroupLinkToDisplay, groupPath } from 'web/lib/firebase/groups' import { insertContent } from '../editor/utils' import { contractMetrics } from 'common/contract-details' @@ -83,12 +84,11 @@ export function MiscDetails(props: { )} {!hideGroupLink && groupToDisplay && ( - - {groupToDisplay.name} - + + + {groupToDisplay.name} + + )} ) @@ -116,25 +116,6 @@ export function AvatarDetails(props: { ) } -export function AbbrContractDetails(props: { - contract: Contract - showHotVolume?: boolean - showTime?: ShowTime -}) { - const { contract, showHotVolume, showTime } = props - return ( - - - - - - ) -} - export function ContractDetails(props: { contract: Contract disabled?: boolean @@ -156,19 +137,18 @@ export function ContractDetails(props: { const isMobile = (width ?? 0) < 600 const groupToDisplay = getGroupLinkToDisplay(contract) const groupInfo = groupToDisplay ? ( - - - - - {groupToDisplay.name} - - - + + + + {groupToDisplay.name} + + ) : (