Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/#230 QA 수정 #234

Merged
merged 4 commits into from
Feb 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added public/gif/onboarding_1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/gif/onboarding_2.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/gif/onboarding_3.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 0 additions & 9 deletions src/app/onboarding/layout.tsx

This file was deleted.

3 changes: 2 additions & 1 deletion src/app/onboarding/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default function Page() {
const [step, setStep] = useState(ONBOARDING_CONTENT[0].step);

return (
<div>
<div className="relative h-screen w-full overflow-hidden">
{ONBOARDING_CONTENT.map(
(content) =>
step >= content.step && (
Expand All @@ -18,6 +18,7 @@ export default function Page() {
title={content.title}
content={content.content}
videoUrl={content.videoUrl}
gifUrl={content.gifUrl}
icon={content.icon}
onNextStep={() => setStep((prev) => prev + 1)}
key={content.step}
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/Pin/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default function Pin({
{!isActive && (
<Tag
size={'small'}
className="absolute top-[100%] caption-12-bold px-[4px] rounded-[20px] bg-gray-700 text-gray-50 gap-0"
className="absolute top-[100%] caption-12-bold px-[6px] py-[2px] rounded-[20px] bg-gray-700 text-gray-50 gap-[2px]"
>
<PinVisitorIcon />
<span className="caption-12-extraBold text-gray-50">
Expand Down
31 changes: 24 additions & 7 deletions src/components/onboarding/Scene/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { motion } from 'framer-motion';
import { useState } from 'react';
import { useEffect, useState } from 'react';
import { useRouter } from 'next/navigation';
import Image from 'next/image';

import OnboardingModal from '@components/onboarding/Modal';
import { pageTransitionVariant } from '@constants/motions';
Expand All @@ -10,6 +11,7 @@ interface SceneProps {
title: string;
content: string;
videoUrl: string;
gifUrl: string;
icon: string;
onNextStep: () => void;
}
Expand All @@ -18,15 +20,23 @@ export default function Scene({
step,
title,
content,
videoUrl,
// videoUrl,
gifUrl,
onNextStep,
}: SceneProps) {
const router = useRouter();
const [buttonActive, setButtonActive] = useState(false);

const handleVideoEnd = () => {
setButtonActive(true);
};
/* TODO: IOS 영상 이슈 대응 필요 */
// const handleVideoEnd = () => {
// setButtonActive(true);
// };

useEffect(() => {
setTimeout(() => {
setButtonActive(true);
}, 2000);
}, [router, step]);

const handleClickNext = () => {
onNextStep();
Expand All @@ -42,14 +52,21 @@ export default function Scene({
initial="initial"
animate={['animate', 'opacity']}
>
<video
{/* <video
src={videoUrl}
autoPlay
className="absolute top-0 object-cover h-full w-full"
className="absolute object-cover top-0 h-full w-full"
playsInline
muted
key={videoUrl}
onEnded={handleVideoEnd}
/> */}
<Image
src={gifUrl}
alt="onboarding_gif"
fill
unoptimized={true}
priority
/>
<OnboardingModal
title={title}
Expand Down
4 changes: 4 additions & 0 deletions src/constants/onboarding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export interface OnboardingContentProps {
title: string;
content: string;
videoUrl: string;
gifUrl: string;
icon: string;
}

Expand All @@ -12,6 +13,7 @@ export const ONBOARDING_CONTENT: OnboardingContentProps[] = [
title: '재방문 맛집을 지도에 표시했어요',
content: '많은 사람이 재방문한 곳일수록 그릇이 많아요!',
videoUrl: '/video/onboarding_1.mp4',
gifUrl: '/gif/onboarding_1.gif',
icon: '/assets/icon_onboarding/first_step.svg',
},
{
Expand All @@ -20,6 +22,7 @@ export const ONBOARDING_CONTENT: OnboardingContentProps[] = [
content:
'가고 싶은 곳을 북마크하고, 방문 후 기록을 남겨보세요.\n 나의 맛집 지도가 완성될 거예요!',
videoUrl: '/video/onboarding_2.mp4',
gifUrl: '/gif/onboarding_2.gif',
icon: 'assets/icon_onboarding/second_step.svg',
},
{
Expand All @@ -28,6 +31,7 @@ export const ONBOARDING_CONTENT: OnboardingContentProps[] = [
content:
'다녀온 맛집 기록을 남겨보세요.\n 5개 이상 남기면 레벨이 올라가요!',
videoUrl: '/video/onboarding_3.mp4',
gifUrl: '/gif/onboarding_3.gif',
icon: '/assets/icon_onboarding/third_step.svg',
},
];
Loading