refactor: more TS code

This commit is contained in:
Tristan Yang
2022-07-29 08:49:34 +08:00
parent 43a13f8d08
commit 96017c8fc6
21 changed files with 150 additions and 90 deletions
+7 -7
View File
@@ -1,13 +1,6 @@
import { createSlice, PayloadAction } from "@reduxjs/toolkit";
import BASE_URL, { ContentTypes } from "../config";
import { isImage } from "../../common/utils";
export interface State {
[key: number]: object;
replying: {
[key: string | number]: number;
};
}
export interface MessagePayload {
mid: number;
sending: boolean;
@@ -21,6 +14,13 @@ export interface MessagePayload {
download?: string;
thumbnail?: string;
}
export interface State {
[key: number]: MessagePayload;
replying: {
[key: string | number]: number;
};
}
const initialState: State = {
replying: {}
};