Skip to content

Commit 81b1af2

Browse files
authored
Merge pull request #528 from depromeet/develop
배포용 pr
2 parents a4f7ebb + 1599fd0 commit 81b1af2

File tree

8 files changed

+64
-14
lines changed

8 files changed

+64
-14
lines changed

src/app/home/FollowList.tsx

+20
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1+
import Link from 'next/link';
12
import { useRouter, useSearchParams } from 'next/navigation';
23
import { useFollowMembers } from '@/apis/follow';
34
import UserProfile from '@/app/home/UserProfile';
45
import { type FollowDataState } from '@/app/page';
6+
import Icon from '@/components/Icon';
57
import MotionDiv from '@/components/Motion/MotionDiv';
68
import { EVENT_LOG_CATEGORY, EVENT_LOG_NAME } from '@/constants/eventLog';
9+
import { ROUTER } from '@/constants/router';
10+
import { css } from '@/styled-system/css';
711
import { flex } from '@/styled-system/patterns';
812
import { eventLogger } from '@/utils';
913

@@ -41,6 +45,9 @@ function FollowList() {
4145
/>
4246
</MotionDiv>
4347
))}
48+
<Link href={ROUTER.SEARCH.HOME} className={plusWrapperCss}>
49+
<Icon name="plus" size={18} color="purple.purple400" />
50+
</Link>
4451
</section>
4552
);
4653
}
@@ -58,3 +65,16 @@ const containerCss = flex({
5865
display: 'none',
5966
},
6067
});
68+
69+
const plusWrapperCss = css({
70+
backgroundColor: 'purple.purple000',
71+
width: '28px',
72+
height: '28px',
73+
borderRadius: '12px',
74+
flex: 0,
75+
display: 'flex',
76+
justifyContent: 'center',
77+
alignItems: 'center',
78+
minWidth: '28px',
79+
marginTop: '12px',
80+
});

src/app/home/FollowMissionList.tsx

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import Link from 'next/link';
22
import { useFollowMissions } from '@/apis/follow';
3-
import { MissionListSkeleton } from '@/app/home/home.styles';
43
import MissionBadge from '@/app/home/MissionBadge';
54
import Empty from '@/components/Empty/Empty';
65
import { TwoLineListItem } from '@/components/ListItem';
6+
import { stagger } from '@/components/Motion/Motion.constants';
77
import StaggerWrapper from '@/components/Motion/StaggerWrapper';
88
import { EVENT_LOG_CATEGORY, EVENT_LOG_NAME } from '@/constants/eventLog';
99
import { MISSION_CATEGORY_LABEL } from '@/constants/mission';
@@ -52,14 +52,14 @@ const listCss = flex({
5252
});
5353

