summaryrefslogtreecommitdiff
path: root/packages/client/src/pages/user/clips.vue
diff options
context:
space:
mode:
Diffstat (limited to 'packages/client/src/pages/user/clips.vue')
-rw-r--r--packages/client/src/pages/user/clips.vue44
1 files changed, 13 insertions, 31 deletions
diff --git a/packages/client/src/pages/user/clips.vue b/packages/client/src/pages/user/clips.vue
index 870e6f7174..f3fafc6934 100644
--- a/packages/client/src/pages/user/clips.vue
+++ b/packages/client/src/pages/user/clips.vue
@@ -9,40 +9,22 @@
</div>
</template>
-<script lang="ts">
-import { defineComponent } from 'vue';
+<script lang="ts" setup>
+import { computed } from 'vue';
+import * as misskey from 'misskey-js';
import MkPagination from '@/components/ui/pagination.vue';
-export default defineComponent({
- components: {
- MkPagination,
- },
+const props = defineProps<{
+ user: misskey.entities.User;
+}>();
- props: {
- user: {
- type: Object,
- required: true
- },
- },
-
- data() {
- return {
- pagination: {
- endpoint: 'users/clips' as const,
- limit: 20,
- params: {
- userId: this.user.id,
- }
- },
- };
- },
-
- watch: {
- user() {
- this.$refs.list.reload();
- }
- },
-});
+const pagination = {
+ endpoint: 'users/clips' as const,
+ limit: 20,
+ params: computed(() => ({
+ userId: props.user.id,
+ })),
+};
</script>
<style lang="scss" scoped>