From cd3d96d36f3a8383cd6556c970af341533414489 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Fri, 20 Jan 2023 21:50:27 -0800 Subject: [PATCH] Add conditional for earring values --- components/CharacterModal/index.tsx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/components/CharacterModal/index.tsx b/components/CharacterModal/index.tsx index b901b12a..c1b9b90d 100644 --- a/components/CharacterModal/index.tsx +++ b/components/CharacterModal/index.tsx @@ -1,5 +1,10 @@ // Core dependencies -import React, { useCallback, useEffect, useState } from 'react' +import React, { + PropsWithChildren, + useCallback, + useEffect, + useState, +} from 'react' import { useRouter } from 'next/router' import { useTranslation } from 'next-i18next' import { AxiosResponse } from 'axios' @@ -56,7 +61,6 @@ interface GridCharacterObject { interface Props { gridCharacter: GridCharacter - children?: React.ReactNode open: boolean onOpenChange: (open: boolean) => void } @@ -66,7 +70,7 @@ const CharacterModal = ({ children, open: modalOpen, onOpenChange, -}: Props) => { +}: PropsWithChildren) => { const router = useRouter() const locale = router.locale && ['en', 'ja'].includes(router.locale) ? router.locale : 'en' @@ -239,8 +243,8 @@ const CharacterModal = ({