diff --git a/web/components/contract/contract-details.tsx b/web/components/contract/contract-details.tsx
index 5baea15f..3d500d42 100644
--- a/web/components/contract/contract-details.tsx
+++ b/web/components/contract/contract-details.tsx
@@ -30,6 +30,7 @@ import { Tooltip } from 'web/components/tooltip'
import { useWindowSize } from 'web/hooks/use-window-size'
import { ExtraContractActionsRow } from './extra-contract-actions-row'
import { PlusCircleIcon } from '@heroicons/react/solid'
+import { GroupLink } from 'common/group'
export type ShowTime = 'resolve-date' | 'close-date'
@@ -117,55 +118,12 @@ export function ContractDetails(props: {
disabled?: boolean
}) {
const { contract, disabled } = props
- const { creatorName, creatorUsername, creatorId, creatorAvatarUrl } = contract
- const { resolvedDate } = contractMetrics(contract)
- const user = useUser()
- const isCreator = user?.id === creatorId
const isMobile = useIsMobile()
return (
-
-
- {!disabled && (
-
-
-
- )}
-
-
- {disabled ? (
- creatorName
- ) : (
-
- )}
-
-
-
- {!isMobile && (
-
- )}
-
-
+
+
@@ -184,6 +142,62 @@ export function ContractDetails(props: {
)
}
+export function MarketSubheader(props: {
+ contract: Contract
+ disabled?: boolean
+}) {
+ const { contract, disabled } = props
+ const { creatorName, creatorUsername, creatorId, creatorAvatarUrl } = contract
+ const { resolvedDate } = contractMetrics(contract)
+ const user = useUser()
+ const isCreator = user?.id === creatorId
+ const isMobile = useIsMobile()
+ return (
+
+
+ {!disabled && (
+
+
+
+ )}
+
+
+ {disabled ? (
+ creatorName
+ ) : (
+
+ )}
+
+
+
+ {!isMobile && (
+
+ )}
+
+
+
+ )
+}
+
export function CloseOrResolveTime(props: {
contract: Contract
resolvedDate: any
@@ -231,43 +245,13 @@ export function MarketGroups(props: {
const user = useUser()
const { contract, isMobile, disabled } = props
const groupToDisplay = getGroupLinkToDisplay(contract)
- const groupInfo = groupToDisplay ? (
-
-
-
- {groupToDisplay.name}
-
-
-
- ) : (
-
-
- No Group
-
-
- )
+
return (
<>
- {disabled ? (
- { groupInfo }
- ) : (
+
+ {!disabled && (
- {groupInfo}
{user && (