import type {GetServerSideProps} from 'next'; import {publicPostId} from '@/lib/model'; import {getPost} from '@/lib/library'; export default function LegacyPost(){return null;} export const getServerSideProps:GetServerSideProps=async({params,query})=>{const post=await getPost(String(params?.slug||''));return post?{redirect:{destination:'/explore/'+publicPostId(post)+(String(query.agent_mode||'').toLowerCase()==='true'?'?agent_mode=True':''),permanent:true}}:{notFound:true};};