Naslovnica: razmik po skupini izvajalca (Rier = Kastelruther Spatzen), Beliebt brez podvojitev iz bazena

This commit is contained in:
folx bot
2026-08-29 20:34:27 +02:00
parent 12694d6db8
commit 85e7a1e7c7
4 changed files with 48 additions and 15 deletions
@@ -1,5 +1,5 @@
import { useQuery } from "@tanstack/react-query";
import { artistKey } from "@/lib/artists";
import { artistGroup } from "@/lib/artists";
import { useState, useEffect, useCallback } from "react";
import { Globe, ExternalLink } from "lucide-react";
@@ -27,13 +27,13 @@ export function BreakingNewsWidget() {
const recent: string[] = [];
while (rest.length) {
let idx = rest.findIndex((n: any) => {
const k = artistKey(n?.title || "");
const k = artistGroup(n?.title || "");
return !k || !recent.includes(k);
});
if (idx < 0) idx = 0;
const n = rest.splice(idx, 1)[0];
out.push(n);
recent.push(artistKey((n as any)?.title || ""));
recent.push(artistGroup((n as any)?.title || ""));
if (recent.length >= 5) recent.shift();
}
return out;
+3 -3
View File
@@ -1,5 +1,5 @@
import { useQuery } from "@tanstack/react-query";
import { artistKey } from "@/lib/artists";
import { artistGroup } from "@/lib/artists";
import { useState, useEffect, useCallback } from "react";
import { Newspaper, ExternalLink } from "lucide-react";
@@ -27,13 +27,13 @@ export function NewsWidget() {
const recent: string[] = [];
while (rest.length) {
let idx = rest.findIndex((n: any) => {
const k = artistKey(n?.title || "");
const k = artistGroup(n?.title || "");
return !k || !recent.includes(k);
});
if (idx < 0) idx = 0;
const n = rest.splice(idx, 1)[0];
out.push(n);
recent.push(artistKey((n as any)?.title || ""));
recent.push(artistGroup((n as any)?.title || ""));
if (recent.length >= 5) recent.shift();
}
return out;