We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b722a42 commit cce6bacCopy full SHA for cce6bac
src/pages/admin/index.tsx
@@ -1,14 +1,12 @@
1
import React, { useEffect } from 'react';
2
+import useBaseUrl from '@docusaurus/useBaseUrl';
3
+
4
+export default function AdminRedirect() {
5
+ const adminUrl = useBaseUrl('/admin/index.html');
6
-export default function AdminRedirect(): JSX.Element {
7
useEffect(() => {
- const base = document?.querySelector('base')?.getAttribute('href') || '/';
- window.location.href = `${base}admin/index.html`;
8
+ window.location.href = adminUrl;
9
}, []);
10
- return (
- <main>
11
- <p>Redirecting to Tina admin...</p>
12
- </main>
13
- );
+ return <p>Redirecting to Tina Admin...</p>;
14
}
0 commit comments