import type { Attributes } from 'preact' ; import { route } from 'preact-router' ; type RedirectProps = Attributes & { to : string ; } ; export default function Redirect ( { to } ) { route ( to ) ; return null ; }