Skip to content

Commit 8766439

Browse files
committed
fix: post type shifted to types file
1 parent 2336c57 commit 8766439

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

platforms/metagram/src/lib/types.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,17 @@ export type CommentType = {
1616
time: string;
1717
replies: CommentType[];
1818
};
19+
20+
export type PostData = {
21+
id: number;
22+
avatar: string;
23+
username: string;
24+
imgUri: string;
25+
postAlt: string;
26+
text: string;
27+
time: string;
28+
count: {
29+
likes: number;
30+
comments: number;
31+
};
32+
};

platforms/metagram/src/routes/(protected)/home/+page.svelte

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,8 @@
44
import { onMount } from 'svelte';
55
import type { CupertinoPane } from 'cupertino-pane';
66
import { Comment, MessageInput } from '$lib/fragments';
7-
import type { CommentType } from '$lib/types';
7+
import type { CommentType, PostData } from '$lib/types';
88
9-
type PostData = {
10-
id: number;
11-
avatar: string;
12-
username: string;
13-
imgUri: string;
14-
postAlt: string;
15-
text: string;
16-
time: string;
17-
count: {
18-
likes: number;
19-
comments: number;
20-
};
21-
};
229
2310
let listElement: HTMLElement;
2411
let visiblePosts: PostData[] = $state([]);

0 commit comments

Comments
 (0)