|
1 | | -import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; |
2 | | -import HomepageFeatures from "@site/src/components/HomepageFeatures"; |
3 | | -import Layout from "@theme/Layout"; |
4 | | - |
5 | | -// function HomepageHeader() { |
6 | | -// const { siteConfig } = useDocusaurusContext(); |
7 | | -// return ( |
8 | | -// <header className={clsx("hero hero--primary", styles.heroBanner)}> |
9 | | -// <div className="container"> |
10 | | -// <Heading as="h1" className="hero__title"> |
11 | | -// {siteConfig.title} |
12 | | -// </Heading> |
13 | | -// <p className="hero__subtitle">{siteConfig.tagline}</p> |
14 | | -// </div> |
15 | | -// </header> |
16 | | -// ); |
17 | | -// } |
18 | | - |
19 | | -import { useHistory } from "react-router-dom"; // Import useHistory hook |
20 | | - |
21 | | -function HomepageHeader() { |
22 | | - const history = useHistory(); // Initialize useHistory hook |
23 | | - |
24 | | - // Function to navigate to the Blog section |
25 | | - const goToBlog = () => { |
26 | | - history.push("/blog"); // Redirect to the /blog route |
27 | | - }; |
28 | | - |
29 | | - // Function to navigate to the Docs section |
30 | | - const goToDocs = () => { |
31 | | - history.push("/docs/introduction"); // Redirect to the /docs route |
32 | | - }; |
33 | | - |
34 | | - return ( |
35 | | - <header> |
36 | | - {/* Blog link */} |
37 | | - <button onClick={goToBlog}>Go to Blog</button> |
38 | | - |
39 | | - {/* Docs link */} |
40 | | - <button onClick={goToDocs}>Go to Docs</button> |
41 | | - </header> |
42 | | - ); |
43 | | -} |
| 1 | +import { Redirect } from "@docusaurus/router"; |
44 | 2 |
|
45 | 3 | export default function Home(): JSX.Element { |
46 | | - const { siteConfig } = useDocusaurusContext(); |
47 | | - return ( |
48 | | - <Layout |
49 | | - title={`Docs`} |
50 | | - description="Description will go into a meta tag in <head />" |
51 | | - > |
52 | | - <HomepageHeader /> |
53 | | - <main> |
54 | | - <HomepageFeatures /> |
55 | | - </main> |
56 | | - </Layout> |
57 | | - ); |
| 4 | + // const { siteConfig } = useDocusaurusContext(); |
| 5 | + return <Redirect to="/introduction" />; |
58 | 6 | } |
0 commit comments