chore: update frontend dependencies

This commit is contained in:
Steven 2024-01-27 17:28:06 +08:00
parent 10d709c167
commit ed32b20c9e
55 changed files with 482 additions and 563 deletions

View File

@ -4,7 +4,6 @@
"dev": "vite",
"build": "tsc && vite build",
"lint": "eslint --ext .js,.ts,.tsx, src",
"lint-fix": "eslint --ext .js,.ts,.tsx, src --fix",
"type-gen": "cd ../proto && buf generate",
"type-check": "tsc"
},
@ -16,7 +15,7 @@
"@mui/base": "5.0.0-beta.32",
"@mui/joy": "5.0.0-beta.23",
"@reduxjs/toolkit": "^1.9.7",
"axios": "^1.6.5",
"axios": "^1.6.7",
"classnames": "^2.5.1",
"copy-to-clipboard": "^3.3.3",
"highlight.js": "^11.9.0",
@ -34,36 +33,36 @@
"react-i18next": "^11.18.6",
"react-redux": "^8.1.3",
"react-router-dom": "^6.21.3",
"react-use": "^17.4.3",
"react-use": "^17.5.0",
"tailwindcss": "^3.4.1",
"textarea-caret": "^3.1.0",
"uuid": "^9.0.1",
"zustand": "^4.4.7"
"zustand": "^4.5.0"
},
"devDependencies": {
"@bufbuild/buf": "^1.28.1",
"@trivago/prettier-plugin-sort-imports": "^3.4.0",
"@bufbuild/buf": "^1.29.0",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/katex": "^0.16.7",
"@types/lodash-es": "^4.17.12",
"@types/node": "^20.11.5",
"@types/node": "^20.11.7",
"@types/qs": "^6.9.11",
"@types/react": "^18.2.48",
"@types/react-dom": "^18.2.18",
"@types/textarea-caret": "^3.0.3",
"@types/uuid": "^9.0.7",
"@typescript-eslint/eslint-plugin": "^6.19.0",
"@typescript-eslint/parser": "^6.19.0",
"@types/uuid": "^9.0.8",
"@typescript-eslint/eslint-plugin": "^6.19.1",
"@typescript-eslint/parser": "^6.19.1",
"@vitejs/plugin-react": "^4.2.1",
"autoprefixer": "^10.4.17",
"eslint": "^8.56.0",
"eslint-config-prettier": "^8.10.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.33.2",
"less": "^4.2.0",
"postcss": "^8.4.33",
"prettier": "2.6.2",
"prettier": "^3.2.4",
"typescript": "^5.3.3",
"vite": "^5.0.11"
"vite": "^5.0.12"
},
"resolutions": {
"csstype": "3.1.2"

855
web/pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -59,7 +59,7 @@ const ActivityCalendar = (props: Props) => {
className={classNames(
"w-4 h-4 text-[9px] rounded-md flex justify-center items-center border border-transparent",
getCellAdditionalStyles(count, maxCount),
isToday && "border-gray-600 dark:!border-gray-500"
isToday && "border-gray-600 dark:!border-gray-500",
)}
onClick={() => count && onClick && onClick(date)}
>
@ -71,7 +71,7 @@ const ActivityCalendar = (props: Props) => {
key={`${date}-${index}`}
className={classNames(
"shrink-0 opacity-30 w-4 h-4 rounded-md flex justify-center items-center border border-transparent",
getCellAdditionalStyles(count, maxCount)
getCellAdditionalStyles(count, maxCount),
)}
></div>
);

View File

@ -54,7 +54,7 @@ const ChangeMemberPasswordDialog: React.FC<Props> = (props: Props) => {
name: user.name,
password: newPassword,
},
["password"]
["password"],
);
toast(t("message.password-changed"));
handleCloseBtnClick();
@ -111,7 +111,7 @@ function showChangeMemberPasswordDialog(user: User) {
dialogName: "change-member-password-dialog",
},
ChangeMemberPasswordDialog,
{ user }
{ user },
);
}

View File

@ -46,7 +46,7 @@ const ChangeMemoCreatedTsDialog: React.FC<Props> = (props: Props) => {
id: memoId,
createTime: new Date(createdAt),
},
["created_ts"]
["created_ts"],
);
toast.success(t("message.memo-updated-datetime"));
handleCloseBtnClick();
@ -98,7 +98,7 @@ function showChangeMemoCreatedTsDialog(memoId: number) {
ChangeMemoCreatedTsDialog,
{
memoId,
}
},
);
}

