Skip to content

Commit

Permalink
Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Dschoordsch committed Apr 18, 2024
1 parent 1e5abc2 commit 230e155
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 24 deletions.
19 changes: 9 additions & 10 deletions packages/client/components/NewMeetingActionsCurrentMeetings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import {NewMeetingActionsCurrentMeetings_team$key} from '~/__generated__/NewMeet
import useSnacksForNewMeetings from '~/hooks/useSnacksForNewMeetings'
import {PALETTE} from '~/styles/paletteV3'
import plural from '~/utils/plural'
import {Menu} from '../ui/Menu/Menu'
import FlatButton from './FlatButton'
import SelectMeetingDropdown from './SelectMeetingDropdown'
import {Menu} from '../ui/Menu/Menu'

const CurrentButton = styled(FlatButton)<{hasMeetings: boolean}>(({hasMeetings}) => ({
color: PALETTE.ROSE_500,
Expand Down Expand Up @@ -48,15 +48,14 @@ const NewMeetingActionsCurrentMeetings = (props: Props) => {
const label = `${meetingCount} Active ${plural(meetingCount, 'Meeting')}`
if (!meetingCount) return null
return (
<Menu trigger={
<CurrentButton
hasMeetings={meetingCount > 0}
size={'large'}
>
<ForumIcon />
{label}
</CurrentButton>
}>
<Menu
trigger={
<CurrentButton hasMeetings={meetingCount > 0} size={'large'}>
<ForumIcon />
{label}
</CurrentButton>
}
>
<SelectMeetingDropdown meetings={activeMeetings!} />
</Menu>
)
Expand Down
11 changes: 5 additions & 6 deletions packages/client/components/SelectMeetingDropdown.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import * as DropdownMenu from '@radix-ui/react-dropdown-menu'
import graphql from 'babel-plugin-relay/macro'
import React from 'react'
import {useFragment} from 'react-relay'
import {SelectMeetingDropdown_meetings$key} from '~/__generated__/SelectMeetingDropdown_meetings.graphql'
import plural from '~/utils/plural'
import SelectMeetingDropdownItem from './SelectMeetingDropdownItem'
import * as DropdownMenu from '@radix-ui/react-dropdown-menu'

interface Props {
meetings: SelectMeetingDropdown_meetings$key
Expand All @@ -25,12 +25,11 @@ const SelectMeetingDropdown = (props: Props) => {
const label = `${meetingCount} Active ${plural(meetingCount, 'Meeting')}`
return (
<>
<DropdownMenu.Label className='text-xs text-slate-600 font-semibold px-4 py-2 select-none'>{label}</DropdownMenu.Label>
<DropdownMenu.Label className='select-none px-4 py-2 text-xs font-semibold text-slate-600'>
{label}
</DropdownMenu.Label>
{meetings.map((meeting) => (
<SelectMeetingDropdownItem
key={meeting.id}
meeting={meeting}
/>
<SelectMeetingDropdownItem key={meeting.id} meeting={meeting} />
))}
</>
)
Expand Down
13 changes: 5 additions & 8 deletions packages/client/components/SelectMeetingDropdownItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,9 @@ const SelectMeetingDropdownItem = (props: Props) => {
const meetingPhaseLabel = (meetingPhase && phaseLabelLookup[meetingPhase.phaseType]) || 'Complete'

return (
<MenuItem
onClick={gotoMeeting}>
<MenuItem onClick={gotoMeeting}>
{typeof IconOrSVG === 'string' ? (
<div className='text-slate-600 size-6 m-2'>
<div className='size-6 m-2 text-slate-600'>
{
{
group_work: <GroupWork />,
Expand All @@ -78,14 +77,12 @@ const SelectMeetingDropdownItem = (props: Props) => {
</div>
)}
<div className='flex flex-col px-2'>
<div className='text-slate-700 text-base font-semibold'>
{name}
</div>
<div className='text-slate-600 text-xs'>
<div className='text-base font-semibold text-slate-700'>{name}</div>
<div className='text-xs text-slate-600'>
{meetingPhaseLabel}{teamName}
</div>
</div>
<div className='flex flex-grow justify-end items-center size-6'>
<div className='size-6 flex flex-grow items-center justify-end'>
<ArrowForwardIcon />
</div>
</MenuItem>
Expand Down

0 comments on commit 230e155

Please sign in to comment.