Merged PR 74: develop動作確認

## 概要
[Task1498: develop動作確認](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/fa4924a4-d079-4fab-9fb5-a9a11eb205f0/_workitems/edit/1498)

- 言語の読み取りと描画のタイミングで言語切り替えが凡例されないことがあるので、各ページで実施するように修正しました。

## レビューポイント
- 共有
- 後ほどしっかりしたロジックを検討します。

## UIの変更

## 動作確認状況
- ローカルで確認
This commit is contained in:
makabe.t 2023-04-11 10:50:15 +00:00
parent a4c93b3023
commit f75b8545b1
5 changed files with 64 additions and 8 deletions

View File

@ -1,4 +1,4 @@
import React from "react";
import React, { useEffect } from "react";
import { useTranslation } from "react-i18next";
import { getTranslationID } from "translation";
import Header from "components/header";
@ -7,7 +7,18 @@ import styles from "styles/app.module.scss";
import emailCheck from "../../assets/images/email_check.svg";
const SignupCompletePage: React.FC = (): JSX.Element => {
const [t] = useTranslation();
const [t, i18n] = useTranslation();
useEffect(() => {
const language = document.cookie
.split(";")
.map((x) => x.split("="))
.find((x) => x.length === 2 && x[0] === "language");
if (language) {
i18n.changeLanguage(language[1]);
}
}, [i18n]);
return (
<div className={styles.wrap}>

View File

@ -1,15 +1,29 @@
import Footer from "components/footer";
import Header from "components/header";
import { selectPageState } from "features/signup/selectors";
import React from "react";
import React, { useEffect } from "react";
import { useSelector } from "react-redux";
import { Navigate } from "react-router-dom";
import { useTranslation } from "react-i18next";
import SignupInput from "./signupInput";
import SignupConfirm from "./signupConfirm";
const SignupPage: React.FC<{ completeTo: string }> = ({
completeTo,
}): JSX.Element => {
const { i18n } = useTranslation();
useEffect(() => {
const language = document.cookie
.split(";")
.map((x) => x.split("="))
.find((x) => x.length === 2 && x[0] === "language");
if (language) {
i18n.changeLanguage(language[1]);
}
}, [i18n]);
const state = useSelector(selectPageState);
return (

View File

@ -3,10 +3,22 @@ import Header from "components/header";
import styles from "styles/app.module.scss";
import { useTranslation } from "react-i18next";
import { getTranslationID } from "translation";
import { useEffect } from "react";
import check_circle from "../../assets/images/check_circle.svg";
const VerifyPage: React.FC = (): JSX.Element => {
const [t] = useTranslation();
const [t, i18n] = useTranslation();
useEffect(() => {
const language = document.cookie
.split(";")
.map((x) => x.split("="))
.find((x) => x.length === 2 && x[0] === "language");
if (language) {
i18n.changeLanguage(language[1]);
}
}, [i18n]);
return (
<div className={styles.wrap}>

View File

@ -7,11 +7,18 @@ import { getTranslationID } from "translation";
import report from "../../assets/images/report.svg";
const VerifyFailedPage: React.FC = (): JSX.Element => {
const [t] = useTranslation();
const [t, i18n] = useTranslation();
useEffect(() => {
// 初期表示時の処理を記述
}, []);
const language = document.cookie
.split(";")
.map((x) => x.split("="))
.find((x) => x.length === 2 && x[0] === "language");
if (language) {
i18n.changeLanguage(language[1]);
}
}, [i18n]);
return (
<div className={styles.wrap}>

View File

@ -3,10 +3,22 @@ import Header from "components/header";
import styles from "styles/app.module.scss";
import { useTranslation } from "react-i18next";
import { getTranslationID } from "translation";
import { useEffect } from "react";
import check_circle from "../../assets/images/check_circle.svg";
const VerifySuccessPage: React.FC = (): JSX.Element => {
const [t] = useTranslation();
const [t, i18n] = useTranslation();
useEffect(() => {
const language = document.cookie
.split(";")
.map((x) => x.split("="))
.find((x) => x.length === 2 && x[0] === "language");
if (language) {
i18n.changeLanguage(language[1]);
}
}, [i18n]);
return (
<div className={styles.wrap}>