Skip to content

Commit d1798b1

Browse files
committed
チュートリアルのレイアウトを修正
1 parent dc32fbd commit d1798b1

File tree

3 files changed

+44
-35
lines changed

3 files changed

+44
-35
lines changed

web/app/tutorial/layout.tsx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import Link from "next/link";
2+
import Header from "~/components/Header";
3+
import { NavigateByAuthState } from "~/components/common/NavigateByAuthState";
4+
5+
export default function TutorialPageLayout({
6+
children,
7+
}: {
8+
children: React.ReactNode;
9+
}) {
10+
return (
11+
<NavigateByAuthState type="toLoginForUnauthenticated">
12+
<Header title="チュートリアル/Tutorial" />
13+
<div className="grow">{children}</div>
14+
<div className="m-4 text-center">
15+
<Link href="/home" className="btn btn-primary w-full">
16+
ホーム画面へ
17+
</Link>
18+
</div>
19+
</NavigateByAuthState>
20+
);
21+
}

web/app/tutorial/page.tsx

Lines changed: 21 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
"use client";
22

3-
import { Navigation, Pagination } from "swiper/modules";
3+
import { Navigation } from "swiper/modules";
44
import { Swiper, SwiperSlide } from "swiper/react";
55
import "swiper/css";
66
import "swiper/css/navigation";
77
import "swiper/css/pagination";
8-
import Link from "next/link";
9-
import Header from "~/components/Header";
108

119
const tutorialSteps = [
1210
{
@@ -41,36 +39,26 @@ const tutorialSteps = [
4139

4240
export default function Tutorial() {
4341
return (
44-
<div className="absolute inset-0 flex flex-col overflow-y-auto px-5 pt-14">
45-
<Header title="チュートリアル/Tutorial" />
46-
<div className="text-left">
47-
<Swiper
48-
modules={[Navigation, Pagination]}
49-
spaceBetween={50}
50-
slidesPerView={1}
51-
navigation
52-
pagination={{ clickable: true }}
53-
className="pb-16"
54-
>
55-
{tutorialSteps.map((step) => (
56-
<SwiperSlide key={step.imgPath}>
57-
<div className="mb-6 text-center">
58-
<h1 className="mb-4 font-bold text-lg">{step.label}</h1>
59-
<img
60-
src={step.imgPath}
61-
alt={step.label}
62-
className="mx-auto block h-auto w-[60vw] max-w-[400px]"
63-
/>
64-
</div>
65-
</SwiperSlide>
66-
))}
67-
</Swiper>
68-
<div className="text-center">
69-
<Link href="/home" className="btn btn-primary w-full">
70-
ホーム画面へ
71-
</Link>
72-
</div>
73-
</div>
42+
<div className="h-full ">
43+
<Swiper
44+
modules={[Navigation]}
45+
spaceBetween={50}
46+
slidesPerView={1}
47+
navigation
48+
>
49+
{tutorialSteps.map((step) => (
50+
<SwiperSlide key={step.imgPath}>
51+
<div className="text-center ">
52+
<h1 className="m-6 font-bold text-3xl">{step.label}</h1>
53+
<img
54+
src={step.imgPath}
55+
alt={step.label}
56+
className="mx-auto block h-auto w-[60vw] max-w-[400px] "
57+
/>
58+
</div>
59+
</SwiperSlide>
60+
))}
61+
</Swiper>
7462
</div>
7563
);
7664
}

web/components/chat/RoomWindow.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ export function RoomWindow(props: Props) {
145145
);
146146

147147
return (
148-
<div className="flex h-full flex-col">
148+
<div className="flex flex-col">
149149
{room.matchingStatus !== "matched" && (
150150
<FloatingMessage
151151
message="この人とはマッチングしていません。"
@@ -157,7 +157,7 @@ export function RoomWindow(props: Props) {
157157
<RoomHeader room={room} />
158158
</div>
159159
{messages && messages.length > 0 ? (
160-
<div className="flex-1 overflow-hidden p-2" ref={scrollDiv}>
160+
<div className="h-full flex-1 overflow-hidden p-2" ref={scrollDiv}>
161161
{messages.map((m) =>
162162
m.isPicture ? (
163163
<img

0 commit comments

Comments
 (0)