Skip to content

Commit c45d4e3

Browse files
committed
fix: remove unnecessary condition & fix type error
isDateFuture is already being called to conditionally render the block of code. It seems unnecessary to have another isDateFuture check inside the block as it will always resolve to true as long as the block is rendered.
1 parent 0831c0e commit c45d4e3

File tree

1 file changed

+2
-6
lines changed
  • packages/frontendmu-nuxt/components/meetup

1 file changed

+2
-6
lines changed

packages/frontendmu-nuxt/components/meetup/Single.vue

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,11 @@ const currentAlbum = computed(() => fetchAlbumDetails(props.getCurrentEvent?.alb
4141
<div class="relative">
4242
<!-- Content area -->
4343
<div>
44-
<template v-if="isDateInFuture(getCurrentEvent.Date || '')">
44+
<template v-if="isDateInFuture(new Date(getCurrentEvent.Date || new Date))">
4545
<div class="flex flex-col pb-4 gap-2 md:flex-row md:justify-between md:items-center">
4646
<div class="flex w-full items-center justify-start">
4747
<p
48-
class="p-2 rounded-full text-sm font-medium tracking-wide uppercase px-4" :class="[
49-
isDateInFuture(getCurrentEvent.Date || '')
50-
? 'tagStyle bg-green-100 text-green-800'
51-
: 'tagStyle bg-yellow-100 text-yellow-800',
52-
]"
48+
class="p-2 rounded-full text-sm font-medium tracking-wide uppercase px-4 tagStyle bg-green-100 text-green-800"
5349
>
5450
happening soon
5551
</p>

0 commit comments

Comments
 (0)