diff --git a/apps/mobile/app/components/sheets/sort/index.tsx b/apps/mobile/app/components/sheets/sort/index.tsx index 49f275d59..4f241f6f9 100644 --- a/apps/mobile/app/components/sheets/sort/index.tsx +++ b/apps/mobile/app/components/sheets/sort/index.tsx @@ -54,7 +54,11 @@ const Sort = ({ const { colors } = useThemeColors(); const [groupOptions, setGroupOptions] = useState( db.settings.getGroupOptions( - screen === "Notes" ? "home" : ((type + "s") as GroupingKey) + screen === "Notes" + ? "home" + : screen === "Trash" + ? "trash" + : ((type + "s") as GroupingKey) ) ); const updateGroupOptions = async (_groupOptions: GroupOptions) => { @@ -185,7 +189,7 @@ const Sort = ({ ]()} - {groupOptions.sortBy === item ? ( + {groupOptions?.sortBy === item ? (