View File

@ -56,7 +56,7 @@ const ChangePasswordDialog: React.FC<Props> = ({ destroy }: Props) => {
name: currentUser.name,
password: newPassword,
},
["password"]
["password"],
);
toast.success(t("message.password-changed"));
handleCloseBtnClick();
@ -110,7 +110,7 @@ function showChangePasswordDialog() {
className: "change-password-dialog",
dialogName: "change-password-dialog",
},
ChangePasswordDialog
ChangePasswordDialog,
);
}

View File

@ -139,7 +139,7 @@ function showCreateAccessTokenDialog(onConfirm: () => void) {
CreateAccessTokenDialog,
{
onConfirm,
}
},
);
}

View File

@ -426,7 +426,7 @@ function showCreateIdentityProviderDialog(identityProvider?: IdentityProvider, c
dialogName: "create-identity-provider-dialog",
},
CreateIdentityProviderDialog,
{ identityProvider, confirmCallback }
{ identityProvider, confirmCallback },
);
}

View File

@ -46,7 +46,7 @@ const CreateMemoRelationDialog: React.FC<Props> = (props: Props) => {
setIsFetching(false);
},
300,
[searchText]
[searchText],
);
const getHighlightedContent = (content: string) => {
@ -80,7 +80,7 @@ const CreateMemoRelationDialog: React.FC<Props> = (props: Props) => {
const handleConfirmBtnClick = async () => {
onConfirm(
selectedMemos.map((memo) => memo.id),
embedded
embedded,
);
destroy();
};
@ -155,7 +155,7 @@ function showCreateMemoRelationDialog(props: Omit<Props, "destroy" | "hide">) {
dialogName: "create-memo-relation-dialog",
},
CreateMemoRelationDialog,
props
props,
);
}

View File

@ -299,7 +299,7 @@ function showCreateResourceDialog(props: Omit<Props, "destroy" | "hide">) {
dialogName: "create-resource-dialog",
},
CreateResourceDialog,
props
props,
);
}

View File

@ -240,7 +240,7 @@ function showCreateStorageServiceDialog(storage?: ObjectStorage, confirmCallback
dialogName: "create-storage-service-dialog",
},
CreateStorageServiceDialog,
{ storage, confirmCallback }
{ storage, confirmCallback },
);
}

View File

@ -170,7 +170,7 @@ function showCreateTagDialog() {
className: "create-tag-dialog",
dialogName: "create-tag-dialog",
},
CreateTagDialog
CreateTagDialog,
);
}

View File

@ -155,7 +155,7 @@ function showCreateWebhookDialog(onConfirm: () => void) {
CreateWebhookDialog,
{
onConfirm,
}
},
);
}

View File

@ -68,7 +68,7 @@ const BaseDialog: React.FC<Props> = (props: Props) => {
export function generateDialog<T extends DialogProps>(
config: DialogConfig,
DialogComponent: React.FC<T>,
props?: Omit<T, "destroy" | "hide">
props?: Omit<T, "destroy" | "hide">,
): DialogCallback {
const tempDiv = document.createElement("div");
const dialog = createRoot(tempDiv);

View File

@ -86,6 +86,6 @@ export const showCommonDialog = (props: CommonDialogProps) => {
dialogName: `common-dialog ${props?.className ?? ""}`,
},
CommonDialog,
props
props,
);
};

View File

@ -91,7 +91,7 @@ function showDisablePasswordLoginDialog() {
className: "disable-password-login-dialog",
dialogName: "disable-password-login-dialog",
},
DisablePasswordLoginDialog
DisablePasswordLoginDialog,
);
}

View File

