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: hide sort options button for reminders
Abdullah Attab65a37219217
diff --git a/apps/web/src/components/group-header/index.js b/apps/web/src/components/group-header/index.jsindex d9118b3a5..2be38b214 100644--- a/apps/web/src/components/group-header/index.js+++ b/apps/web/src/components/group-header/index.js@@ -246,26 +246,28 @@ function GroupHeader(props) {{index === 0 && (<Flex mr={1}>- <IconButton- testId="sort-icon-button"- icon={- groupOptions.sortDirection === "asc"- ? Icon.SortAsc- : Icon.SortDesc- }- title={`Grouped by ${groupByToTitleMap[groupOptions.groupBy]}`}- onClick={() => {- const groupOptions = db.settings.getGroupOptions(type);- setGroupOptions(groupOptions);+ {type && (+ <IconButton+ testId="sort-icon-button"+ icon={+ groupOptions.sortDirection === "asc"+ ? Icon.SortAsc+ : Icon.SortDesc+ }+ title={`Grouped by ${groupByToTitleMap[groupOptions.groupBy]}`}+ onClick={() => {+ const groupOptions = db.settings.getGroupOptions(type);+ setGroupOptions(groupOptions);- openMenu(menuItems, {- title: "Group & sort",- groupOptions,- refresh,- type- });- }}- />+ openMenu(menuItems, {+ title: "Group & sort",+ groupOptions,+ refresh,+ type+ });+ }}+ />+ )}{viewMode && (<IconButtonicon={diff --git a/apps/web/src/components/list-container/index.tsx b/apps/web/src/components/list-container/index.tsxindex c58cc8d92..e00311d46 100644--- a/apps/web/src/components/list-container/index.tsx+++ b/apps/web/src/components/list-container/index.tsx@@ -56,7 +56,7 @@ const CustomScrollbarsVirtualList = forwardRef<HTMLDivElement, ScrollerProps>(type ListContainerProps = {type: keyof typeof ListProfiles;items: Item[];- groupType: string;+ groupType?: string;context?: Context;refresh: () => void;header?: JSX.Element;diff --git a/apps/web/src/stores/reminder-store.js b/apps/web/src/stores/reminder-store.jsindex 55ad79e9d..8d99993c3 100644--- a/apps/web/src/stores/reminder-store.js+++ b/apps/web/src/stores/reminder-store.js@@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import createStore from "../common/store";import { db } from "../common/db";import BaseStore from "./index";-import { groupArray } from "@notesnook/core/utils/grouping";+import { groupReminders } from "@notesnook/core/utils/grouping";import { TaskScheduler } from "../utils/task-scheduler";import { showReminderPreviewDialog } from "../common/dialog-controller";import dayjs from "dayjs";@@ -30,13 +30,7 @@ class ReminderStore extends BaseStore {refresh = (reset = true) => {const reminders = db.reminders.all;- this.set(- (state) =>- (state.reminders = groupArray(- reminders,- db.settings.getGroupOptions("reminders")- ))- );+ this.set((state) => (state.reminders = groupReminders(reminders)));if (reset) resetReminders(reminders);};diff --git a/apps/web/src/views/reminders.tsx b/apps/web/src/views/reminders.tsxindex 190c22b41..6d3f87f08 100644--- a/apps/web/src/views/reminders.tsx+++ b/apps/web/src/views/reminders.tsx@@ -32,7 +32,6 @@ function Reminders() {<><ListContainertype="reminders"- groupType="reminders"refresh={refresh}items={reminders}placeholder={RemindersPlaceholder}