'use client'; import { DiscordLogoIcon, HomeIcon } from '@radix-ui/react-icons'; import { Button, Flex, Heading, Text } from '@radix-ui/themes'; import Link from 'next/link'; import { redirect, usePathname } from 'next/navigation'; import PageWrapper from '../components/PageWrapper'; const redirects = new Map([ ['/tools/ratings', '/tools/rating'], ['/tools/tank-performance', '/tools/performance'], ]); export default function Page() { const pathname = usePathname(); redirects.forEach((to, from) => { if (pathname.startsWith(from)) { redirect(to); } }); return ( 404: page not found Where would you like to go? ); }