your personal website on atproto - mirror
blento.app
1import type { CardDefinition } from '../types';
2import { listRecords } from '$lib/atproto';
3import PopfeedReviewsCard from './PopfeedReviewsCard.svelte';
4
5export const PopfeedReviewsCardDefinition = {
6 type: 'recentPopfeedReviews',
7 contentComponent: PopfeedReviewsCard,
8 createNew: (card) => {
9 card.w = 8;
10 card.mobileW = 8;
11 card.h = 3;
12 card.mobileH = 6;
13 },
14 loadData: async (items, { did }) => {
15 const data = await listRecords({ did, collection: 'social.popfeed.feed.review' });
16
17 return data;
18 },
19 minH: 3,
20 sidebarButtonText: 'Popfeed Reviews',
21 canHaveLabel: true
22} as CardDefinition & { type: 'recentPopfeedReviews' };