Skip to content

Commit 97035ed

Browse files
committed
📝 Add Typing Reference for Profile Data
1 parent 8b5cb74 commit 97035ed

File tree

1 file changed

+46
-2
lines changed

1 file changed

+46
-2
lines changed

packages/app/src/app/pages/Profile/DELETEME.ts

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,47 @@
1-
const sandboxes = [
1+
type Sandbox = {
2+
id: string;
3+
preview: string;
4+
title: string;
5+
description: string;
6+
likes: number;
7+
views: number;
8+
forks: number;
9+
environment: string;
10+
};
11+
12+
type InitialState = {
13+
user: {
14+
id: string; // User/Team ID
15+
avatar: string; // User/Team Avatar Image URL
16+
isContributor: boolean;
17+
isPro: boolean;
18+
isTeam: boolean;
19+
name: string;
20+
username: string;
21+
bio: string;
22+
totalSandboxes: number; // Number of Sandboxes belonging to the User/Team
23+
totalTemplates: number; // Number of Templates belonging to the User/Team
24+
totalLikes: number; // Number of Sandboxes Liked by the User
25+
// A User's Teams, or a Team's Members
26+
associations: {
27+
thumbnail: string; // GitHub Profile Image URL
28+
url: string; // URL to user or team profile
29+
entityName: string; // Name of User or Team
30+
}[];
31+
socialLinks: string[]; // List of URLs
32+
// Featured Sandbox
33+
featured: {
34+
id: string; // Sandbox ID
35+
heroImage: string; // URL
36+
};
37+
pinned: Sandbox[]; // Possibly Paginated?
38+
sandboxes: Sandbox[]; // Paginated List
39+
templates: Sandbox[]; // Paginated List
40+
likes: Sandbox[]; // Paginated List
41+
};
42+
};
43+
44+
const sandboxes: Sandbox[] = [
245
{
346
id: '123',
447
preview: `https://i.imgur.com/NOzyPxz.png`,
@@ -61,10 +104,11 @@ const sandboxes = [
61104
},
62105
];
63106

64-
export const initialState = {
107+
export const initialState: InitialState = {
65108
user: {
66109
id: `userID`,
67110
avatar: `https://avatars2.githubusercontent.com/u/42876?s=200&v=4`,
111+
isContributor: false,
68112
isPro: false,
69113
isTeam: true,
70114
name: `Framer`,

0 commit comments

Comments
 (0)