Skip to content

Commit 56f5fd5

Browse files
committed
登録時のカード風のものを一旦作り直し
1 parent edcffe4 commit 56f5fd5

File tree

3 files changed

+66
-3
lines changed

3 files changed

+66
-3
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
import type { UserWithCoursesAndSubjects } from "common/types";
2+
import UserAvatar from "~/components/human/avatar";
3+
4+
// TODO: CardFront との統合
5+
export default function MockCardFront({
6+
displayedUser,
7+
}: {
8+
displayedUser: Omit<
9+
UserWithCoursesAndSubjects,
10+
"courses" | "interestSubjects"
11+
>;
12+
}) {
13+
return (
14+
<div
15+
className="flex h-full flex-col gap-5 overflow-clip border-2 border-primary bg-secondary p-5"
16+
style={{ width: "min(40dvh, 87.5vw)" }}
17+
>
18+
<div className="grid h-[20%] grid-cols-3 items-center">
19+
<UserAvatar
20+
pictureUrl={displayedUser.pictureUrl}
21+
width="9dvh"
22+
height="9dvh"
23+
/>
24+
<div className="col-span-2 grid grid-rows-3 items-center">
25+
<p className="col-span-3 font-bold text-1xl">{displayedUser.name}</p>
26+
<p className="col-span-1 text-1xl">{displayedUser.grade}</p>
27+
<p className="col-span-2 text-1xl">{displayedUser.faculty}</p>
28+
<p className="col-span-2 text-1xl">{displayedUser.department}</p>
29+
</div>
30+
</div>
31+
32+
<div className="flex h-[70%] w-full flex-col gap-2">
33+
<p className="col-span-2 text-1xl">{displayedUser.intro}</p>
34+
</div>
35+
36+
{/* <div className="flex h-[70%] w-full flex-col gap-2" ref={containerRef}>
37+
<div
38+
ref={interestsContainerRef}
39+
className="width-full h-[50%] overflow-hidden"
40+
>
41+
<div />
42+
{isHiddenInterestExist && (
43+
<div className="badge badge-outline bg-gray-200 text-gray-700">
44+
And More
45+
</div>
46+
)}
47+
</div>
48+
49+
<div
50+
ref={coursesContainerRef}
51+
className="width-full h-[50%] overflow-hidden"
52+
>
53+
<div />
54+
{isHiddenCourseExist && (
55+
<div className="badge badge-outline bg-gray-200 text-gray-700">
56+
And More
57+
</div>
58+
)}
59+
</div>
60+
</div> */}
61+
</div>
62+
);
63+
}

web/app/signup/steps/step3_confirmation.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { Step1User } from "common/zod/types";
22
import type { BackProp, StepProps } from "~/app/signup/common";
3-
import { CardFront } from "~/components/Card.tsx";
3+
import MockCardFront from "./components/MockCardFront";
44
import type { Step2Data } from "./step2_img";
55

66
interface inputDataProps {
@@ -28,7 +28,7 @@ export default function Confirmation({
2828
>
2929
<h1 className="mb-2 text-xl">確認</h1>
3030
<div className="flex flex-col items-center">
31-
<CardFront
31+
<MockCardFront
3232
displayedUser={{
3333
...Step1Data,
3434
...Step2Data,

web/components/Card.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ interface CardProps {
1010
onFlip?: (isBack: boolean) => void;
1111
}
1212

13-
const CardFront = ({ displayedUser, currentUser }: CardProps) => {
13+
export const CardFront = ({ displayedUser, currentUser }: CardProps) => {
1414
const containerRef = useRef<HTMLDivElement>(null);
1515
const interestsContainerRef = useRef<HTMLDivElement>(null);
1616
const coursesContainerRef = useRef<HTMLDivElement>(null);

0 commit comments

Comments
 (0)