Horoskop widget na naslovnici: slikce znamenj + povezava na znamenje
This commit is contained in:
@@ -337,7 +337,10 @@ export default function HoroscopePage() {
|
||||
|
||||
useEffect(() => {
|
||||
if (params.sign) {
|
||||
const idx = SIGNS.findIndex((s) => s.name.toLowerCase() === params.sign?.toLowerCase());
|
||||
let raw = params.sign;
|
||||
try { raw = decodeURIComponent(params.sign); } catch { /* ostane surov */ }
|
||||
const wanted = raw.toLowerCase();
|
||||
const idx = SIGNS.findIndex((s) => s.name.toLowerCase() === wanted);
|
||||
if (idx >= 0) setSelected(idx);
|
||||
}
|
||||
}, [params.sign]);
|
||||
|
||||
Reference in New Issue
Block a user