Skip to content

Commit

Permalink
release-1.1.12
Browse files Browse the repository at this point in the history
  • Loading branch information
Leejha committed May 12, 2023
2 parents 6640032 + 4944fd6 commit 906b9ad
Show file tree
Hide file tree
Showing 34 changed files with 1,656 additions and 299 deletions.
631 changes: 631 additions & 0 deletions .pnp.cjs

Large diffs are not rendered by default.

12 changes: 0 additions & 12 deletions apps/web/app/[id]/layout.tsx

This file was deleted.

File renamed without changes.
2 changes: 2 additions & 0 deletions apps/web/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
import { GlobalStyles } from "styles/globalStyles";
import StyledComponentsRegistry from "../lib/registry";
import useReplaceUser from "hooks/useReplaceUser";
import Header from "components/common/header/Header";

function RootLayout({
// Layouts must accept a children prop.
Expand Down Expand Up @@ -37,6 +38,7 @@ function RootLayout({
<StyledComponentsRegistry>
<ThemeProvider theme={theme}>
<GlobalStyles />
<Header />
<Applayout>
<div id="stars" />
<div id="stars2" />
Expand Down
4 changes: 2 additions & 2 deletions apps/web/app/login/kakaoLoginProcess/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ function kakaoLoginProcess() {

const kakaoLogin = async () => {
try {
const { accessToken, newUser } = await kakaoLoginAPI({
const { accessToken, refreshToken, newUser } = await kakaoLoginAPI({
code,
redirectUrl: KAKAO_LOGIN_REDIRECT_URL,
});
userStorage.set(accessToken);
userStorage.set({ accessToken, refreshToken });
newUser ? router.push(Path.REGISTER_PAGE) : router.push(Path.MAIN_PAGE);
} catch (error) {
alert("에러가 발생하였습니다.");
Expand Down
12 changes: 0 additions & 12 deletions apps/web/app/login/layout.tsx

This file was deleted.

4 changes: 2 additions & 2 deletions apps/web/app/login/naverLoginProcess/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ function naverLoginProcess() {

const naverLogin = async () => {
try {
const { accessToken, newUser } = await naverLoginAPI({ code, state: "test" });
userStorage.set(accessToken);
const { accessToken, refreshToken, newUser } = await naverLoginAPI({ code, state: "test" });
userStorage.set({ accessToken, refreshToken });
newUser ? router.push(Path.REGISTER_PAGE) : router.push(Path.MAIN_PAGE);
} catch (error) {
alert("에러가 발생하였습니다.");
Expand Down
12 changes: 0 additions & 12 deletions apps/web/app/my/edit/layout.tsx

This file was deleted.

100 changes: 48 additions & 52 deletions apps/web/app/my/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import { media } from "@chooz/ui/styles/media";
import { useQuery } from "@tanstack/react-query";
import Header from "components/common/Header";
import ImageUploadButton from "components/common/ImageUploadButton";
import TabContainer from "components/my/TabContainer";
import VoteList from "components/my/VoteList";
Expand Down Expand Up @@ -44,57 +43,54 @@ function MyPage() {
const { countCreatedVote, countParticipatedVote, countBookmarkedVote } = voteCount;

return (
<>
<Header leftMenu="back" centerMenu="My page" rightMenu="logout" />;
<PageWrapper>
<PageInner>
<AddImageButtonWrapper>
<ImageUploadButton width="107px" height="107px" />
</AddImageButtonWrapper>
<Profile>
<UserInfo>
<>
{gender === Gender.MALE ? "남" : "여"}
<Divider />
{age}
<Divider />
{mbti}
</>
</UserInfo>
<Nickname>{username}</Nickname>
<ProfileModifyButton>
<Link href={Path.PROFILE_EDIT}>프로필 수정</Link>
</ProfileModifyButton>
</Profile>
{/* @TODO api 연결하면 map 사용 */}
<NumberOfVoteSection>
<NumberOfVoteContainer>
<NumberOfVote>{countCreatedVote}</NumberOfVote>
<NumberOfVoteText>작성한 투표</NumberOfVoteText>
</NumberOfVoteContainer>
<NumberOfVoteContainer>
<NumberOfVote>{countParticipatedVote}</NumberOfVote>
<NumberOfVoteText>참여한 투표</NumberOfVoteText>
</NumberOfVoteContainer>
<NumberOfVoteContainer>
<NumberOfVote>{countBookmarkedVote}</NumberOfVote>
<NumberOfVoteText>북마크 투표</NumberOfVoteText>
</NumberOfVoteContainer>
</NumberOfVoteSection>
</PageInner>
<TabContainerWrapper>
<TabContainer
tabList={MY_PAGE_VOTE_TYPE}
selectedTab={selectedTab}
onClickSelectedTab={onClickSelectedTab}
/>
</TabContainerWrapper>
<VoteListSection>
<VoteList voteList={voteList} />
<div ref={subscribe} />
</VoteListSection>
</PageWrapper>
</>
<PageWrapper>
<PageInner>
<AddImageButtonWrapper>
<ImageUploadButton width="107px" height="107px" />
</AddImageButtonWrapper>
<Profile>
<UserInfo>
<>
{gender === Gender.MALE ? "남" : "여"}
<Divider />
{age}
<Divider />
{mbti}
</>
</UserInfo>
<Nickname>{username}</Nickname>
<ProfileModifyButton>
<Link href={Path.PROFILE_EDIT}>프로필 수정</Link>
</ProfileModifyButton>
</Profile>
{/* @TODO api 연결하면 map 사용 */}
<NumberOfVoteSection>
<NumberOfVoteContainer>
<NumberOfVote>{countCreatedVote}</NumberOfVote>
<NumberOfVoteText>작성한 투표</NumberOfVoteText>
</NumberOfVoteContainer>
<NumberOfVoteContainer>
<NumberOfVote>{countParticipatedVote}</NumberOfVote>
<NumberOfVoteText>참여한 투표</NumberOfVoteText>
</NumberOfVoteContainer>
<NumberOfVoteContainer>
<NumberOfVote>{countBookmarkedVote}</NumberOfVote>
<NumberOfVoteText>북마크 투표</NumberOfVoteText>
</NumberOfVoteContainer>
</NumberOfVoteSection>
</PageInner>
<TabContainerWrapper>
<TabContainer
tabList={MY_PAGE_VOTE_TYPE}
selectedTab={selectedTab}
onClickSelectedTab={onClickSelectedTab}
/>
</TabContainerWrapper>
<VoteListSection>
<VoteList voteList={voteList} />
<div ref={subscribe} />
</VoteListSection>
</PageWrapper>
);
}

Expand Down
19 changes: 11 additions & 8 deletions apps/web/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { useToggle, useOutsideClick } from "@chooz/hooks";
import { Button, FloatModalTemplate } from "@chooz/ui";
import { media } from "@chooz/ui/styles/media";
import Header from "components/common/Header";
import Header from "components/common/header/Header";
import AddDetailModalContainer from "components/select/AddDetailModalContainer";
import useFlipAnimation, { Drag } from "components/select/hooks/useFlipAnimation";
import SelectAB from "components/select/SelectAB";
Expand All @@ -27,25 +27,28 @@ function SelectPage() {
const params = new URLSearchParams(searchParams);
const router = useRouter();
const { data, isError, isLoading, mainVoteList, nowShowing, onChangeNowShowing } =
useInfiniteMainListService(10, "ByTime");
useInfiniteMainListService(20, "ByTime");
const [toggleDetail, onChangeToggleDetail] = useToggle(false);
const [toggleMenu, onChangeToggleMenu] = useToggle(false);
const { targetEl } = useOutsideClick<HTMLImageElement>(toggleMenu, onChangeToggleMenu);
const { onActFlip, drag } = useFlipAnimation(onChangeNowShowing);
const { onActFlip, drag, onTouchMoveActFlip } = useFlipAnimation(onChangeNowShowing);
const { select, onMutateVoting } = useMutateVotingService(mainVoteList[nowShowing]?.voteId);

if (isLoading) return <PageInner drag={drag}>로딩중</PageInner>;
if (isError) return <PageInner drag={drag}>에러</PageInner>;
if (!data) return <PageInner drag={drag}>데이터 없음</PageInner>;

const { modifiedDate, title, imageA, imageB, titleA, titleB, detail, category } =
mainVoteList[nowShowing];

mainVoteList[nowShowing] || {};
return (
<>
<Header leftMenu="logo" rightMenu="menu" />
<PageWrapper>
<PageInner className="animate" onWheel={onActFlip} drag={drag}>
<PageInner
className="animate"
onWheel={onActFlip}
onTouchMove={onTouchMoveActFlip}
drag={drag}
>
<VoteToolbar
onChangeToggleDetail={onChangeToggleDetail}
onChangeToggleMenu={onChangeToggleMenu}
Expand All @@ -65,7 +68,7 @@ function SelectPage() {
/>
<AddDescriptionButton></AddDescriptionButton>
<DetailButton width="127px" height="48px" variant="primary" borderRadius="100px">
<Link href={`${Path.MAIN_PAGE}${mainVoteList[nowShowing].voteId}`}>
<Link href={`${Path.VOTE_DETAIL_PAGE}${mainVoteList[nowShowing].voteId}`}>
<DetailButtonInner>
<Image alt="자세히 보기" src={AmplifyIcon} width={40} height={40} /> 자세히 보기
</DetailButtonInner>
Expand Down
12 changes: 0 additions & 12 deletions apps/web/app/post/layout.tsx

This file was deleted.

12 changes: 0 additions & 12 deletions apps/web/app/tutorial/layout.tsx

This file was deleted.

12 changes: 0 additions & 12 deletions apps/web/app/vote-list/layout.tsx

This file was deleted.

Loading

1 comment on commit 906b9ad

@vercel
Copy link

@vercel vercel bot commented on 906b9ad May 12, 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-git-main-chooz.vercel.app
client-web-chooz.vercel.app
www.chooz.co.kr
chooz.co.kr

Please sign in to comment.