Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

chore: fix dispatch memo pinned (#1152)

boojackd6e4b5e88944
diff --git a/web/src/components/CreateIdentityProviderDialog.tsx b/web/src/components/CreateIdentityProviderDialog.tsx
index d1cbcd298..7bbd423e6 100644
--- a/web/src/components/CreateIdentityProviderDialog.tsx
+++ b/web/src/components/CreateIdentityProviderDialog.tsx
@@ -275,10 +275,7 @@ const CreateIdentityProviderDialog: React.FC<Props> = (props: Props) => {
{type === "OAUTH2" && (
<>
{isCreating && (
- <p className="border rounded-md p-2 text-sm w-full mb-2 break-all">
- Redirect URL: {absolutifyLink("/auth/callback")}{" "}
- RedirectRedirectRedirectRedirectRedirectRedirectRedirectRedirectRedirectRedirectRedirect
- </p>
+ <p className="border rounded-md p-2 text-sm w-full mb-2 break-all">Redirect URL: {absolutifyLink("/auth/callback")}</p>
)}
<Typography className="!mb-1" level="body2">
Client ID<span className="text-red-600">*</span>
diff --git a/web/src/store/module/memo.ts b/web/src/store/module/memo.ts
index c92c0f456..36012db63 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<Memo> => {
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) => {