diff --git a/components/Alert/index.tsx b/components/Alert/index.tsx index d7efec50..21a1a1a7 100644 --- a/components/Alert/index.tsx +++ b/components/Alert/index.tsx @@ -3,7 +3,6 @@ import * as AlertDialog from '@radix-ui/react-alert-dialog' import './index.scss' import Button from '~components/Button' -import { ButtonType } from '~utils/enums' // Props interface Props { diff --git a/components/CharacterConflictModal/index.scss b/components/CharacterConflictModal/index.scss index 866ec8f7..e69de29b 100644 --- a/components/CharacterConflictModal/index.scss +++ b/components/CharacterConflictModal/index.scss @@ -1,63 +0,0 @@ -.Conflict.Dialog { - & > p { - line-height: 1.2; - max-width: 400px; - } - img { - border-radius: 1rem; - } - - .arrow { - color: $grey-55; - font-size: 4rem; - text-align: center; - } - - .character { - display: flex; - flex-direction: column; - gap: $unit; - text-align: center; - width: 12rem; - font-weight: $medium; - } - - .diagram { - display: grid; - grid-template-columns: 1fr 1fr 1fr; - align-items: center; - - ul { - display: flex; - flex-direction: column; - gap: $unit * 2; - } - } - - footer { - display: flex; - flex-direction: row; - gap: $unit; - - .Button { - font-size: $font-regular; - padding: ($unit * 1.5) ($unit * 2); - width: 100%; - - &.btn-disabled { - background: $grey-90; - color: $grey-70; - cursor: not-allowed; - } - - &:not(.btn-disabled) { - background: $grey-90; - color: $grey-50; - - &:hover { - background: $grey-80; - } - } - } - } -} diff --git a/components/CharacterConflictModal/index.tsx b/components/CharacterConflictModal/index.tsx index 5faa7ebc..6493b215 100644 --- a/components/CharacterConflictModal/index.tsx +++ b/components/CharacterConflictModal/index.tsx @@ -1,14 +1,10 @@ import React, { useEffect, useState } from 'react' -import { setCookie } from 'cookies-next' -import Router, { useRouter } from 'next/router' -import { useTranslation } from 'react-i18next' -import { AxiosResponse } from 'axios' +import { useRouter } from 'next/router' +import { Trans, useTranslation } from 'next-i18next' import * as Dialog from '@radix-ui/react-dialog' -import api from '~utils/api' import { appState } from '~utils/appState' -import { accountState } from '~utils/accountState' import Button from '~components/Button' @@ -24,7 +20,11 @@ interface Props { } const CharacterConflictModal = (props: Props) => { + // Localization + const router = useRouter() const { t } = useTranslation('common') + const locale = + router.locale && ['en', 'ja'].includes(router.locale) ? router.locale : 'en' // States const [open, setOpen] = useState(false) @@ -60,11 +60,11 @@ const CharacterConflictModal = (props: Props) => { function openChange(open: boolean) { setOpen(open) + props.resetConflict() } function close() { setOpen(false) - props.resetConflict() } return ( @@ -75,33 +75,37 @@ const CharacterConflictModal = (props: Props) => { onOpenAutoFocus={(event) => event.preventDefault()} >
- Only one version of a character can be included in each party. Do
- you want to change your party members?
+
{infoString()}
+