@ -15,7 +15,7 @@ const HomeSidebar = (props: Props) => {
<aside
className={classNames(
"relative w-full h-auto max-h-screen overflow-auto hide-scrollbar flex flex-col justify-start items-start",
props.className
props.className,
)}
>
<SearchBar />

View File

@ -59,7 +59,7 @@ const MemoCommentMessage = ({ inbox }: Props) => {
name: inbox.name,
status: Inbox_Status.ARCHIVED,
},
["status"]
["status"],
);
if (!silence) {
toast.success("Archived");
@ -73,7 +73,7 @@ const MemoCommentMessage = ({ inbox }: Props) => {
"shrink-0 mt-2 p-2 rounded-full border",
inbox.status === Inbox_Status.UNREAD
? "border-blue-600 text-blue-600 bg-blue-50 dark:bg-zinc-800"
: "border-gray-500 text-gray-500 bg-gray-50 dark:bg-zinc-800"
: "border-gray-500 text-gray-500 bg-gray-50 dark:bg-zinc-800",
)}
>
<Tooltip title={"Comment"} placement="bottom">
@ -83,7 +83,7 @@ const MemoCommentMessage = ({ inbox }: Props) => {
<div
className={classNames(
"border w-full p-3 px-4 rounded-lg flex flex-col justify-start items-start gap-2 dark:border-zinc-700 hover:bg-gray-100 dark:hover:bg-zinc-700",
inbox.status !== Inbox_Status.UNREAD && "opacity-60"
inbox.status !== Inbox_Status.UNREAD && "opacity-60",
)}
>
<div className="w-full flex flex-row justify-between items-center">

View File

@ -49,7 +49,7 @@ const VersionUpdateMessage = ({ inbox }: Props) => {
name: inbox.name,
status: Inbox_Status.ARCHIVED,
},
["status"]
["status"],
);
if (!silence) {
toast.success("Archived");
@ -63,7 +63,7 @@ const VersionUpdateMessage = ({ inbox }: Props) => {
"shrink-0 mt-2 p-2 rounded-full border",
inbox.status === Inbox_Status.UNREAD
? "border-blue-600 text-blue-600 bg-blue-50 dark:bg-zinc-800"
: "border-gray-500 text-gray-500 bg-gray-50 dark:bg-zinc-800"
: "border-gray-500 text-gray-500 bg-gray-50 dark:bg-zinc-800",
)}
>
<Tooltip title={"Update"} placement="bottom">
@ -73,7 +73,7 @@ const VersionUpdateMessage = ({ inbox }: Props) => {
<div
className={classNames(
"border w-full p-3 px-4 rounded-lg flex flex-col justify-start items-start gap-2 dark:border-zinc-700 hover:bg-gray-100 dark:hover:bg-zinc-700",
inbox.status !== Inbox_Status.UNREAD && "opacity-60"
inbox.status !== Inbox_Status.UNREAD && "opacity-60",
)}
>
<div className="w-full flex flex-row justify-between items-center">

View File

@ -28,7 +28,7 @@ const Tag: React.FC<Props> = ({ content }: Props) => {
<span
className={classNames(
"inline-block w-auto text-blue-600 dark:text-blue-400",
context.disableFilter ? "" : "cursor-pointer hover:opacity-80"
context.disableFilter ? "" : "cursor-pointer hover:opacity-80",
)}
onClick={handleTagClick}
>

View File

@ -40,7 +40,7 @@ const TaskList: React.FC<Props> = ({ index, indent, complete, children }: Props)
id: context.memoId,
nodes: context.nodes,
},
["nodes"]
["nodes"],
);
};

View File

@ -51,8 +51,8 @@ const AddMemoRelationButton = (props: Props) => {
...memoIdList.map((id) => ({ memoId: context.memoId || UNKNOWN_ID, relatedMemoId: id, type: MemoRelation_Type.REFERENCE })),
...context.relationList,
].filter((relation) => relation.relatedMemoId !== (context.memoId || UNKNOWN_ID)),
"relatedMemoId"
)
"relatedMemoId",
),
);
},
});

View File

@ -123,7 +123,7 @@ const TagSuggestions = ({ editorRef, editorActions }: Props) => {
onMouseDown={() => autocomplete(tag)}
className={classNames(
"rounded p-1 px-2 w-full truncate text-sm dark:text-gray-300 cursor-pointer hover:bg-zinc-200 dark:hover:bg-zinc-800",
i === selected ? "bg-zinc-300 dark:bg-zinc-700" : ""
i === selected ? "bg-zinc-300 dark:bg-zinc-700" : "",
)}
>
<OverflowTip>#{tag}</OverflowTip>

View File

@ -136,7 +136,7 @@ const Editor = forwardRef(function Editor(props: Props, ref: React.ForwardedRef<
}
},
}),
[]
[],
);
const handleEditorInput = useCallback(() => {

View File

@ -58,6 +58,6 @@ export default function showMemoEditorDialog(props: Pick<Props, "memoId" | "cach
containerClassName: "dark:!bg-zinc-800",
},
MemoEditorDialog,
props
props,
);
}

