Skip to content

Commit

Permalink
Respond to /docs route and do redirection (#4174)
Browse files Browse the repository at this point in the history
  • Loading branch information
younggglcy authored May 6, 2024
1 parent ae1408a commit c8c9832
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions packages/website/src/pages/docs.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { useRouter } from 'next/navigation';
import { useEffect } from 'react';
import docs from '../data/docs';

const Docs = () => {
const router = useRouter();

useEffect(() => {
router.replace(docs[0].url);
}, [router]);

return null;
};

export default Docs;

0 comments on commit c8c9832

Please sign in to comment.