mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-24 20:44:52 -05:00
12 lines
250 B
TypeScript
12 lines
250 B
TypeScript
import { useNavigate } from "@remix-run/react";
|
|
import * as React from "react";
|
|
|
|
export function Navigate({ to }: { to: string }) {
|
|
const navigate = useNavigate();
|
|
React.useEffect(() => {
|
|
navigate(to);
|
|
}, [navigate, to]);
|
|
|
|
return null;
|
|
}
|