5454
export function MissionFollowListInner({ followId }: { followId: number }) {
55-
const { data, isLoading } = useFollowMissions(followId);
56-
if (isLoading) {
57-
return (
58-
<ul className={listCss}>
59-
<MissionListSkeleton />
60-
</ul>
61-
);
62-
}
55+
const { data } = useFollowMissions(followId);
56+
// if (isLoading) {
57+
// return (
58+
// <ul className={listCss}>
59+
// <MissionListSkeleton />
60+
// </ul>
61+
// );
62+
// }
6363

6464
if (!data) {
6565
return null;
@@ -74,7 +74,7 @@ export function MissionFollowListInner({ followId }: { followId: number }) {
7474
}
7575

7676
return (
77-
<StaggerWrapper wrapperOverrideCss={listCss}>
77+
<StaggerWrapper wrapperOverrideCss={listCss} staggerVariants={stagger(0.02)}>
7878
{data.followMissions.map((item) => {
7979
const status = item.missionStatus;
8080

src/app/home/MissionInnerList.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { MissionListSkeleton } from '@/app/home/home.styles';
55
import MissionBadge from '@/app/home/MissionBadge';
66
import MissionEmptyList from '@/app/home/MissionEmptyList';
77
import { TwoLineListItem } from '@/components/ListItem';
8+
import { stagger } from '@/components/Motion/Motion.constants';
89
import StaggerWrapper from '@/components/Motion/StaggerWrapper';
910
import { MISSION_CATEGORY_LABEL } from '@/constants/mission';
1011
import { ROUTER } from '@/constants/router';
@@ -26,7 +27,7 @@ function MissionListInner() {
2627
}
2728

2829
return (
29-
<StaggerWrapper wrapperOverrideCss={listCss}>
30+
<StaggerWrapper wrapperOverrideCss={listCss} staggerVariants={stagger(0.02)}>
3031
{missionList.map((item) => {
3132
const isProgressingMission = progressMissionId === String(item.missionId);
3233
const status = isProgressingMission ? MissionStatus.PROGRESSING : item.missionStatus;

src/app/home/MissionList.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { css } from '@/styled-system/css';
99
import { flex } from '@/styled-system/patterns';
1010
import { eventLogger } from '@/utils';
1111

12-
function Header() {
12+
function MissionListHeader() {
1313
const handlePlusClick = () => {
1414
eventLogger.logEvent(EVENT_LOG_CATEGORY.HOME, EVENT_LOG_NAME.HOME.CLICK_PLUS_BUTTON);
1515
};
@@ -18,7 +18,7 @@ function Header() {
1818
<h2 className={headingCss}>
1919
<span>내 미션 목록</span>
2020
<Link href={ROUTER.MISSION.NEW} onClick={handlePlusClick}>
21-
<Icon name="plus" size={20} />
21+
<Icon name="plus" size={20} color="icon.primary" />
2222
</Link>
2323
</h2>
2424
);
@@ -27,7 +27,7 @@ function Header() {
2727
function MissionList() {
2828
return (
2929
<div className={containerCss}>
30-
<Header />
30+
<MissionListHeader />
3131
<ul className={listCss}>
3232
<MissionListInner />
3333
</ul>

src/app/record/success/page.tsx

+6
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
'use client';
22

3+
import { useEffect } from 'react';
34
import Image from 'next/image';
45
import { useRouter } from 'next/navigation';
56
// import lottieJson from '@/assets/lotties/lottieExample.json';
67
import Button from '@/components/Button/Button';
78
import { ROUTER } from '@/constants/router';
9+
import { NATIVE_METHODS } from '@/utils/nativeMethod';
810
import { css } from '@styled-system/css';
911
// import Lottie from 'react-lottie-player';
1012

1113
export default function MissionSuccessPage() {
1214
const router = useRouter();
1315
const onClickConfirmButton = () => router.replace(ROUTER.HOME);
1416

17+
useEffect(() => {
18+
NATIVE_METHODS.VIBRATE();
19+
}, []);
20+
1521
return (
1622
<main className={mainWrapperCss}>
1723
<div className={containerCss}>

src/components/AppBarBottom/AppBarBottomVIew.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
import Link from 'next/link';
22
import Icon from '@/components/Icon';
33
import { EVENT_LOG_CATEGORY, EVENT_LOG_NAME } from '@/constants/eventLog';
4+
import { NATIVE_CUSTOM_EVENTS } from '@/constants/nativeCustomEvent';
45
import { NAVIGATION, type NavigationItemType } from '@/constants/navigation';
56
import { css } from '@/styled-system/css';
67
import { flex } from '@/styled-system/patterns';
78
import { eventLogger } from '@/utils';
9+
import { NATIVE_METHODS } from '@/utils/nativeMethod';
810

911
interface Props {
1012
current: string;
@@ -13,6 +15,7 @@ interface Props {
1315

1416
function AppBarBottomView(props: Props) {
1517
const handleClick = (tabName: string) => {
18+
NATIVE_METHODS.HAPTIC();
1619
eventLogger.logEvent(EVENT_LOG_NAME.BOTTOM_APP_BAR.CLICK_TAB, EVENT_LOG_CATEGORY.BOTTOM_APP_BAR, {
1720
tabName,
1821
});

src/constants/nativeCustomEvent.ts

+2
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@ export const NATIVE_CUSTOM_EVENTS = {
33
APPLE_LOGIN: 'appleLogin',
44
KAKAO_LOGIN_CALLBACK: 'kakaoLoginCallback',
55
APPLE_LOGIN_CALLBACK: 'appleLoginCallback',
6+
VIBRATE: 'vibrate',
7+
HAPTIC: 'haptic',
68
} as const;

src/utils/nativeMethod.ts

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { NATIVE_CUSTOM_EVENTS } from '@/constants/nativeCustomEvent';
2+
3+
export const NATIVE_METHODS = {
4+
HAPTIC: () => {
5+
window.ReactNativeWebView?.postMessage(
6+
JSON.stringify({
7+
type: NATIVE_CUSTOM_EVENTS.HAPTIC,
8+
}),
9+
);
10+
},
11+
VIBRATE: () => {
12+
window.ReactNativeWebView?.postMessage(
13+
JSON.stringify({
14+
type: NATIVE_CUSTOM_EVENTS.VIBRATE,
15+
}),
16+
);
17+
},
18+
};

0 commit comments

Comments
 (0)