Skip to content

Commit

Permalink
feat/#521: 강아지 깨웠을 때 배너 이미지 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
HyeryongChoi committed Oct 19, 2023
1 parent 9a433a1 commit 5308f91
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Binary file not shown.
11 changes: 8 additions & 3 deletions frontend/src/pages/Landing/Landing.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { useState } from 'react';
import styled from 'styled-components';

import ZipgoBannerPng from '@/assets/webp/landing_banner.webp';
import ZipgoBanner from '@/assets/webp/landing_banner.webp';
import ZipgoBannerAwake from '@/assets/webp/landing_banner_awake.webp';
import Header from '@/components/@common/Header/Header';
import Template from '@/components/@common/Template';
import FilterBottomSheet from '@/components/Food/FilterBottomSheet/FilterBottomSheet';
Expand All @@ -16,8 +17,8 @@ let endTime: Date | undefined;

const Landing = () => {
const { toast } = useToast();

const [dogTouchCount, setDogTouchCount] = useState<number>(1);
const isDogAwake = dogTouchCount >= TARGET_NUMBER;

const onTouchDog = () => {
if (dogTouchCount === 1) {
Expand Down Expand Up @@ -50,7 +51,11 @@ const Landing = () => {
<BannerTitle>집사의고민</BannerTitle>
</TitleContainer>
</BannerText>
<BannerImg src={ZipgoBannerPng} onClick={onTouchDog} alt="집사의고민 배너 이미지" />
<BannerImg
src={isDogAwake ? ZipgoBannerAwake : ZipgoBanner}
onClick={onTouchDog}
alt="집사의고민 배너 이미지"
/>
</BannerSection>
<ListSection>
<FilterBottomSheet />
Expand Down

0 comments on commit 5308f91

Please sign in to comment.