mirror of
https://github.com/LucasVbr/meeting-app.git
synced 2026-12-05 17:30:50 +00:00
fix(disconnect from map issue): require to be connected to reach /map
This commit is contained in:
@@ -5,7 +5,8 @@ import {
|
||||
FormHelperText,
|
||||
FormLabel,
|
||||
UseEditableProps,
|
||||
} from '@chakra-ui/react';
|
||||
Link,
|
||||
} from "@chakra-ui/react";
|
||||
|
||||
type CustomEditableProps = {
|
||||
id: string;
|
||||
@@ -14,16 +15,25 @@ type CustomEditableProps = {
|
||||
} & UseEditableProps;
|
||||
|
||||
export default function CustomEditable(props: CustomEditableProps) {
|
||||
const {label, id, helperText = '', ...UseEditableProps} = props;
|
||||
const { label, id, helperText = "", ...UseEditableProps } = props;
|
||||
|
||||
return (
|
||||
<FormControl>
|
||||
<FormLabel as="legend" htmlFor={id}>{label}</FormLabel>
|
||||
<Editable{...UseEditableProps} fontWeight="bold" isDisabled={true}
|
||||
placeholder={'Non renseigné'} color={'gray.500'}>
|
||||
<EditablePreview/>
|
||||
</Editable>
|
||||
<FormControl>
|
||||
<FormLabel as="legend" htmlFor={id}>
|
||||
{label}
|
||||
</FormLabel>
|
||||
<Editable
|
||||
{...UseEditableProps}
|
||||
fontWeight="bold"
|
||||
isDisabled={true}
|
||||
placeholder={"Non renseigné"}
|
||||
color={"gray.500"}
|
||||
>
|
||||
<EditablePreview />
|
||||
</Editable>
|
||||
<Link href={"/map"}>
|
||||
<FormHelperText>{helperText}</FormHelperText>
|
||||
</FormControl>
|
||||
</Link>
|
||||
</FormControl>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user