mirror of
https://github.com/warmbly/warmbly.git
synced 2026-10-15 00:02:42 +00:00
11 lines
262 B
TypeScript
11 lines
262 B
TypeScript
'use client';
|
|
import { useEffect } from 'react';
|
|
|
|
// Client half of the root redirect; the page's meta refresh covers loads without JS.
|
|
export function Redirect({ to }: { to: string }) {
|
|
useEffect(() => {
|
|
location.replace(to);
|
|
}, [to]);
|
|
return null;
|
|
}
|