Skip to content

Commit

Permalink
Release/v1.4.9
Browse files Browse the repository at this point in the history
Release/v1.4.9
  • Loading branch information
dev-dong-su authored Apr 4, 2024
2 parents db723e6 + b569746 commit a3b1090
Show file tree
Hide file tree
Showing 220 changed files with 593 additions and 532 deletions.
3 changes: 2 additions & 1 deletion packages/web/src/apis/auth/queries.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Keys, NicknameDuplicateResponse, getNicknameDuplicate, getSchoolSearch } from '.';
import { useQuery, useSuspenseQuery } from '@tanstack/react-query';

import { Keys, NicknameDuplicateResponse, getNicknameDuplicate, getSchoolSearch } from '.';

export const useGetSearchSchool = (searchWord: string) =>
useSuspenseQuery({
queryKey: Keys.getSchoolSearch(searchWord),
Expand Down
3 changes: 2 additions & 1 deletion packages/web/src/apis/common/mutations.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { postFiles } from './apis';
import { useMutation } from '@tanstack/react-query';

import { postFiles } from './apis';

export const usePostFiles = () => {
return useMutation({ mutationFn: postFiles });
};
4 changes: 1 addition & 3 deletions packages/web/src/apis/config/privateApi.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import axios, { AxiosError, AxiosResponse, type InternalAxiosRequestConfig } from 'axios';

import { postReissue } from '../auth';

import type { CustomInstance, ErrorType } from './type';

import { BASE_API_URL } from '@/constants';
Expand All @@ -19,7 +17,7 @@ privateApi.defaults.timeout = 2500;
privateApi.interceptors.request.use(
async (config: InternalAxiosRequestConfig) => {
try {
const { accessToken, refreshToken } = await getTokenFromCookie();
const { accessToken } = await getTokenFromCookie();
config.headers['X-AUTH-TOKEN'] = accessToken;
return config;
} catch (error) {
Expand Down
6 changes: 3 additions & 3 deletions packages/web/src/apis/groups/mutations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import { GroupDetailResponse } from './type';
import { MeetingScrapResponse } from '../meeting';
import { Keys as MeetingKeys } from '../meeting/keys';

import FeedbackCompleteModal from '@/app/[lng]/(main)/meeting/participate/feedback/[groupId]/funnels/step3/FeedbackCompleteModal.client';
import FeedbackCompleteModal from '@/app/[lng]/(main)/meeting/participate/feedback/[groupId]/funnels/step3/FeedbackCompleteModal';
import useAppRouter from '@/hooks/useAppRouter';
import { useModal } from '@/hooks/useModal';
import useModal from '@/hooks/useModal/useModal';

export const usePostCreateGroup = () => {
const { replace } = useAppRouter();
Expand All @@ -30,7 +30,7 @@ export const usePostCreateGroup = () => {
mutationFn: postCreateGroup,
onSuccess: (data) => {
queryClient.resetQueries({ queryKey: GroupsKeys.getGroups() });
replace(`/grouping/${data.groupId}?tab=detail`);
replace(`/grouping/detail/${data.groupId}?tab=detail`);
},
});
};
Expand Down
3 changes: 2 additions & 1 deletion packages/web/src/apis/meeting/mutations.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { postMeetingRejected } from '.';
import { useMutation } from '@tanstack/react-query';

import { postMeetingRejected } from '.';

export const usePostApply = () => useMutation({ mutationFn: postMeetingRejected });
3 changes: 2 additions & 1 deletion packages/web/src/apis/meeting/queries.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { useSuspenseQuery } from '@tanstack/react-query';

import {
getMeetingHosting,
getMeetingNotEstimated,
Expand All @@ -7,7 +9,6 @@ import {
getMeetingWaiting,
} from '.';
import { Keys } from './keys';
import { useSuspenseQuery } from '@tanstack/react-query';

export const useGetExample = () => {};

Expand Down
3 changes: 2 additions & 1 deletion packages/web/src/apis/notifications/mutations.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { postFCMToken } from './apis';
import { useMutation } from '@tanstack/react-query';

import { postFCMToken } from './apis';

export const usePostFCMToken = () => {
return useMutation({ mutationFn: postFCMToken });
};
3 changes: 2 additions & 1 deletion packages/web/src/apis/notifications/queries.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Keys, getNotification } from '.';
import { useSuspenseQuery } from '@tanstack/react-query';

import { Keys, getNotification } from '.';

export const useGetNotifications = () =>
useSuspenseQuery({ queryKey: Keys.getNotifications(), queryFn: getNotification });
4 changes: 3 additions & 1 deletion packages/web/src/apis/profile/mutations.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { useMutation, useQueryClient } from '@tanstack/react-query';

import { Keys, deleteMate, patchProfile, patchSignOut, postEmailVerify } from '.';

import useAppRouter from '@/hooks/useAppRouter';
import { useMutation, useQueryClient } from '@tanstack/react-query';

export const usePatchProfile = () => {
const queryClient = useQueryClient();
Expand Down
3 changes: 2 additions & 1 deletion packages/web/src/apis/profile/queries.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Keys, getMates, getPraises, getProfile, getProfileById } from '.';
import { useSuspenseQuery } from '@tanstack/react-query';

import { Keys, getMates, getPraises, getProfile, getProfileById } from '.';

export const useGetProfile = () =>
useSuspenseQuery({
queryKey: Keys.getProfile(),
Expand Down
3 changes: 3 additions & 0 deletions packages/web/src/app/[lng]/(main)/chat/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function ChatPage() {
return <div></div>;
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -47,26 +47,18 @@ export default function ArticleItem({ articleData, onClick }: ArticleItemProps)
likeCount,
isLiked,
createdAt,
isWriter,
userId,
thumbnail,
category,
} = article;

const {
id: writerId,
isCertifiedStudent,
reliabilityLevel,
nickName,
countryName,
countryImage,
profileImage,
} = writer;
const { isCertifiedStudent, reliabilityLevel, nickName, countryImage, profileImage } = writer;

const locale = i18n.language === 'ko' ? ko : enUS;

return (
<div className="p-20" onClick={onClick || (() => push(`/community/${articleId}`, false))}>
<div
className="p-20"
onClick={onClick || (() => push(`/community/detail/${articleId}`, false))}
>
<Flex justify="between" align="center">
<ArticleBadge type={category.name}>{t(`category.${category.name}`)}</ArticleBadge>
<p className="text-caption text-sign-tertiary">{formatDate(createdAt, locale)}</p>
Expand All @@ -80,7 +72,7 @@ export default function ArticleItem({ articleData, onClick }: ArticleItemProps)
</div>
{!!images?.length && (
<div className="rounded-8 relative h-80 w-80 shrink-0 overflow-hidden">
<Image src={images[0]} alt="이미지" fill className="object-cover" />
<Image src={images[0]} alt="이미지" sizes="80px" fill className="object-cover" />
</div>
)}
</Flex>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@ import { useGetCommunityArticles } from '@/apis/community/queries';
import { ItemList } from '@/components/List';
import { useBlockStore } from '@/store/useBlockStore';

export default function LanguageContent() {
interface CommunityArticle {
categoryId: number;
}

export default function CommunityArticles({ categoryId }: CommunityArticle) {
const { ref, inView } = useInView();
const { blockCommunityArticleIds } = useBlockStore();
const { data: articleList, fetchNextPage, hasNextPage } = useGetCommunityArticles(3);
const { data: articleList, fetchNextPage, hasNextPage } = useGetCommunityArticles(categoryId);

useEffect(() => {
if (inView && hasNextPage) fetchNextPage();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
'use client';
import dynamic from 'next/dynamic';
import { Suspense } from 'react';

import CommunityArticles from './CommunityArticles';

import { useTranslation } from '@/app/i18n/client';
import { Loading } from '@/components/Loading';
import { Tabs } from '@/components/Tabs';

const AllContent = dynamic(() => import('./AllContent'));
const KpopContent = dynamic(() => import('./KpopContent'));
const LanguageContent = dynamic(() => import('./LanguageContent'));
const QuestionContent = dynamic(() => import('./QuestionContent'));

export default function ContentSection() {
const { t } = useTranslation('community');

Expand All @@ -24,22 +20,22 @@ export default function ContentSection() {
</Tabs.List>
<Tabs.Panel value="all">
<Suspense fallback={<Loading />}>
<AllContent />
<CommunityArticles categoryId={0} />
</Suspense>
</Tabs.Panel>
<Tabs.Panel value="kpop">
<Suspense fallback={<Loading />}>
<KpopContent />
<CommunityArticles categoryId={1} />
</Suspense>
</Tabs.Panel>
<Tabs.Panel value="question">
<Suspense fallback={<Loading />}>
<QuestionContent />
<CommunityArticles categoryId={2} />
</Suspense>
</Tabs.Panel>
<Tabs.Panel value="language">
<Suspense fallback={<Loading />}>
<LanguageContent />
<CommunityArticles categoryId={3} />
</Suspense>
</Tabs.Panel>
</Tabs>
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { DropDownOptionType } from '@/components/DropDown/DropDown';
import { Header } from '@/components/Header';
import { Icon } from '@/components/Icon';
import useAppRouter from '@/hooks/useAppRouter';
import { useModal } from '@/hooks/useModal';
import useModal from '@/hooks/useModal/useModal';
import { useNumberParams } from '@/hooks/useNumberParams';
import { useBlockStore } from '@/store/useBlockStore';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { Flex } from '@/components/Layout';
import { Loading } from '@/components/Loading';
import { ImageModal } from '@/components/Modal';
import { Spacing } from '@/components/Spacing';
import { useModal } from '@/hooks/useModal';
import useModal from '@/hooks/useModal/useModal';
import cn from '@/utils/cn';
import { getLocalCookie } from '@/utils/cookieController';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { Icon } from '@/components/Icon';
import { Flex } from '@/components/Layout';
import { Loading } from '@/components/Loading';
import { Spacing } from '@/components/Spacing';
import { useModal } from '@/hooks/useModal';
import useModal from '@/hooks/useModal/useModal';
import { useBlockStore } from '@/store/useBlockStore';
import cn from '@/utils/cn';
import { getLocalCookie } from '@/utils/cookieController';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { Icon } from '@/components/Icon';
import { Flex } from '@/components/Layout';
import { Loading } from '@/components/Loading';
import { Spacing } from '@/components/Spacing';
import { useModal } from '@/hooks/useModal';
import useModal from '@/hooks/useModal/useModal';
import { useBlockStore } from '@/store/useBlockStore';
import cn from '@/utils/cn';
import { getLocalCookie } from '@/utils/cookieController';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Reply } from '@/apis/community';
import ReplyItem from '@/app/[lng]/(main)/community/[articleId]/components/ReplyItem';
import ReplyItem from '@/app/[lng]/(main)/community/detail/[articleId]/components/ReplyItem';
import { ItemList } from '@/components/List';
import { useBlockStore } from '@/store/useBlockStore';

Expand Down
Loading

0 comments on commit a3b1090

Please sign in to comment.