Skip to content

Commit

Permalink
fix(movie-search): nullable result
Browse files Browse the repository at this point in the history
  • Loading branch information
qkrdkwl9090 committed Jun 21, 2023
1 parent 88bfbfc commit 0996083
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const getMovieList = async () =>
const {
data: movies,
isFetched,
isFetching,
refetch,
} = useQuery({
queryKey: [requestUri],
Expand Down Expand Up @@ -80,11 +80,11 @@ const onInput = () => {
</template>

<section class="p-2">
<Skeleton v-if="!isFetched && !value" width="300" />
<Skeleton v-if="isFetching" width="300" />
<div v-else>
<h3 class="font-bold text-lg">Result</h3>
<section class="mt-2">
<p v-if="!movies.length">Not found</p>
<p v-if="!movies?.length">Not found</p>
<div v-else class="flex gap-8 flex-wrap">
<div
v-for="movie of movies"
Expand Down

0 comments on commit 0996083

Please sign in to comment.