fix: removed viewType from browser Settings Atom, converted to using path to identify pages

This commit is contained in:
2025-05-18 02:03:54 +02:00
parent 49a0ea8804
commit d9fa0426ce
9 changed files with 37 additions and 65 deletions

View File

@@ -220,12 +220,6 @@ const ItemSection = ({
<Link
href={`/habits?highlight=${habit.id}`}
className="flex items-center gap-1 hover:text-primary transition-colors"
onClick={() => {
const newViewType = isTask ? 'tasks' : 'habits';
if (browserSettings.viewType !== newViewType) {
setBrowserSettings(prev => ({ ...prev, viewType: newViewType }));
}
}}
>
{isTask && isTaskOverdue(habit, settings.system.timezone) && !isCompleted && (
<TooltipProvider>
@@ -314,12 +308,6 @@ const ItemSection = ({
<Link
href={viewLink}
className="text-sm text-muted-foreground hover:text-primary flex items-center gap-1"
onClick={() => {
const newViewType = isTask ? 'tasks' : 'habits';
if (browserSettings.viewType !== newViewType) {
setBrowserSettings(prev => ({ ...prev, viewType: newViewType }));
}
}}
>
View
<ArrowRight className="h-3 w-3" />