Resolve final reviewer shortlink and editorial findings
Build and deploy / deploy (push) Failing after 1m30s
Build and deploy / deploy (push) Failing after 1m30s
This commit is contained in:
1 parent
69607c52fd
commit
0524a74976
15 files changed
+641
-140
No files matched your search
@@ -1,4 +1,12 @@
|
||||
"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&&links[id])location.replace(links[id]);},[]);return null;}
|
||||
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;
|
||||
}
|
||||
Reference in new issue
Block a user