Skip to content

Commit

Permalink
Merge pull request #570 from sopt-makers/develop
Browse files Browse the repository at this point in the history
프로덕션 배포
  • Loading branch information
100Gyeon authored Oct 21, 2023
2 parents 8ee4353 + e5ee571 commit 927ca32
Show file tree
Hide file tree
Showing 20 changed files with 945 additions and 77 deletions.
14 changes: 12 additions & 2 deletions pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import WriteIcon from '@assets/svg/write.svg';
import { useQueryMyProfile } from '@api/user/hooks';
import NoticeSlider from '@components/page/meetingList/Slider/NoticeSlider/NoticeSlider';
import useNotices from '@api/notice/hooks';
import { ampli } from '@/ampli';

const Home: NextPage = () => {
const router = useRouter();
Expand All @@ -30,6 +31,7 @@ const Home: NextPage = () => {
handleModalOpen();
return;
}
ampli.clickMakeGroup();
router.push('/make');
};

Expand All @@ -39,12 +41,20 @@ const Home: NextPage = () => {
<Flex align="start" justify="between">
<TabList text="all" size="big">
<Link href="/" passHref>
<a>
<a
onClick={() => {
ampli.clickNavbarGroup({ menu: '전체 모임' });
}}
>
<TabList.Item text="all">전체 모임</TabList.Item>
</a>
</Link>
<Link href="/mine" passHref>
<a>
<a
onClick={() => {
ampli.clickNavbarGroup({ menu: '내 모임' });
}}
>
<TabList.Item text="mine">내 모임</TabList.Item>
</a>
</Link>
Expand Down
3 changes: 3 additions & 0 deletions pages/make/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import { useRouter } from 'next/router';
import PlusIcon from '@assets/svg/plus.svg';
import { useMutation } from '@tanstack/react-query';
import dynamic from 'next/dynamic';
import { ampli } from '@/ampli';

const DevTool = dynamic(() => import('@hookform/devtools').then(module => module.DevTool), {
ssr: false,
});
Expand Down Expand Up @@ -41,6 +43,7 @@ const MakePage = () => {
const {
data: { meetingId },
} = await mutateCreateMeeting(formData);
ampli.completedMakeGroup();
alert('모임을 개설했습니다.');
router.push(`/detail?id=${meetingId}`);
};
Expand Down
19 changes: 15 additions & 4 deletions pages/mine/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { SSRSafeSuspense } from '@components/util/SSRSafeSuspense';
import { MeetingListOfApplied, MeetingListOfMine } from '@components/page/meetingList/Grid/List';
import GridLayout from '@components/page/meetingList/Grid/Layout';
import CardSkeleton from '@components/page/meetingList/Card/Skeleton';
import { ampli } from '@/ampli';

const enum MeetingType {
MADE,
Expand All @@ -26,12 +27,12 @@ const MinePage: NextPage = () => {
<Flex align="center" justify="between">
<TabList text="mine" size="big">
<Link href="/" passHref>
<a>
<a onClick={() => ampli.clickNavbarGroup({ menu: '전체 모임' })}>
<TabList.Item text="all">전체 모임</TabList.Item>
</a>
</Link>
<Link href="/mine" passHref>
<a>
<a onClick={() => ampli.clickNavbarGroup({ menu: '내 모임' })}>
<TabList.Item text="mine">내 모임</TabList.Item>
</a>
</Link>
Expand All @@ -40,10 +41,20 @@ const MinePage: NextPage = () => {
<Tab.Group selectedIndex={Number(selectedMeetingType)} onChange={setSelectedMeetingType}>
<STabList>
<Tab as={Fragment}>
<STab isSelected={Number(selectedMeetingType) === MeetingType.MADE}>내가 만든 모임</STab>
<STab
isSelected={Number(selectedMeetingType) === MeetingType.MADE}
onClick={() => ampli.clickMakebymeGroup()}
>
내가 만든 모임
</STab>
</Tab>
<Tab as={Fragment}>
<STab isSelected={Number(selectedMeetingType) === MeetingType.APPLIED}>내가 신청한 모임</STab>
<STab
isSelected={Number(selectedMeetingType) === MeetingType.APPLIED}
onClick={() => ampli.clickRegisteredGroup()}
>
내가 신청한 모임
</STab>
</Tab>
</STabList>

Expand Down
18 changes: 15 additions & 3 deletions pages/mine/management/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {
} from '@api/meeting/hooks';
import Filter from '@components/page/meetingManagement/Filter';
import DownloadIcon from '@assets/svg/download.svg';
import { ampli } from '@/ampli';

const ManagementPage = () => {
const router = useRouter();
Expand Down Expand Up @@ -52,7 +53,18 @@ const ManagementPage = () => {

const handleChangeSelectOption =
(setValue: (value: string | number) => void, optionList: Option[]) => (changeOption: Option) => {
setValue(optionList.findIndex(option => option.value === changeOption.value));
const changeOptionValue = String(changeOption.value);

switch (optionList) {
case numberOptionList:
ampli.filterListOptionManagement({ manage_listing_no: Number(changeOptionValue) });
break;
case sortOptionList:
ampli.filterManagementListOrder({ manage_sort: changeOptionValue });
break;
}

setValue(optionList.findIndex(option => option.value === changeOptionValue));
};

const handleCSVDownload = () => {
Expand All @@ -63,12 +75,12 @@ const ManagementPage = () => {
<SManagementPage>
<TabList text="mine" size="big">
<Link href="/" passHref>
<a>
<a onClick={() => ampli.clickNavbarGroup({ menu: '전체 모임' })}>
<TabList.Item text="all">전체 모임</TabList.Item>
</a>
</Link>
<Link href="/mine" passHref>
<a>
<a onClick={() => ampli.clickNavbarGroup({ menu: '내 모임' })}>
<TabList.Item text="mine">내 모임</TabList.Item>
</a>
</Link>
Expand Down
Loading

0 comments on commit 927ca32

Please sign in to comment.