Files
progcode/web/app/Shortlinks.jsx
huncode 0524a74976
Build and deploy / deploy (push) Failing after 1m30s
Resolve final reviewer shortlink and editorial findings
2026-10-26 18:04:33 +03:00

13 lines
387 B
React

"use client";
import {useEffect} from 'react';
import links from '../data/shortlinks.json';
export default function Shortlinks(){
useEffect(()=>{
const id=new URLSearchParams(location.search).get('p');
if(!id||!Object.hasOwn(links,id))return;
const target=links[id];
if(typeof target==='string'&&target.startsWith('/articles/'))location.replace(target);
},[]);
return null;
}