🩹(frontend) avoid duplicating Grist form's URL
It led to an error, with two occurrences of the form's URL being desynchronized. Fix this minor issue, and refactor the constant in a constant file to be shared across the app.
This commit is contained in:
committed by
aleb_the_flash
parent
0ad37ee6de
commit
70dbf94f7b
@@ -2,9 +2,7 @@ import { css } from '@/styled-system/css'
|
||||
import { RiErrorWarningLine, RiExternalLinkLine } from '@remixicon/react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { Text, A } from '@/primitives'
|
||||
|
||||
const GRIST_FORM =
|
||||
'https://grist.numerique.gouv.fr/o/docs/forms/1YrfNP1QSSy8p2gCxMFnSf/4'
|
||||
import { GRIST_FORM } from '@/utils/constants'
|
||||
|
||||
export const FeedbackBanner = () => {
|
||||
const { t } = useTranslation()
|
||||
|
||||
@@ -9,6 +9,7 @@ import { Separator } from '@/primitives/Separator'
|
||||
import { useSidePanel } from '../../../hooks/useSidePanel'
|
||||
import { menuRecipe } from '@/primitives/menuRecipe.ts'
|
||||
import { useSettingsDialog } from '../SettingsDialogContext'
|
||||
import { GRIST_FORM } from '@/utils/constants'
|
||||
|
||||
// @todo try refactoring it to use MenuList component
|
||||
export const OptionsMenuItems = () => {
|
||||
@@ -34,7 +35,7 @@ export const OptionsMenuItems = () => {
|
||||
<Separator />
|
||||
<Section>
|
||||
<MenuItem
|
||||
href="https://grist.incubateur.net/o/docs/forms/1YrfNP1QSSy8p2gCxMFnSf/4"
|
||||
href={GRIST_FORM}
|
||||
target="_blank"
|
||||
className={menuRecipe({ icon: true }).item}
|
||||
>
|
||||
|
||||
2
src/frontend/src/utils/constants.ts
Normal file
2
src/frontend/src/utils/constants.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export const GRIST_FORM =
|
||||
'https://grist.numerique.gouv.fr/o/docs/forms/1YrfNP1QSSy8p2gCxMFnSf/4' as const
|
||||
Reference in New Issue
Block a user