🚨(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.
This commit is contained in:
lebaudantoine
2025-01-16 11:55:53 +01:00
committed by aleb_the_flash
parent 047ef83f17
commit 36ea44befc

View File

@@ -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>
)
}