Showing
2 changed files
with
9 additions
and
11 deletions
@@ -4,22 +4,13 @@ import SearchBar from "~/components/SearchBar.vue"; | @@ -4,22 +4,13 @@ import SearchBar from "~/components/SearchBar.vue"; | ||
4 | import { ref } from "vue"; | 4 | import { ref } from "vue"; |
5 | import { useTMDB } from "~/composables/tMDB"; | 5 | import { useTMDB } from "~/composables/tMDB"; |
6 | import { Movie } from "~/models/movie"; | 6 | import { Movie } from "~/models/movie"; |
7 | +import type { MovieInterface } from "~/interfaces/movie"; | ||
7 | //#endregion | 8 | //#endregion |
8 | 9 | ||
9 | //#region --Declaration--. | 10 | //#region --Declaration--. |
10 | const { fetchPopularMovies } = useTMDB(); | 11 | const { fetchPopularMovies } = useTMDB(); |
11 | //#endregion | 12 | //#endregion |
12 | 13 | ||
13 | -//#region --Type--. | ||
14 | -// interface Movie { | ||
15 | -// id: number; | ||
16 | -// title: string; | ||
17 | -// poster_path: string | null; | ||
18 | -// vote_average: number; | ||
19 | -// release_date: string; | ||
20 | -// } | ||
21 | -//#endregion | ||
22 | - | ||
23 | //#region --Data/refs--. | 14 | //#region --Data/refs--. |
24 | const isInitialLoading = ref(true); | 15 | const isInitialLoading = ref(true); |
25 | const isLoadingMore = ref(false); | 16 | const isLoadingMore = ref(false); |
@@ -29,7 +20,7 @@ const totalPages = ref(0); | @@ -29,7 +20,7 @@ const totalPages = ref(0); | ||
29 | 20 | ||
30 | //#region --Computed--. | 21 | //#region --Computed--. |
31 | const movies = computed(() => { | 22 | const movies = computed(() => { |
32 | - return useRepo(Movie).all(); | 23 | + return useRepo(Movie).all() as unknown as MovieInterface[]; |
33 | }); | 24 | }); |
34 | //#endregion | 25 | //#endregion |
35 | 26 |
-
Please register or login to post a comment