Skip to content

Commit 203371b

Browse files
committed
refactor: remove dead code and unused modules
Deletes thirteen orphaned files (APIs, utils, SCSS, modules) that are no longer imported anywhere. Removes CustomCode enum, isValidSigId, isValidUUID, and isMingdaoEmail which had no remaining callers. Unexports the Thread component since it is only used within its file.
1 parent 148fb08 commit 203371b

16 files changed

Lines changed: 1 addition & 517 deletions

File tree

app/(home)/apis/getPostComment.ts

Lines changed: 0 additions & 16 deletions
This file was deleted.

app/(home)/apis/getPostList.ts

Lines changed: 0 additions & 29 deletions
This file was deleted.

app/[userID]/(User)/SwitchButton.tsx

Lines changed: 0 additions & 65 deletions
This file was deleted.

app/post/[postID]/edit/(edit)/config/alertMessages.tsx

Lines changed: 0 additions & 39 deletions
This file was deleted.

app/post/[postID]/edit/(edit)/config/editorToolbar.tsx

Lines changed: 0 additions & 34 deletions
This file was deleted.

components/PostEditor/desktop/Button.module.scss

Lines changed: 0 additions & 45 deletions
This file was deleted.

components/PostEditor/mobile/Editor.module.scss

Lines changed: 0 additions & 1 deletion
This file was deleted.

components/Threads/desktop/ThreadsList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function fixCoverUrl(cover: string) {
3838
return `${process.env.NEXT_PUBLIC_API_URL}/image/${cover}`;
3939
}
4040

41-
export const Thread = ({ threadData }: { threadData: TThread }) => {
41+
const Thread = ({ threadData }: { threadData: TThread }) => {
4242
const user = threadData.user as User;
4343
const sig = threadData.sig as unknown as Sig;
4444
const isAnnouncement = sig._id === announcementSigId;

modules/api/GetOnlineAppVersion/index.ts

Lines changed: 0 additions & 23 deletions
This file was deleted.

modules/customStatusCode/index.ts

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,3 @@
1-
export const CustomCode = {
2-
2000: "OK",
3-
4-
4000: "Not found",
5-
4001: "Forbidden",
6-
7-
4010: "Invalid user",
8-
4011: "Invalid body",
9-
4012: "Invalid query",
10-
4013: "Invalid JWT",
11-
4015: "Invalid google access token",
12-
4016: "Invalid image id",
13-
4017: "Invalid user id",
14-
4018: "Invalid post id",
15-
4019: "Invalid sig id",
16-
4020: "Invalid reply id",
17-
4021: "Invalid custom id",
18-
4022: "Custom id already exists",
19-
4023: "Invalid content length",
20-
4024: "Empty content",
21-
4025: "Invalid hashtag",
22-
4026: "Content size exceeded",
23-
4027: "Failed to send email",
24-
4028: "Already joined",
25-
4029: "Already applied",
26-
4030: "Not a member",
27-
4031: "Already confirmed",
28-
4032: "Invalid time range",
29-
30-
4100: "Error reading user from db",
31-
4101: "Error writing user to db",
32-
4102: "Error reading image from db",
33-
4103: "Error writing image to db",
34-
4104: "Error reading post from db",
35-
4105: "Error writing post to db",
36-
4106: "Error reading sig from db",
37-
4107: "Error writing sig to db",
38-
4108: "Error reading comment from db",
39-
4109: "Error writing comment to db",
40-
4110: "Error reading join request from db",
41-
4111: "Error writing join request to db",
42-
43-
5000: "Unknown error",
44-
} as const;
45-
461
export const CustomStatus = {
472
OK: 2000,
483

0 commit comments

Comments
 (0)