View File

@ -69,7 +69,7 @@ const MemoEditor = (props: Props) => {
const userSetting = userStore.userSetting as UserSetting;
const referenceRelations = memoId
? state.relationList.filter(
(relation) => relation.memoId === memoId && relation.relatedMemoId !== memoId && relation.type === MemoRelation_Type.REFERENCE
(relation) => relation.memoId === memoId && relation.relatedMemoId !== memoId && relation.type === MemoRelation_Type.REFERENCE,
)
: state.relationList.filter((relation) => relation.type === MemoRelation_Type.REFERENCE);
@ -275,7 +275,7 @@ const MemoEditor = (props: Props) => {
content,
visibility: state.memoVisibility,
},
["content", "visibility"]
["content", "visibility"],
);
await memoServiceClient.setMemoResources({
id: memo.id,
@ -348,7 +348,7 @@ const MemoEditor = (props: Props) => {
onContentChange: handleContentChange,
onPaste: handlePasteEvent,
}),
[i18n.language]
[i18n.language],
);
const allowSave = (hasContent || state.resourceList.length > 0) && !state.isUploadingResource && !state.isRequesting;

View File

@ -29,7 +29,7 @@ const MemoFilter = (props: Props) => {
<div
className={classNames(
`w-full flex flex-row justify-start items-start flex-wrap gap-2 text-sm leading-7 dark:text-gray-400`,
props.className
props.className,
)}
>
<div className="shrink-0 flex flex-row justify-start items-center text-gray-400">

View File

@ -22,13 +22,13 @@ const MemoRelationListView = (props: Props) => {
const referencingMemoList = await Promise.all(
relationList
.filter((relation) => relation.memoId === memo.id && relation.relatedMemoId !== memo.id)
.map((relation) => memoStore.getOrFetchMemoById(relation.relatedMemoId, { skipStore: true }))
.map((relation) => memoStore.getOrFetchMemoById(relation.relatedMemoId, { skipStore: true })),
);
setReferencingMemoList(referencingMemoList);
const referencedMemoList = await Promise.all(
relationList
.filter((relation) => relation.memoId !== memo.id && relation.relatedMemoId === memo.id)
.map((relation) => memoStore.getOrFetchMemoById(relation.memoId, { skipStore: true }))
.map((relation) => memoStore.getOrFetchMemoById(relation.memoId, { skipStore: true })),
);
setReferencedMemoList(referencedMemoList);
})();

View File

@ -87,7 +87,7 @@ const MemoView: React.FC<Props> = (props: Props) => {
id: memo.id,
pinned: false,
},
["pinned"]
["pinned"],
);
} else {
await memoStore.updateMemo(
@ -95,7 +95,7 @@ const MemoView: React.FC<Props> = (props: Props) => {
id: memo.id,
pinned: true,
},
["pinned"]
["pinned"],
);
}
} catch (error) {
@ -129,7 +129,7 @@ const MemoView: React.FC<Props> = (props: Props) => {
id: memo.id,
rowStatus: RowStatus.ARCHIVED,
},
["row_status"]
["row_status"],
);
} catch (error: any) {
console.error(error);

View File

@ -23,7 +23,7 @@ const MobileHeader = (props: Props) => {
className={classNames(
"sticky top-0 pt-3 pb-2 sm:pt-2 px-4 sm:px-6 sm:mb-1 bg-zinc-100 dark:bg-zinc-900 bg-opacity-80 backdrop-blur-lg flex md:hidden flex-row justify-between items-center w-full h-auto flex-nowrap shrink-0 z-1",
offsetTop > 0 && "shadow-md",
className
className,
)}
>
<div className="flex flex-row justify-start items-center mr-2 shrink-0 overflow-hidden">

View File

@ -35,9 +35,12 @@ const Navigation = (props: Props) => {
inboxStore.fetchInboxes();
// Fetch inboxes every 5 minutes.
const timer = setInterval(async () => {
await inboxStore.fetchInboxes();
}, 1000 * 60 * 5);
const timer = setInterval(
async () => {
await inboxStore.fetchInboxes();
},
1000 * 60 * 5,
);
return () => {
clearInterval(timer);
@ -120,7 +123,7 @@ const Navigation = (props: Props) => {
<header
className={classNames(
"w-full h-full overflow-auto flex flex-col justify-start items-start py-4 md:pt-6 z-30 hide-scrollbar",
className
className,
)}
>
<UserBanner collapsed={collapsed} />
@ -131,7 +134,7 @@ const Navigation = (props: Props) => {
classNames(
"px-2 py-2 rounded-2xl border flex flex-row items-center text-lg text-gray-800 dark:text-gray-300 hover:bg-white hover:border-gray-200 dark:hover:border-zinc-700 dark:hover:bg-zinc-800",
collapsed ? "" : "w-full px-4",
isActive ? "bg-white drop-shadow-sm dark:bg-zinc-800 border-gray-200 dark:border-zinc-700" : "border-transparent"
isActive ? "bg-white drop-shadow-sm dark:bg-zinc-800 border-gray-200 dark:border-zinc-700" : "border-transparent",
)
}
key={navLink.id}

View File

@ -146,6 +146,6 @@ export default function showPreviewImageDialog(imgUrls: string[] | string, initi
{
imgUrls: Array.isArray(imgUrls) ? imgUrls : [imgUrls],
initialIndex: initialIndex || 0,
}
},
);
}

View File

@ -53,6 +53,6 @@ export default function showPreviewMarkdownDialog(content: string): void {
PreviewMarkdownDialog,
{
content,
}
},
);
}

View File

@ -100,7 +100,7 @@ function showRenameTagDialog(props: Pick<Props, "tag">) {
dialogName: "rename-tag-dialog",
},
RenameTagDialog,
props
props,
);
}

