Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 동아리 데이터 추가 및 결과페이지 연결 #30

Merged
merged 7 commits into from
Sep 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added src/assets/clubs/DFC.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/clubs/H.P.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/clubs/H.Q.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/clubs/IVF.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/clubs/IZB(인질범).jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/clubs/KGA.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/clubs/KNU UNSA.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/clubs/KNUBC.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/clubs/KOMO.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/clubs/KUTC.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/clubs/Now&Here.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/clubs/POW.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/clubs/RCY.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/clubs/SFC.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/clubs/SLANG.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/clubs/VINE.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/clubs/검도부.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/clubs/경묵회.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/clubs/경불회.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/clubs/관현악반.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/clubs/국사무쌍.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/clubs/그랜드챕스.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/clubs/기파랑.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/clubs/꿈틀.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/clubs/농악반.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/clubs/돌구름.jpg
Binary file added src/assets/clubs/동그라미.jpg
Binary file added src/assets/clubs/뜨람.jpg
Binary file added src/assets/clubs/맨투맨.jpg
Binary file added src/assets/clubs/미담장학회.jpg
Binary file added src/assets/clubs/복현기우회.jpg
Binary file added src/assets/clubs/빨마.jpg
Binary file added src/assets/clubs/사우회.jpg
Binary file added src/assets/clubs/산악부.jpg
Binary file added src/assets/clubs/상투스.jpg
Binary file added src/assets/clubs/서브미션.jpg
Binary file added src/assets/clubs/센토.jpg
Binary file added src/assets/clubs/솔라이브.jpg
Binary file added src/assets/clubs/솔토론회.jpg
Binary file added src/assets/clubs/수리영역.jpg
Binary file added src/assets/clubs/수중탐사대.jpg
Binary file added src/assets/clubs/스매싱.jpg
Binary file added src/assets/clubs/스윙스.jpg
Binary file added src/assets/clubs/스트라이크.jpg
Binary file added src/assets/clubs/스파이크.jpg
Binary file added src/assets/clubs/신망애.jpg
Binary file added src/assets/clubs/싸울아비.jpg
Binary file added src/assets/clubs/쌩목.jpg
Binary file added src/assets/clubs/앱동.jpg
Binary file added src/assets/clubs/업어치기.jpg
Binary file added src/assets/clubs/에이밍.jpg
Binary file added src/assets/clubs/에이스.jpg
Binary file added src/assets/clubs/연극반.jpg
Binary file added src/assets/clubs/오렌지 파이터스.jpg
Binary file added src/assets/clubs/요리조리.jpg
Binary file added src/assets/clubs/우리노래반.jpg
Binary file added src/assets/clubs/익스프레션.jpg
Binary file added src/assets/clubs/일렉스.jpg
Binary file added src/assets/clubs/청음반.jpg
Binary file added src/assets/clubs/코스모스.jpg
Binary file added src/assets/clubs/크누 모빌리티.jpg
Binary file added src/assets/clubs/크누피.jpg
Binary file added src/assets/clubs/터프시커리.jpg
Binary file added src/assets/clubs/토레스.jpg
Binary file added src/assets/clubs/트러블메이커.jpg
Binary file added src/assets/clubs/파란.jpg
Binary file added src/assets/clubs/팔레트.jpg
Binary file added src/assets/clubs/플레이아데스.jpg
Binary file added src/assets/clubs/한울회.jpg
Binary file added src/assets/clubs/합창단.jpg
Binary file added src/assets/clubs/현시연.jpg
438 changes: 438 additions & 0 deletions src/constants/clubs.ts

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions src/constants/results.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export const results = [
{
resultType: "intenseSportsman",
clubs: ["센토", "맨투맨", "동그라미", "오렌지파이터스"],
clubs: ["센토", "맨투맨", "동그라미", "오렌지 파이터스"],
typeName: "격한 운동을 좋아하는 스포츠맨형",
},
{
Expand Down Expand Up @@ -31,12 +31,12 @@ export const results = [
},
{
resultType: "fightSportsman",
clubs: ["검보부", "에이밍"],
clubs: ["검도부", "에이밍"],
typeName: "승부를 좋아하는 스포츠맨형",
},
{
resultType: "uniqueSportsman",
clubs: ["수중탐사대", "싸울아비", "인질범"],
clubs: ["수중탐사대", "싸울아비", "IZB(인질범)"],
typeName: "유니크한 체육을 즐기는 스포츠맨형",
},
{
Expand Down Expand Up @@ -81,7 +81,7 @@ export const results = [
},
{
resultType: "leedongjin",
clubs: ["꼬모"],
clubs: ["KOMO"],
typeName: "영화 감상을 좋아하는 이동진형",
},
{
Expand All @@ -106,7 +106,7 @@ export const results = [
},
{
resultType: "winner",
clubs: ["국상무쌍", "트러블메이커", "복현기우회", "H.P"],
clubs: ["국사무쌍", "트러블메이커", "복현기우회", "H.P"],
typeName: "지고는 못 사는 승부사형",
},
{
Expand Down
24 changes: 20 additions & 4 deletions src/pages/ResultPage.styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import styled from "@emotion/styled";
export const ResultWrapper = styled.div`
display: flex;
flex-direction: column;
height: calc(100% - 60px);
height: 100%;

padding-top: 60px;
`;
Expand Down Expand Up @@ -36,18 +36,34 @@ export const ClubItem = styled.div`
position: relative;
border-radius: 1rem;
background-color: white;
padding: 0.75rem 0 0.75rem 3.2rem;
padding: 0.75rem 0.25rem 0.75rem 3.2rem;
margin-left: 1.6rem;
word-break: keep-all;
`;

export const ClubImage = styled.img`
export const ClubImageWrapper = styled.div`
position: absolute;
top: 50%;
left: -32px;
transform: translateY(-50%);

display: flex;
justify-content: center;
align-items: center;

width: 64px;
height: 64px;
border-radius: 50%;
overflow: hidden;
background-color: white;

box-shadow: 0 4px 10px rgba(0, 0, 0, 0.09);
`;

export const ClubImage = styled.img`
width: 64px;
height: auto;
object-fit: cover;
`;

export const ClubTitle = styled.div`
Expand All @@ -60,7 +76,7 @@ export const ClubTitle = styled.div`
export const ClubDescription = styled.div`
display: flex;
flex-direction: column;
line-height: 1.35;
line-height: 1.4;
`;

export const ButtonGroup = styled.div`
Expand Down
30 changes: 25 additions & 5 deletions src/pages/ResultPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ import { Text } from "@/components/typography";

import { useResult } from "@/hooks/useResult";

import aaa from "@/assets/images/dongari.svg";
import clubs from "@/constants/clubs";

import {
ButtonGroup,
ClubDescription,
ClubImage,
ClubImageWrapper,
ClubItem,
ClubItems,
ClubTitle,
Expand All @@ -18,6 +19,7 @@ import {
ResultWrapper,
TitleContainer,
} from "./ResultPage.styled";
import { css } from "@emotion/react";

export default function ResultPage() {
const { name, mbti, result, navigate } = useResult();
Expand All @@ -42,16 +44,34 @@ export default function ResultPage() {

<ClubItems>
{result.clubs.map((club) => {
let clubData = clubs.find((c) => c.name === club);

if (!clubData) {
return null;
}

return (
<ClubItem>
<ClubTitle>{club}</ClubTitle>
<ClubTitle>{clubData.name}</ClubTitle>
<ClubDescription>
<Text size="xs">더 넓고, 더 깊은 바다로!</Text>
<Text
size="xs"
css={css`
padding-bottom: 0.25rem;
`}
>
{clubData.summary}
</Text>
<Text size="xs" weight="bold">
경북대학교 유일무이 스킨스쿠버 동아리
{clubData.description}
</Text>
</ClubDescription>
<ClubImage src={aaa} alt="수중탐사대" />
<ClubImageWrapper>
<ClubImage
src={new URL(`../assets/clubs/${clubData.name}.jpg`, import.meta.url).href}
alt={clubData.name}
/>
</ClubImageWrapper>
</ClubItem>
);
})}
Expand Down