From d6e4b5e889449e358ff2c50552353bd122fc2329 Mon Sep 17 00:00:00 2001 From: boojack Date: Sat, 25 Feb 2023 00:13:41 +0800 Subject: [PATCH] chore: fix dispatch memo pinned (#1152) --- web/src/components/CreateIdentityProviderDialog.tsx | 5 +---- web/src/store/module/memo.ts | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/web/src/components/CreateIdentityProviderDialog.tsx b/web/src/components/CreateIdentityProviderDialog.tsx index d1cbcd29..7bbd423e 100644 --- a/web/src/components/CreateIdentityProviderDialog.tsx +++ b/web/src/components/CreateIdentityProviderDialog.tsx @@ -275,10 +275,7 @@ const CreateIdentityProviderDialog: React.FC = (props: Props) => { {type === "OAUTH2" && ( <> {isCreating && ( -

- Redirect URL: {absolutifyLink("/auth/callback")}{" "} - RedirectRedirectRedirectRedirectRedirectRedirectRedirectRedirectRedirectRedirectRedirect -

+

Redirect URL: {absolutifyLink("/auth/callback")}

)} Client ID* diff --git a/web/src/store/module/memo.ts b/web/src/store/module/memo.ts index c92c0f45..36012db6 100644 --- a/web/src/store/module/memo.ts +++ b/web/src/store/module/memo.ts @@ -1,4 +1,4 @@ -import { uniqBy } from "lodash-es"; +import { omit, uniqBy } from "lodash-es"; import * as api from "../../helpers/api"; import { DEFAULT_MEMO_LIMIT } from "../../helpers/consts"; import { useUserStore } from "./"; @@ -97,7 +97,7 @@ export const useMemoStore = () => { patchMemo: async (memoPatch: MemoPatch): Promise => { const { data } = (await api.patchMemo(memoPatch)).data; const memo = convertResponseModelMemo(data); - store.dispatch(patchMemo(memo)); + store.dispatch(patchMemo(omit(memo, "pinned"))); return memo; }, pinMemo: async (memoId: MemoId) => {