From 5df594e46a153508fb5aea4fc1486f53e1520d7b Mon Sep 17 00:00:00 2001 From: Ian Philips Date: Wed, 31 Aug 2022 08:29:35 -0600 Subject: [PATCH] Make details fit on one line, make group a link --- web/components/contract/contract-details.tsx | 47 +++++++++++--------- web/components/user-link.tsx | 6 +-- 2 files changed, 30 insertions(+), 23 deletions(-) diff --git a/web/components/contract/contract-details.tsx b/web/components/contract/contract-details.tsx index 2e76531b..df2b77cf 100644 --- a/web/components/contract/contract-details.tsx +++ b/web/components/contract/contract-details.tsx @@ -5,7 +5,6 @@ import { TrendingUpIcon, UserGroupIcon, } from '@heroicons/react/outline' -import Router from 'next/router' import clsx from 'clsx' import { Editor } from '@tiptap/react' import dayjs from 'dayjs' @@ -162,13 +161,32 @@ export function ContractDetails(props: { const { width } = useWindowSize() const isMobile = (width ?? 0) < 600 - const groupInfo = ( - - - - {groupToDisplay ? groupToDisplay.name : 'No group'} - + const groupInfo = groupToDisplay ? ( + + + + + {groupToDisplay.name} + + + ) : ( + ) return ( @@ -199,19 +217,8 @@ export function ContractDetails(props: {
) : ( - - {user && ( + {groupInfo} + {user && groupToDisplay && (