🩹(frontend) fix circular imports in Dialog and Form primitives

While attempting to lazy-load routes, Vite/Rollup warnings revealed
that the Dialog and Form primitives were causing circular imports
through their use of the barrel file.

Easy to address: when using primitive elements inside those
primitives, rely on direct imports instead of the barrel file.
This commit is contained in:
lebaudantoine
2026-05-25 15:33:02 +02:00
committed by aleb_the_flash
parent 1b35e3acd9
commit 233bdce408
2 changed files with 6 additions and 3 deletions
+4 -1
View File
@@ -8,7 +8,10 @@ import {
type DialogProps as RACDialogProps,
Heading,
} from 'react-aria-components'
import { Div, Button, Box, VerticallyOffCenter } from '@/primitives'
import { Div } from './Div'
import { Button } from './Button'
import { Box } from './Box'
import { VerticallyOffCenter } from './VerticallyOffCenter'
import { text } from './Text'
import { MutableRefObject } from 'react'
import { css } from '@/styled-system/css'
+2 -2
View File
@@ -2,8 +2,8 @@ import { type FormEvent } from 'react'
import { Form as RACForm, type FormProps } from 'react-aria-components'
import { useTranslation } from 'react-i18next'
import { HStack } from '@/styled-system/jsx'
import { Button, useCloseDialog } from '@/primitives'
import { type ButtonProps } from '@/primitives/Button'
import { useCloseDialog } from './useCloseDialog'
import { type ButtonProps, Button } from './Button'
/**
* From wrapper that exposes form data on submit and adds submit/cancel buttons