Skip to content

Commit

Permalink
update counter ui and lint
Browse files Browse the repository at this point in the history
  • Loading branch information
da-in committed Apr 1, 2024
1 parent 60eb757 commit 4baa1ee
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
9 changes: 9 additions & 0 deletions src/assets/event-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 5 additions & 4 deletions src/event-pages/home/DevHomePage.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<template>
<div class="flex flex-col flex-1 justify-center items-center pt-3 px-6">
<img :src="zzioGame" alt="zzio game"/>
<a href="https://www.instagram.com/zzzi_ori" target="_blank">
<Counter :target="closeTime" :current="currentRef" class="mt-3"/>
</a>
<div class="flex flex-col flex-1 items-center px-6">
<img :src="zzioGame" alt="zzio game" class="mt-6"/>
<img :src="title" alt="황금 찌오를 찾아라 beta" class="mt-8 mb-2"/>
<Counter :target="closeTime" :current="currentRef"/>
<img :src="illustration" alt="찌오 이미지" class="mb-6"/>
<ZInput v-model="userStore.nickName"/>
<ZButton @click="onClickPlay" color="primary" :disabled="!userStore.nickName" class="mt-2">게임 시작</ZButton>
Expand Down Expand Up @@ -57,5 +59,4 @@ const onClickPlay = () => {
const onClickRank = () => {
router.push('/rank')
}
</script>
7 changes: 5 additions & 2 deletions src/event-pages/home/_components/Counter.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
<template>
<div v-if="remainingTime > 0">
<span>이벤트 종료 </span>
<div v-if="remainingTime > 0"
class="w-full bg-green border-y-2 border-white text-white text-body-b flex justify-center items-center gap-2 py-1.5">
<img :src="event" alt="event"/>
<span>이벤트 종료까지</span>
<span v-if="remainingDays > 1">D-{{ remainingDays }}</span>
<span v-else>{{ formattedTime }}</span>
</div>
</template>
<script setup lang="ts">
import {computed} from 'vue'
import event from '../../../assets/event-white.svg'
const props = defineProps({
target: {type: Date, default: new Date()},
Expand Down

0 comments on commit 4baa1ee

Please sign in to comment.