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