v3: journal becomes the default feed tab for visitors and for users who haven't picked one

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
khannurien
2026-09-19 20:39:17 +00:00
parent 20d717f879
commit 6026286bbf
6 changed files with 14 additions and 9 deletions

View File

@@ -9,6 +9,7 @@ import { createPortal } from "react-dom";
import { useNavigate, useParams } from "react-router";
import { t } from "@lingui/core/macro";
import { useCategories } from "../hooks/useCategories.ts";
import { DEFAULT_FEED_TAB } from "../config/feedTabs.ts";
/**
* Header dropdown that switches the feed scope between "All" and a category,
@@ -73,7 +74,7 @@ export function CategorySwitcher() {
if (categories.length === 0) return null;
const value = categorySlug ?? "~";
const tab = feedTab ?? "hot";
const tab = feedTab ?? DEFAULT_FEED_TAB;
const currentLabel = categorySlug
? categories.find((c) => c.slug === categorySlug)?.name ?? categorySlug
: t`All`;