close form when saving

This commit is contained in:
vidvidvid
2021-10-13 14:38:35 +02:00
committed by Alec LaLonde
parent 06b360b1a7
commit 76a5b14fb3
3 changed files with 27 additions and 6 deletions

View File

@@ -219,9 +219,16 @@ export const SetupPersonalityType: React.FC<SetupPersonalityTypeProps> = ({
<ColorBar mask={colorMask} mt={8} w="min(100vw, 30rem)" />
{isEdit && (
{isEdit && onClose && (
<ModalFooter mt={6}>
<Button colorScheme="blue" mr={3} onClick={save}>
<Button
colorScheme="blue"
mr={3}
onClick={() => {
save();
onClose();
}}
>
Save Changes
</Button>
<Button

View File

@@ -121,9 +121,16 @@ export const SetupPlayerType: React.FC<Props> = ({ isEdit, onClose }) => {
))}
</SimpleGrid>
{isEdit && (
{isEdit && onClose && (
<ModalFooter mt={6}>
<Button colorScheme="blue" mr={3} onClick={save}>
<Button
colorScheme="blue"
mr={3}
onClick={() => {
save();
onClose();
}}
>
Save Changes
</Button>
<Button

View File

@@ -131,9 +131,16 @@ export const SetupSkills: React.FC<SetupSkillsProps> = ({
placeholder="ADD YOUR SKILLS"
/>
</FlexContainer>
{isEdit && (
{isEdit && onClose && (
<ModalFooter mt={6}>
<Button colorScheme="blue" mr={3} onClick={save}>
<Button
colorScheme="blue"
mr={3}
onClick={() => {
save();
onClose();
}}
>
Save Changes
</Button>
<Button