View File

@ -20,7 +20,7 @@ const SearchBar = () => {
filterStore.setTextFilter(queryText.length === 0 ? undefined : queryText);
},
1000,
[queryText]
[queryText],
);
const handleTextQueryInput = (event: React.FormEvent<HTMLInputElement>) => {

View File

@ -26,7 +26,7 @@ const PreferencesSection = () => {
{
locale,
},
["locale"]
["locale"],
);
globalStore.setLocale(locale);
};
@ -36,7 +36,7 @@ const PreferencesSection = () => {
{
appearance,
},
["appearance"]
["appearance"],
);
globalStore.setAppearance(appearance);
};
@ -46,7 +46,7 @@ const PreferencesSection = () => {
{
memoVisibility: value,
},
["memo_visibility"]
["memo_visibility"],
);
};
@ -56,7 +56,7 @@ const PreferencesSection = () => {
{
telegramUserId: telegramUserId,
},
["telegram_user_id"]
["telegram_user_id"],
);
toast.success(t("message.update-succeed"));
} catch (error: any) {

View File

@ -140,6 +140,6 @@ export default function showShareMemoDialog(memo: Memo): void {
dialogName: "share-memo-dialog",
},
ShareMemoDialog,
{ memo }
{ memo },
);
}

View File

@ -113,7 +113,7 @@ const UpdateAccountDialog: React.FC<Props> = ({ destroy }: Props) => {
email: state.email,
avatarUrl: state.avatarUrl,
}),
updateMask
updateMask,
);
toast.success(t("message.update-succeed"));
handleCloseBtnClick();
@ -183,7 +183,7 @@ function showUpdateAccountDialog() {
className: "update-account-dialog",
dialogName: "update-account-dialog",
},
UpdateAccountDialog
UpdateAccountDialog,
);
}

View File

@ -137,7 +137,7 @@ function showUpdateCustomizedProfileDialog() {
className: "update-customized-profile-dialog",
dialogName: "update-customized-profile-dialog",
},
UpdateCustomizedProfileDialog
UpdateCustomizedProfileDialog,
);
}

View File

@ -88,7 +88,7 @@ function showUpdateLocalStorageDialog(localStoragePath?: string, confirmCallback
dialogName: "update-local-storage-dialog",
},
UpdateLocalStorageDialog,
{ localStoragePath, confirmCallback }
{ localStoragePath, confirmCallback },
);
}

View File

@ -32,7 +32,7 @@ const UserBanner = (props: Props) => {
<div
className={classNames(
"py-1 my-1 w-auto flex flex-row justify-start items-center cursor-pointer rounded-2xl border border-transparent text-gray-800 dark:text-gray-300",
collapsed ? "px-1" : "px-3"
collapsed ? "px-1" : "px-3",
)}
>
<UserAvatar className="shadow shrink-0" avatarUrl={avatarUrl} />

View File

@ -14,7 +14,7 @@ const channel = createChannel(
window.location.origin,
FetchTransport({
credentials: "include",
})
}),
);
const clientFactory = createClientFactory();

