mirror of
https://github.com/mmahdium/TBW.git
synced 2025-12-21 13:13:55 +01:00
Format project
This commit is contained in:
@@ -29,7 +29,11 @@ const emit = defineEmits<{ (e: 'loaded', id: string): void; (e: 'loadMore'): voi
|
||||
</li>
|
||||
</ul>
|
||||
<div v-if="props.isSearch && props.movies.length > 0" class="flex justify-center mt-8">
|
||||
<button class="btn btn-outline btn-secondary" @click="emit('loadMore')" :disabled="props.loadingMore">
|
||||
<button
|
||||
class="btn btn-outline btn-secondary"
|
||||
@click="emit('loadMore')"
|
||||
:disabled="props.loadingMore"
|
||||
>
|
||||
<span v-if="props.loadingMore" class="loading loading-spinner loading-xs mr-2"></span>
|
||||
Load more
|
||||
</button>
|
||||
|
||||
@@ -48,8 +48,6 @@ async function searchMovie() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
async function loadMore() {
|
||||
try {
|
||||
isLoadingMore.value = true
|
||||
@@ -73,7 +71,12 @@ function handleLoaded(id: string) {
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
if (state.searchQuery !== '' && state.searchPage !== 0 && state.movieList !== undefined && state.movieList.length > 0) {
|
||||
if (
|
||||
state.searchQuery !== '' &&
|
||||
state.searchPage !== 0 &&
|
||||
state.movieList !== undefined &&
|
||||
state.movieList.length > 0
|
||||
) {
|
||||
searchQuery.value = state.searchQuery
|
||||
searchPage.value = state.searchPage
|
||||
movies.value = state.movieList
|
||||
|
||||
Reference in New Issue
Block a user