This commit is contained in:
parent
6c1cb64ff0
commit
d4bcb5e368
|
@ -35,12 +35,13 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<script lang="ts" setup>
|
||||
import { computed, shallowRef } from 'vue';
|
||||
import MkNote from '@/components/MkNote.vue';
|
||||
import MkDateSeparatedList, { MisskeyEntity } from '@/components/MkDateSeparatedList.vue';
|
||||
import MkDateSeparatedList from '@/components/MkDateSeparatedList.vue';
|
||||
import MkPagination, { Paging } from '@/components/MkPagination.vue';
|
||||
import { i18n } from '@/i18n';
|
||||
import { infoImageUrl } from '@/instance';
|
||||
import { noteManager } from '@/scripts/entity-manager';
|
||||
import { Note } from 'misskey-js/built/entities';
|
||||
import { MisskeyEntity } from '@/types/date-separated-list';
|
||||
|
||||
const props = defineProps<{
|
||||
pagination: Paging;
|
||||
|
|
|
@ -16,10 +16,24 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
import MkNotes from '@/components/MkNotes.vue';
|
||||
import { i18n } from '@/i18n';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata';
|
||||
import { noteManager } from '@/scripts/entity-manager';
|
||||
import { MisskeyEntity } from '@/types/date-separated-list';
|
||||
|
||||
const transform = (noteFavorites: any[]): MisskeyEntity[] => {
|
||||
return noteFavorites.map(noteFavorite => {
|
||||
const note = noteFavorite.note;
|
||||
noteManager.set(note);
|
||||
return {
|
||||
id: note.id,
|
||||
createdAt: note.createdAt,
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
const pagination = {
|
||||
endpoint: 'i/favorites' as const,
|
||||
limit: 10,
|
||||
transform,
|
||||
};
|
||||
|
||||
definePageMetadata({
|
||||
|
|
Loading…
Reference in New Issue