View File

@ -58,4 +58,4 @@ for (const locale of availableLocales) {
}
export default i18n;
export type TLocale = typeof availableLocales[number];
export type TLocale = (typeof availableLocales)[number];

View File

@ -17,14 +17,14 @@ function Root() {
<div
className={classNames(
"w-full transition-all mx-auto flex flex-row justify-center items-start",
collapsed ? "sm:pl-16" : "sm:pl-56"
collapsed ? "sm:pl-16" : "sm:pl-56",
)}
>
{sm && (
<div
className={classNames(
"group flex flex-col justify-start items-start fixed top-0 left-0 select-none border-r dark:border-zinc-800 h-full bg-zinc-50 dark:bg-zinc-800 dark:bg-opacity-40 transition-all hover:shadow-xl z-2",
collapsed ? "w-16 px-2" : "w-56 px-4"
collapsed ? "w-16 px-2" : "w-56 px-4",
)}
>
<Navigation className="!h-auto" collapsed={collapsed} />

View File

@ -20,5 +20,5 @@ root.render(
<RouterProvider router={router} />
<Toaster position="top-right" />
</CssVarsProvider>
</Provider>
</Provider>,
);

View File

@ -72,7 +72,7 @@ const Archived = () => {
id: memo.id,
rowStatus: RowStatus.ACTIVE,
},
["row_status"]
["row_status"],
);
setArchivedMemos((prev) => prev.filter((m) => m.id !== memo.id));
toast(t("message.restored-successfully"));

View File

@ -88,7 +88,7 @@ const MemoDetail = () => {
id: memo.id,
visibility: visibility,
},
["visibility"]
["visibility"],
);
};

View File

@ -97,7 +97,7 @@ const SignIn = () => {
const authUrl = `${oauth2Config.authUrl}?client_id=${
oauth2Config.clientId
}&redirect_uri=${redirectUri}&state=${stateQueryParameter}&response_type=code&scope=${encodeURIComponent(
oauth2Config.scopes.join(" ")
oauth2Config.scopes.join(" "),
)}`;
window.location.href = authUrl;
}

View File

@ -100,7 +100,7 @@ const Timeline = () => {
if (selectedDay) {
const selectedDateStamp = getTimeStampByDate(selectedDay) + new Date().getTimezoneOffset() * 60 * 1000;
filters.push(
...[`display_time_after == ${selectedDateStamp / 1000}`, `display_time_before == ${(selectedDateStamp + DAILY_TIMESTAMP) / 1000}`]
...[`display_time_after == ${selectedDateStamp / 1000}`, `display_time_before == ${(selectedDateStamp + DAILY_TIMESTAMP) / 1000}`],
);
}
setIsRequesting(true);

View File

@ -18,28 +18,28 @@ export const useFilterStore = () => {
tag: undefined,
text: undefined,
visibility: undefined,
})
}),
);
},
setTextFilter: (text?: string) => {
store.dispatch(
setFilter({
text: text,
})
}),
);
},
setTagFilter: (tag?: string) => {
store.dispatch(
setFilter({
tag: tag,
})
}),
);
},
setMemoVisibilityFilter: (visibility?: Visibility) => {
store.dispatch(
setFilter({
visibility: visibility,
})
}),
);
},
};

View File

@ -84,7 +84,7 @@ export const useGlobalStore = () => {
...state.systemStatus,
...systemStatus,
},
})
}),
);
},
setLocale: (locale: Locale) => {

View File

@ -30,5 +30,5 @@ export const useInboxStore = create(
set({ inboxes: inboxes.map((i) => (i.name === updatedInbox.name ? updatedInbox : i)) });
return updatedInbox;
},
}))
})),
);

View File

@ -104,7 +104,7 @@ export const useMemoStore = create(
delete memoMap[id];
set({ memoMapById: memoMap });
},
}))
})),
);
export const useMemoList = () => {

View File

@ -62,5 +62,5 @@ export const useResourceStore = create(
const resourceMap = get().resourceMapById;
return Object.values(resourceMap).find((r) => r.name === name);
},
}))
})),
);

View File

@ -123,7 +123,7 @@ export const useUserStore = create(
set({ userSetting: updatedUserSetting });
return updatedUserSetting;
},
}))
})),
);
export const stringifyUserRole = (role: User_Role) => {