Skip to content

Commit

Permalink
MyTemplate -> MemberTemplate 으로 명칭 변경 (#982)
Browse files Browse the repository at this point in the history
  • Loading branch information
healim01 authored Dec 21, 2024
1 parent 591d843 commit 5bf8296
Show file tree
Hide file tree
Showing 36 changed files with 33 additions and 26 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/PagingButtons/PagingButtons.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Text } from '@/components';
import { trackMyTemplatePaging } from '@/service/amplitude/track';
import { trackMemberTemplatePaging } from '@/service/amplitude/track';
import { theme } from '@/style/theme';

import * as S from './PagingButtons.style';
Expand All @@ -19,7 +19,7 @@ const PagingButtons = ({ currentPage, paginationSizes, onPageChange }: Props) =>
};

const handlePagingClick = (page: number, label: string) => {
trackMyTemplatePaging({ page, label });
trackMemberTemplatePaging({ page, label });
onPageChange(page);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import styled from '@emotion/styled';
import { Input } from '@/components';
import { theme } from '@/style/theme';

export const MyTemplatePageContainer = styled.div`
export const MemberTemplatePageContainer = styled.div`
display: flex;
flex-direction: column;
`;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Suspense } from 'react';
import { useParams } from 'react-router-dom';

import { SORTING_OPTIONS } from '@/models/templates';
import { SearchIcon } from '@/assets/images';
import { Flex, Input, PagingButtons, Dropdown, Heading } from '@/components';
import { useAuth } from '@/hooks/authentication';
import { SORTING_OPTIONS } from '@/models/templates';
import {
CategoryListSection,
CategoryListSectionSkeleton,
Expand All @@ -14,19 +14,19 @@ import {
TemplateListSection,
TemplateListSectionLoading,
TopBanner,
} from '@/pages/MyTemplatesPage/components';
import { useFilteredTemplateList, useSelectAndDeleteTemplateList } from '@/pages/MyTemplatesPage/hooks';
} from '@/pages/MemberTemplatePage/components';
import { useFilteredTemplateList, useSelectAndDeleteTemplateList } from '@/pages/MemberTemplatePage/hooks';
import { useMemberNameQuery } from '@/queries/members';
import { useTrackPageViewed } from '@/service/amplitude';

import * as S from './MyTemplatePage.style';

const MyTemplatePage = () => {
useTrackPageViewed({ eventName: '[Viewed] 내 템플릿 페이지' });
import * as S from './MemberTemplatePage.style';

const MemberTemplatePage = () => {
const { memberId: routeMemberId } = useParams<{ memberId: string }>();
const memberId = Number(routeMemberId);

useTrackPageViewed({ eventName: `[Viewed] 맴버 (ID:${memberId}) 템플릿 페이지` });

const {
memberInfo: { memberId: currentMemberId },
} = useAuth();
Expand Down Expand Up @@ -66,7 +66,7 @@ const MyTemplatePage = () => {
} = useSelectAndDeleteTemplateList({ templateList });

return (
<S.MyTemplatePageContainer>
<S.MemberTemplatePageContainer>
<TopBanner name={name ?? ''} />
<S.MainContainer>
<Suspense fallback={<CategoryListSectionSkeleton />}>
Expand Down Expand Up @@ -140,8 +140,8 @@ const MyTemplatePage = () => {
)}
</Flex>
</S.MainContainer>
</S.MyTemplatePageContainer>
</S.MemberTemplatePageContainer>
);
};

export default MyTemplatePage;
export default MemberTemplatePage;
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { BooksIcon, Chevron2Icon, SettingIcon } from '@/assets/images';
import { Text } from '@/components';
import { useToggle, useWindowWidth } from '@/hooks';
import { useAuth } from '@/hooks/authentication';
import { CategoryEditModal } from '@/pages/MyTemplatesPage/components';
import { CategoryEditModal } from '@/pages/MemberTemplatePage/components';
import { ICON_SIZE } from '@/style/styleConstants';
import { theme } from '@/style/theme';
import type { Category } from '@/types';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CategoryFilterMenu } from '@/pages/MyTemplatesPage/components';
import { CategoryFilterMenu } from '@/pages/MemberTemplatePage/components';
import { useCategoryListQuery } from '@/queries/categories';

import * as S from './CategoryListSection.style';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TagFilterMenu } from '@/pages/MyTemplatesPage/components';
import { TagFilterMenu } from '@/pages/MemberTemplatePage/components';
import { useTagListQuery } from '@/queries/tags';

interface Props {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Button, Flex } from '@/components';
import { ConfirmDeleteModal } from '@/pages/MyTemplatesPage/components';
import { ConfirmDeleteModal } from '@/pages/MemberTemplatePage/components';

interface Props {
isEditMode: boolean;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { NoResults } from '@/components';
import { useWindowWidth } from '@/hooks';
import { NewTemplateButton, TemplateGrid } from '@/pages/MyTemplatesPage/components';
import { NewTemplateButton, TemplateGrid } from '@/pages/MemberTemplatePage/components';
import { TemplateListItem } from '@/types';

interface Props {
Expand All @@ -14,11 +14,18 @@ interface Props {

const getGridCols = (windowWidth: number) => (windowWidth <= 1024 ? 1 : 2);

const TemplateListSection = ({ templateList, isSearching, isEditMode, isMine, selectedList, setSelectedList }: Props) => {
const TemplateListSection = ({
templateList,
isSearching,
isEditMode,
isMine,
selectedList,
setSelectedList,
}: Props) => {
const windowWidth = useWindowWidth();

if (templateList.length === 0) {
if (!isMine || isSearching) return <NoResults>검색 결과가 없습니다.</NoResults>
if (!isMine || isSearching) return <NoResults>검색 결과가 없습니다.</NoResults>;
return <NewTemplateButton />;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Flex, Heading, LoadingBall, NoResults, PagingButtons, TemplateCard } fr
import { useQueryParams, useWindowWidth } from '@/hooks';
import { useAuth } from '@/hooks/authentication';
import { ForbiddenPage } from '@/pages';
import { TemplateListSectionLoading } from '@/pages/MyTemplatesPage/components';
import { TemplateListSectionLoading } from '@/pages/MemberTemplatePage/components';
import { useLikedTemplateListQuery } from '@/queries/templates/useLikedTemplateListQuery';
import { ROUTE_END_POINT } from '@/routes/endPoints';
import { useTrackPageViewed } from '@/service/amplitude';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
} from '@/components';
import { useDropdown, useInput, useQueryParams, useWindowWidth } from '@/hooks';
import { SORTING_OPTIONS } from '@/models/templates';
import { TemplateListSectionLoading } from '@/pages/MyTemplatesPage/components';
import { TemplateListSectionLoading } from '@/pages/MemberTemplatePage/components';
import { HotTopicCarousel } from '@/pages/TemplateExplorePage/components';
import { useHotTopic } from '@/pages/TemplateExplorePage/hooks';
import { useTemplateExploreQuery } from '@/queries/templates';
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export { default as LandingPage } from './LandingPage/LandingPage';
export { default as LoginPage } from './LoginPage/LoginPage';
export { default as MyTemplatePage } from './MyTemplatesPage/MyTemplatePage';
export { default as MemberTemplatePage } from './MemberTemplatePage/MemberTemplatePage';
export { default as MyLikedTemplatePage } from './MyLikedTemplatePage/MyLikedTemplatePage';
export { default as NotFoundPage } from './NotFoundPage/NotFoundPage';
export { default as ForbiddenPage } from './ForbiddenPage/ForbiddenPage';
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/routes/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const SignupPage = lazy(() => import('@/pages/SignupPage/SignupPage'));
const LoginPage = lazy(() => import('@/pages/LoginPage/LoginPage'));
const NotFoundPage = lazy(() => import('@/pages/NotFoundPage/NotFoundPage'));
const TemplateExplorePage = lazy(() => import('@/pages/TemplateExplorePage/TemplateExplorePage'));
const MyTemplatePage = lazy(() => import('@/pages/MyTemplatesPage/MyTemplatePage'));
const MemberTemplatePage = lazy(() => import('@/pages/MemberTemplatePage/MemberTemplatePage'));
const MyLikedTemplatePage = lazy(() => import('@/pages/MyLikedTemplatePage/MyLikedTemplatePage'));

const router = createBrowserRouter([
Expand All @@ -26,7 +26,7 @@ const router = createBrowserRouter([
},
{
path: ROUTE_END_POINT.MEMBERS_TEMPLATES,
element: <MyTemplatePage />,
element: <MemberTemplatePage />,
},
{
path: ROUTE_END_POINT.MEMBERS_LIKED_TEMPLATES,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/service/amplitude/track.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ interface PagingButtonData {
label: string;
}

export const trackMyTemplatePaging = ({ page, label }: PagingButtonData) => {
export const trackMemberTemplatePaging = ({ page, label }: PagingButtonData) => {
amplitudeService.customTrack('[Click] 페이징 버튼', {
page,
label,
Expand Down

0 comments on commit 5bf8296

Please sign in to comment.