Skip to content

Commit 736051c

Browse files
authored
初期登録画面でも表示言語を切り替えられる (#287)
1 parent 4e60ebb commit 736051c

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

web/src/app/[locale]/registration/page.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"use client";
22

33
import Avatar from "@/components/Avatar";
4+
import LanguageSwitcher from "@/components/LanguageSelectar";
45
import { IMAGE_PREVIEW_URL_SESSION_STORAGE_KEY, STEP_1_DATA_SESSION_STORAGE_KEY } from "@/consts";
56
import { useUserFormContext } from "@/features/settings/UserFormController";
67
import { useToast } from "@/features/toast/ToastProvider";
@@ -22,7 +23,11 @@ export default function Page() {
2223
return (
2324
<>
2425
<div className="my-5 p-4 sm:my-20 md:mx-10 2xl:mx-60">
25-
<h1 className="mx-5 mb-8 font-bold text-3xl sm:mx-0">{t("registration.title")}</h1>
26+
<div className="flex justify-between">
27+
<h1 className="mx-5 mb-8 font-bold text-3xl sm:mx-0">{t("registration.title")}</h1>
28+
<LanguageSwitcher />
29+
</div>
30+
2631
<form
2732
onSubmit={async (ev) => {
2833
ev.preventDefault();

web/src/app/[locale]/registration/step2/page.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"use client";
22

33
import { client } from "@/client";
4+
import LanguageSwitcher from "@/components/LanguageSelectar.tsx";
45
import { IMAGE_PREVIEW_URL_SESSION_STORAGE_KEY, STEP_1_DATA_SESSION_STORAGE_KEY } from "@/consts";
56
import { auth } from "@/features/auth/config";
67
import { type Status, useUserFormContext } from "@/features/settings/UserFormController";
@@ -87,7 +88,10 @@ export default function Page() {
8788
return (
8889
<>
8990
<div className="my-5 p-4 sm:my-20 md:mx-10 2xl:mx-60 ">
90-
<h1 className="mx-5 mb-8 font-bold text-3xl sm:mx-0">{t("registration.title")}</h1>
91+
<div className="flex justify-between">
92+
<h1 className="mx-5 mb-8 font-bold text-3xl sm:mx-0">{t("registration.title")}</h1>
93+
<LanguageSwitcher />
94+
</div>
9195
<form onSubmit={handleSubmit} className="flex flex-col gap-3">
9296
<div>
9397
<div className="px-15 sm:my-10">

0 commit comments

Comments
 (0)