Update pagination
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
<script setup lang="ts">
|
||||
import type { GetProductsFilters } from "~/composables/api/products/useGetProducts";
|
||||
|
||||
// types
|
||||
|
||||
@@ -17,9 +16,9 @@ defineProps<Props>();
|
||||
|
||||
// state
|
||||
|
||||
const params: GetProductsFilters = inject("params");
|
||||
const params : any = inject("params");
|
||||
|
||||
const page = ref(Number(params.page) ?? 1);
|
||||
const page = ref(params?.page ? Number(params.page) : 1);
|
||||
|
||||
// watch
|
||||
|
||||
@@ -82,6 +81,4 @@ watch(
|
||||
</PaginationFirst>
|
||||
</PaginationList>
|
||||
</PaginationRoot>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
</template>
|
||||
Reference in New Issue
Block a user