mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-09-30 15:16:39 +08:00
17 lines
383 B
JavaScript
17 lines
383 B
JavaScript
import { useEffect } from 'react';
|
|
import { useLocation } from 'react-router-dom';
|
|
|
|
export default function Jump() {
|
|
const location = useLocation();
|
|
|
|
useEffect(() => {
|
|
const params = new URLSearchParams(location.search);
|
|
const jump = params.get('url');
|
|
if (jump) {
|
|
window.location.href = jump;
|
|
}
|
|
}, [location]);
|
|
|
|
return <div>正在跳转中...</div>;
|
|
}
|