Skip to content

Commit

Permalink
release-1.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Leejha committed Mar 15, 2023
2 parents 1c13dd3 + f2cde6c commit b9ed2b3
Show file tree
Hide file tree
Showing 65 changed files with 1,122 additions and 173 deletions.
70 changes: 35 additions & 35 deletions .pnp.cjs

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions apps/web/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"typescript.tsdk": "../../.yarn/cache/typescript-patch-b74a6ef84c-37f6e2c3c5.zip/node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true
}
4 changes: 2 additions & 2 deletions apps/web/app/login/kakaoLoginProcess/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import { kakaoLoginAPI } from "lib/api/auth";
import { kakaoLoginAPI } from "lib/apis/auth";
import { KAKAO_LOGIN_REDIRECT_URL } from "lib/constants";
import Path from "lib/Path";
import userStorage from "lib/utils/userStorage";
Expand All @@ -25,7 +25,7 @@ function kakaoLoginProcess() {
redirectUrl: KAKAO_LOGIN_REDIRECT_URL,
});
userStorage.set(accessToken);
newUser ? router.push(Path.REGISTER_PAGE) : router.push(Path.LIST_PAGE);
newUser ? router.push(Path.REGISTER_PAGE) : router.push(Path.MAIN_PAGE);
} catch (error) {
alert("에러가 발생하였습니다.");
}
Expand Down
4 changes: 2 additions & 2 deletions apps/web/app/login/naverLoginProcess/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import { naverLoginAPI } from "lib/api/auth";
import { naverLoginAPI } from "lib/apis/auth";
import Path from "lib/Path";
import userStorage from "lib/utils/userStorage";
import { useEffect } from "react";
Expand All @@ -21,7 +21,7 @@ function naverLoginProcess() {
try {
const { accessToken, newUser } = await naverLoginAPI({ code, state: "test" });
userStorage.set(accessToken);
newUser ? router.push(Path.REGISTER_PAGE) : router.push(Path.LIST_PAGE);
newUser ? router.push(Path.REGISTER_PAGE) : router.push(Path.MAIN_PAGE);
} catch (error) {
alert("에러가 발생하였습니다.");
}
Expand Down
10 changes: 6 additions & 4 deletions apps/web/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
"use client";

import Path from "lib/Path";
import Link from "next/link";
import styled from "styled-components";

export default function Home() {
return (
<PageLayout>
<Link href="/login">로그인 하러가기</Link>
<Link href="/register">회원가입 하러가기</Link>
<Link href="/register/interest">관심사 보러가기</Link>
<Link href="/post">투표 글쓰기 보러가기</Link>
<Link href={Path.LOGIN_PAGE}>로그인 하러가기</Link>
<Link href={Path.REGISTER_PAGE}>회원가입 하러가기</Link>
<Link href={Path.REGISTER_INTERSTER_PAGE}>관심사 보러가기</Link>
<Link href={Path.POST_PAGE}>투표 글쓰기 보러가기</Link>
<Link href="/select/1">선택 페이지 보러가기</Link>
<Link href={Path.VOTE_LIST_PAGE}>투표 리스트 보러가기</Link>
</PageLayout>
);
}
Expand Down
82 changes: 82 additions & 0 deletions apps/web/app/select/[id]/detail/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
"use client";

import { media } from "@chooz/ui/styles/media";
import CommentContainer from "components/detail/CommentContainer";
import DetailAB from "components/detail/DetailAB";
import FilterBar from "components/detail/FilterBar";
import VoteAnalyzeBar from "components/detail/VoteAnalyzeBar";
import VoteToolbar from "components/select/VoteToolbar";
import useOutSideClick from "hooks/useOutsideClick";
import useToggle from "hooks/useToggle";
import { Eximg1, Eximg2 } from "public/images";
import React, { useState } from "react";
import styled from "styled-components";

function DetailPage() {
const [toggleDetail, onChangeToggleDetail] = useToggle(false);
const [toggleMenu, onChangeToggleMenu] = useToggle(false);
const { targetEl } = useOutSideClick<HTMLImageElement>(toggleMenu, onChangeToggleMenu);

//데이터
const [select, setSelect] = useState<"A" | "B">("A");
return (
<PageWrapper>
<PageInner>
<VoteToolbar
onChangeToggleDetail={onChangeToggleDetail}
onChangeToggleMenu={onChangeToggleMenu}
toggleMenu={toggleMenu}
targetEl={targetEl}
/>
<DetailAB
imageA={Eximg1}
titleA="아이보리 트위드2"
imageB={Eximg2}
titleB="핑크 원피스"
select={select}
/>
<FilterBar />
<VoteAnalyzeBar A={50} B={50} select={select} />
<VoteDetail>
전남친이 오는 결혼식장에 하객으로 갑니다...
<br /> 여러분의 혜안이 필요해요
<br />
<br />
<br />
근데 왼쪽이 5만원 더 비싸긴 합니다...
</VoteDetail>
<CommentContainer />
</PageInner>
</PageWrapper>
);
}

const PageWrapper = styled.div`
position: relative;
width: 100%;
display: flex;
justify-content: center;
scrollbar-width: none;
`;

const PageInner = styled.div`
position: relative;
margin: 0 auto;
border-radius: 4px;
background-color: ${({ theme }) => theme.palette.background.white};
max-width: 640px;
width: 100%;
position: relative;
padding: 30px;
z-index: 1000;
${media.medium} {
padding: 40px;
}
`;

const VoteDetail = styled.div`
${({ theme }) => theme.fontSize.xSmall};
padding-bottom: 36px;
`;

export default DetailPage;
80 changes: 16 additions & 64 deletions apps/web/app/select/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@

import { Button, FloatModalTemplate } from "@chooz/ui";
import { media } from "@chooz/ui/styles/media";
import NumberOfSolver from "components/common/NumberOfSolver";
import TargetMessage from "components/common/TargetMessage";
import AddDetailModal from "components/select/AddDetailModal";
import useFlipAnimation, { Drag } from "components/select/hooks/useFlipAnimation";
import MenuBox from "components/select/MenuBox";
import SelectAB from "components/select/SelectAB";
import VoteToolbar from "components/select/VoteToolbar";
import useOutSideClick from "hooks/useOutsideClick";
import useToggle from "hooks/useToggle";
import Image from "next/image";
import { AmplifyIcon, HambergerIcon, SaveIcon } from "public/icons";
import Link from "next/link";
import { AmplifyIcon } from "public/icons";
import { Eximg1, Eximg2, Success } from "public/images";
import React, { useState } from "react";
import useModifyVoteService from "services/useModifyVoteService";
Expand All @@ -23,7 +22,7 @@ function SelectPage() {
const [toggleDetail, onChangeToggleDetail] = useToggle(false);
const [toggleMenu, onChangeToggleMenu] = useToggle(false);
const { onChangeVote, onChangeVoteByClick, mutateVote, vote } = useModifyVoteService();
const { targetEl } = useOutSideClick(toggleMenu, onChangeToggleMenu);
const { targetEl } = useOutSideClick<HTMLImageElement>(toggleMenu, onChangeToggleMenu);
const { onAniamteFlip, drag } = useFlipAnimation();

const [select, setSelect] = useState<"A" | "B" | null>(null);
Expand All @@ -34,29 +33,13 @@ function SelectPage() {
<>
<PageWrapper>
<PageInner className="animate" onWheel={onAniamteFlip} drag={drag}>
<TagRow>
<FlexRow>
<NumberOfSolver>🔥3,645명 해결중!</NumberOfSolver>
<TargetMessage>당신을 기다렸어요</TargetMessage>
</FlexRow>
<FlexRow>
<Image src={SaveIcon} alt="저장하기" width={32} height={32} />
<div ref={targetEl}>
<Image
src={HambergerIcon}
alt="매뉴"
width={32}
height={32}
onClick={onChangeToggleMenu}
/>
</div>
</FlexRow>
</TagRow>
<TitleRow>
<div>무엇이 좋을까요? 공백포함 34자 정도까지네요 여기까지입니다요</div>
<DateText>22.02.03</DateText>
{toggleMenu && <MenuBox onChangeToggleDetail={onChangeToggleDetail} />}
</TitleRow>
<VoteToolbar
onChangeToggleDetail={onChangeToggleDetail}
onChangeToggleMenu={onChangeToggleMenu}
toggleMenu={toggleMenu}
targetEl={targetEl}
/>

<SelectAB
imageA={Eximg1}
titleA="아이보리 트위드2"
Expand All @@ -67,9 +50,11 @@ function SelectPage() {
/>
<AddDescriptionButton></AddDescriptionButton>
<DetailButton width="127px" height="48px" variant="primary" borderRadius="100px">
<DetailButtonInner>
<Image alt="자세히 보기" src={AmplifyIcon} width={40} height={40} /> 자세히 보기
</DetailButtonInner>
<Link href="select/1/detail">
<DetailButtonInner>
<Image alt="자세히 보기" src={AmplifyIcon} width={40} height={40} /> 자세히 보기
</DetailButtonInner>
</Link>
</DetailButton>
{/* 자세히 보기 */}
</PageInner>
Expand Down Expand Up @@ -188,32 +173,6 @@ const SecondPageBase = styled(FirstPageBase)`
`}
`;

const DateText = styled.div`
${({ theme }) => theme.textStyle.Title_Small}
color: ${({ theme }) => theme.palette.ink.light};
font-weight: 400;
font-family: NeoDunggeunmo, Pretendard Variable, -apple-system, BlinkMacSystemFont, system-ui,
Roboto, "Helvetica Neue";
`;

const TagRow = styled.div`
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 12px;
`;

const TitleRow = styled.div`
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
margin: 8px 0 11px 0;
${({ theme }) => theme.textStyle.Title_Small}
font-weight: 700;
`;

const AddDescriptionButton = styled.div`
position: absolute;
bottom: 30px;
Expand All @@ -231,13 +190,6 @@ const AddDescriptionButton = styled.div`
cursor: pointer;
`;

const FlexRow = styled.div`
position: relative;
display: flex;
align-items: center;
gap: 4px;
`;

const GuideText = styled.div`
color: ${({ theme }) => theme.palette.background.white};
${({ theme }) => theme.textStyle.Title_Large}
Expand Down
13 changes: 9 additions & 4 deletions apps/web/app/voteList/page.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
"use client";

import VoteItem from "components/voteList/VoteItem";
import { VoteList } from "components/voteList";
import { CATEGORY_LIST } from "lib/constants";
import { FilterIcon } from "public/icons";
import useInfiniteVoteListService from "services/useInfiniteVoteListService";
import styled from "styled-components";
import { media } from "styles/media";

function VoteListPage() {
const { voteList, subscribe } = useInfiniteVoteListService({
size: 3,
sortBy: "ByTime",
});

return (
<PageWrapper>
<PageInner>
Expand All @@ -21,9 +27,8 @@ function VoteListPage() {
필터
</FilterBox>
</FilterContainer>
<VoteItem />
<VoteItem />
<VoteItem />
<VoteList voteList={voteList} />
<div ref={subscribe} />
</PageInner>
</PageWrapper>
);
Expand Down
2 changes: 1 addition & 1 deletion apps/web/components/common/NumberOfSolver.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function NumberOfSolver({ children }: Props) {
return <Message>{children}</Message>;
}

const Message = styled.div`
const Message = styled.span`
display: flex;
align-items: center;
justify-content: center;
Expand Down
4 changes: 2 additions & 2 deletions apps/web/components/common/TargetMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ function TargetMessage({ children }: Props) {
return <Message>{children}</Message>;
}

const Message = styled.div`
const Message = styled.span`
display: flex;
justify-content: center;
align-items: center;
padding: 6px 10px;
padding: 4.4px 6px 4.4px;
height: 24px;
border-radius: 4px;
background-color: ${({ theme }) => theme.palette.main.point};
Expand Down
Loading

1 comment on commit b9ed2b3

@vercel
Copy link

@vercel vercel bot commented on b9ed2b3 Mar 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

client-web – ./

client-web-chooz.vercel.app
chooz.co.kr
client-web-git-main-chooz.vercel.app

Please sign in to comment.