Skip to content

Commit

Permalink
feat(client): 부마위키, 식견 프로모션 inline banner 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
SEOKKAMONI committed Apr 28, 2024
1 parent 2d5d8f3 commit c47d50a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion apps/client/src/app/profile/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use client';

import styled from '@emotion/styled';
import { InlineBanner } from '@sickgyun/ui';
import { isNil } from 'lodash';
import { useRouter, useSearchParams } from 'next/navigation';
import { useEffect } from 'react';
Expand All @@ -11,12 +12,13 @@ import ProfileList from '@/components/profile/ProfileList';
import ProfileNavigationBar from '@/components/profile/ProfileNavigationBar';
import { withAuth } from '@/hocs/withAuth';
import type { GetProfileListParams } from '@/hooks/api/profile/useGetProfileList';
import type { Major } from '@/types/profile';
import type { Major, Promotion } from '@/types/profile';

const ProfilePage = () => {
const router = useRouter();
const params = useSearchParams();
const major = params.get('major') as Major;
const promotion = params.get('promotion') as Promotion;
const { register, setValue, watch } = useForm<GetProfileListParams>({
defaultValues: {
major: major ?? 'ALL',
Expand All @@ -37,6 +39,11 @@ const ProfilePage = () => {
<Header />
<StyledProfilePageLayout>
<ProfileNavigationBar register={register} setValue={setValue} watch={watch} />
{promotion === 'BUMAWIKI' ? (
<InlineBanner>지금 바로 부마위키 개발자와 커피챗을 나눠보세요!</InlineBanner>
) : promotion === 'SICKGYUN' ? (
<InlineBanner>지금 바로 식견 팀과 커피챗을 나눠보세요!</InlineBanner>
) : null}
<StyledProfilePage>
<ProfileList
major={watch('major')}
Expand Down

0 comments on commit c47d50a

Please sign in to comment.