Skip to content

Commit e81cb5c

Browse files
karan925tyaga001
authored andcommitted
Update routing and styling
1 parent 12fac5d commit e81cb5c

File tree

2 files changed

+4
-55
lines changed

2 files changed

+4
-55
lines changed

docs/introduction/about.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ title: What is CodeRabbit?
44
sidebar_label: What is CodeRabbit?
55
description: Accelerate Code Reviews with AI
66
image: "/preview_meta.jpg"
7+
slug: "/"
78
---
89

910
<head>

src/pages/index.tsx

Lines changed: 3 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,6 @@
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";
442

453
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" />;
586
}

0 commit comments

Comments
 (0)