Nova rubrika /aktuelles: splosne novice locene od naslovnice, povezava v glavi in nogi, v sitemapu

This commit is contained in:
FOLX Bot
2026-08-16 15:33:14 +02:00
parent 59279fa039
commit 23a684325b
6 changed files with 19 additions and 3 deletions
+3 -2
View File
@@ -20,8 +20,9 @@ interface PaginatedResponse {
hasMore: boolean;
}
export default function CategoryPage() {
const { category } = useParams<{ category: string }>();
export default function CategoryPage({ fixedCategory }: { fixedCategory?: string } = {}) {
const params = useParams<{ category: string }>();
const category = fixedCategory || params.category;
const searchString = useSearch();
const [, setLocation] = useLocation();
+8 -1
View File
@@ -711,10 +711,17 @@ export default function Home() {
};
}, []);
const { data: articles, isLoading } = useQuery<Article[]>({
const { data: allArticles, isLoading } = useQuery<Article[]>({
queryKey: ["/api/articles"],
});
// Splosne novice imajo svojo rubriko /aktuelles in ne sodijo na naslovnico,
// ki ostaja Volksmusik in Schlager.
const articles = useMemo(
() => (allArticles || []).filter((a) => a.category !== "Aktuelles"),
[allArticles]
);
const { data: popular } = useQuery<Article[]>({
queryKey: ["/api/articles/popular"],
});