You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
428 B
JavaScript
14 lines
428 B
JavaScript
3 years ago
|
import Link from 'next/link'
|
||
|
import redirect from '~/utils/redirectGetInitialProps'
|
||
|
|
||
|
Redirect.getInitialProps = async function({ctx}) {
|
||
|
const {axios, query: {slug}} = ctx;
|
||
|
redirect(ctx, 302, `/store/item/${slug}`)
|
||
|
return {slug}
|
||
|
}
|
||
|
|
||
|
export default function Redirect({slug}) {
|
||
|
return (
|
||
|
<p>This page has moved to <Link href={`/store/item/${slug}`}><a>{`https://societyofsocks.us/store/item/${slug}`}</a></Link></p>
|
||
|
)
|
||
|
}
|