Add title, mobile flex

This commit is contained in:
Ian Philips 2022-07-22 13:53:19 -06:00
parent d3d472f5d2
commit 63d8e6739b

View File

@ -12,6 +12,7 @@ import {
} from 'web/lib/firebase/groups' } from 'web/lib/firebase/groups'
import { User } from 'common/user' import { User } from 'common/user'
import { Contract } from 'common/contract' import { Contract } from 'common/contract'
import { SiteLink } from 'web/components/site-link'
export function ContractGroupsList(props: { export function ContractGroupsList(props: {
groups: Group[] groups: Group[]
@ -22,20 +23,25 @@ export function ContractGroupsList(props: {
return ( return (
<Col className={'gap-2'}> <Col className={'gap-2'}>
<span className={'text-xl text-indigo-700'}>
<SiteLink href={'/groups/'}>Groups</SiteLink>
</span>
{user && ( {user && (
<Row className={'ml-2 items-center justify-between'}> <Col className={'ml-2 items-center justify-between sm:flex-row'}>
<span>Add to group: </span> <span>Add to: </span>
<GroupSelector <GroupSelector
options={{ options={{
showSelector: true, showSelector: true,
showLabel: false, showLabel: false,
ignoreGroupIds: groups.map((g) => g.id), ignoreGroupIds: groups.map((g) => g.id),
}} }}
setSelectedGroup={(group) => addContractToGroup(group, contract)} setSelectedGroup={(group) =>
group && addContractToGroup(group, contract)
}
selectedGroup={undefined} selectedGroup={undefined}
creator={user} creator={user}
/> />
</Row> </Col>
)} )}
{groups.length === 0 && ( {groups.length === 0 && (
<Col className="ml-2 h-full justify-center text-gray-500"> <Col className="ml-2 h-full justify-center text-gray-500">