mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-04-23 07:34:07 -05:00
13 lines
251 B
TypeScript
13 lines
251 B
TypeScript
import { useNavigate } from "@remix-run/react";
|
|
import * as React from "react";
|
|
|
|
export function Redirect({ to }: { to: string }) {
|
|
const navigate = useNavigate();
|
|
|
|
React.useEffect(() => {
|
|
navigate(to);
|
|
}, [navigate, to]);
|
|
|
|
return null;
|
|
}
|