A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
web: refactor props for Tags component Signed-off-by: 01zulfi <[email protected]>
01zulfi30838749e12e
diff --git a/apps/web/src/components/navigation-menu/index.tsx b/apps/web/src/components/navigation-menu/index.tsxindex 09f441513..173a9a667 100644--- a/apps/web/src/components/navigation-menu/index.tsx+++ b/apps/web/src/components/navigation-menu/index.tsx@@ -358,7 +358,7 @@ function NavigationMenu(props: NavigationMenuProps) {>{CREATE_BUTTON_MAP.tags.title}</Button>- <Tags location="sidebar" />+ <Tags isSidebar /></Flex>) : (<FlexScrollContainerdiff --git a/apps/web/src/navigation/routes.tsx b/apps/web/src/navigation/routes.tsxindex 3b2d284ef..b9c610f59 100644--- a/apps/web/src/navigation/routes.tsx+++ b/apps/web/src/navigation/routes.tsx@@ -149,9 +149,6 @@ const routes = defineRoutes({title: strings.routes.Tags(),type: "tags",component: Tags,- props: {- location: "middle-pane"- },buttons: {create: CREATE_BUTTON_MAP.tags,search: {diff --git a/apps/web/src/views/tags.tsx b/apps/web/src/views/tags.tsxindex c0c510019..28cbdec54 100644--- a/apps/web/src/views/tags.tsx+++ b/apps/web/src/views/tags.tsx@@ -28,10 +28,10 @@ import { useEffect } from "react";import { navigate } from "../navigation";type Props = {- location: "middle-pane" | "sidebar";+ isSidebar?: boolean;};-function Tags({ location }: Props) {+function Tags({ isSidebar }: Props) {useNavigate("tags", () => store.refresh());const tags = useStore((store) => store.tags);const refresh = useStore((store) => store.refresh);@@ -40,7 +40,7 @@ function Tags({ location }: Props) {);useEffect(() => {- if (location === "sidebar") return;+ if (isSidebar) return;tags?.item(0).then((item) => {if (item && item?.item) {navigate(`/tags/${item.item.id}`);