|
| 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 | +} |
0 commit comments