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: use `undefined` instead of `UNKNOWN_ID`

boojack5dd6d505cc36
diff --git a/web/src/components/Memo.tsx b/web/src/components/Memo.tsx
index c1dd5acff..ac583912d 100644
--- a/web/src/components/Memo.tsx
+++ b/web/src/components/Memo.tsx
@@ -108,7 +108,7 @@ const Memo: React.FC<Props> = (props: Props) => {
const tagName = targetEl.innerText.slice(1);
const currTagQuery = locationService.getState().query?.tag;
if (currTagQuery === tagName) {
- locationService.setTagQuery("");
+ locationService.setTagQuery(undefined);
} else {
locationService.setTagQuery(tagName);
}
diff --git a/web/src/components/ShortcutList.tsx b/web/src/components/ShortcutList.tsx
index e436b2915..034a10fe4 100644
--- a/web/src/components/ShortcutList.tsx
+++ b/web/src/components/ShortcutList.tsx
@@ -63,7 +63,7 @@ const ShortcutContainer: React.FC<ShortcutContainerProps> = (props: ShortcutCont
const handleShortcutClick = () => {
if (isActive) {
- locationService.setMemoShortcut(UNKNOWN_ID);
+ locationService.setMemoShortcut(undefined);
} else {
if (!["/"].includes(locationService.getState().pathname)) {
locationService.setPathname("/");
diff --git a/web/src/components/TagList.tsx b/web/src/components/TagList.tsx
index 32506c447..66c3cddc6 100644
--- a/web/src/components/TagList.tsx
+++ b/web/src/components/TagList.tsx
@@ -94,7 +94,7 @@ const TagItemContainer: React.FC<TagItemContainerProps> = (props: TagItemContain
const handleTagClick = () => {
if (isActive) {
- locationService.setTagQuery("");
+ locationService.setTagQuery(undefined);
} else {
utils.copyTextToClipboard(`#${tag.text} `);
if (!["/"].includes(locationService.getState().pathname)) {