Compare commits

...

2 Commits

Author SHA1 Message Date
lebaudantoine 8094ece4cf 🚨(frontend) resolve key prop warning in ParticipantListItem
Key prop was incorrectly passed down as a regular prop to ParticipantListItem
instead of being used at the array mapping level. Key is a special React prop
for list rendering and cannot be accessed as a component prop.
2025-01-16 12:12:43 +01:00
lebaudantoine b131eb57d8 🚨(frontend) update deprecated react-aria Section components
Section was deprecated in Novembre 2024 release, It has been replaced
by specific components for each parent collection component,
e.g. MenuSection.
2025-01-16 12:12:19 +01:00
3 changed files with 13 additions and 8 deletions
@@ -3,7 +3,7 @@ import {
RiMegaphoneLine,
RiSettings3Line,
} from '@remixicon/react'
import { MenuItem, Menu as RACMenu, Section } from 'react-aria-components'
import { MenuItem, Menu as RACMenu, MenuSection } from 'react-aria-components'
import { useTranslation } from 'react-i18next'
import { Separator } from '@/primitives/Separator'
import { useSidePanel } from '../../../hooks/useSidePanel'
@@ -23,7 +23,7 @@ export const OptionsMenuItems = () => {
width: '300px',
}}
>
<Section>
<MenuSection>
<MenuItem
onAction={() => toggleEffects()}
className={menuRecipe({ icon: true }).item}
@@ -31,9 +31,9 @@ export const OptionsMenuItems = () => {
<RiAccountBoxLine size={20} />
{t('effects')}
</MenuItem>
</Section>
</MenuSection>
<Separator />
<Section>
<MenuSection>
<MenuItem
href={GRIST_FORM}
target="_blank"
@@ -49,7 +49,7 @@ export const OptionsMenuItems = () => {
<RiSettings3Line size={20} />
{t('settings')}
</MenuItem>
</Section>
</MenuSection>
</RACMenu>
)
}
@@ -118,7 +118,6 @@ export const ParticipantListItem = ({
<HStack
role="listitem"
justify="space-between"
key={participant.identity}
id={participant.identity}
className={css({
padding: '0.25rem 0',
@@ -56,7 +56,10 @@ export const ParticipantsList = () => {
heading={t('raisedHands')}
participants={raisedHandParticipants}
renderParticipant={(participant) => (
<HandRaisedListItem participant={participant} />
<HandRaisedListItem
key={participant.identity}
participant={participant}
/>
)}
action={() => (
<LowerAllHandsButton participants={raisedHandParticipants} />
@@ -68,7 +71,10 @@ export const ParticipantsList = () => {
heading={t('contributors')}
participants={sortedParticipants}
renderParticipant={(participant) => (
<ParticipantListItem participant={participant} />
<ParticipantListItem
key={participant.identity}
participant={participant}
/>
)}
/>
</Div>