Skip to content

Commit 8f4b512

Browse files
authored
Update user type (codesandbox#3212)
1 parent 4cc2753 commit 8f4b512

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

packages/common/src/types/index.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,15 +188,13 @@ export type User = {
188188
sandboxCount: number;
189189
givenLikeCount: number;
190190
receivedLikeCount: number;
191-
currentModuleShortid: string;
192191
viewCount: number;
193192
forkedCount: number;
194193
sandboxes: PaginatedSandboxes;
195194
likedSandboxes: PaginatedSandboxes;
196195
badges: Badge[];
197196
topSandboxes: SmallSandbox[];
198-
subscriptionSince: string;
199-
selection: Selection | null;
197+
subscriptionSince: string | null;
200198
};
201199

202200
export type LiveUser = {
@@ -291,6 +289,15 @@ export type PickedSandboxDetails = {
291289
title: string;
292290
};
293291

292+
export type SandboxAuthor = {
293+
id: string;
294+
username: string;
295+
name: string;
296+
avatarUrl: string;
297+
badges: Badge[];
298+
subscriptionSince: string | null;
299+
};
300+
294301
export type Sandbox = {
295302
id: string;
296303
alias: string | null;
@@ -325,7 +332,7 @@ export type Sandbox = {
325332
} | null;
326333
roomId: string | null;
327334
privacy: 0 | 1 | 2;
328-
author: User | null;
335+
author: SandboxAuthor | null;
329336
forkedFromSandbox: ForkedSandbox | null;
330337
git: GitInfo | null;
331338
tags: string[];

0 commit comments

Comments
 (0)