Skip to content

Commit 4e5ab65

Browse files
committed
feat: client redirect
1 parent 45bf188 commit 4e5ab65

File tree

1 file changed

+5
-1
lines changed
  • packages/runtime/plugin-runtime/src/core/context/response

1 file changed

+5
-1
lines changed

packages/runtime/plugin-runtime/src/core/context/response/index.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,8 @@ export const getResponseProxy = () => {
33
};
44
export const setHeaders = (headers: Record<string, string>) => {};
55
export const setStatus = (status: number) => {};
6-
export const redirect = (url: string, init?: number | ResponseInit) => {};
6+
export const redirect = (url: string, init?: number | ResponseInit) => {
7+
console.warn(
8+
`You should not use this API in the browser, please use the router's redirect or useNavigate method.`,
9+
);
10+
};

0 commit comments

Comments
 (0)