Skip to content

Commit

Permalink
fix redirect in docs (#247)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gkrumbach07 authored Oct 15, 2024
1 parent 003bbac commit 56f786a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
6 changes: 0 additions & 6 deletions gatsby-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,6 @@ export const createPages: GatsbyNode["createPages"] = async ({
}) => {
const { createPage, createRedirect } = actions;

createRedirect({
fromPath: "/docs/",
isPermanent: false,
redirectInBrowser: true,
toPath: "/docs/getting-started-with-open-data-hub",
});

const docsResult = await graphql<QueryResult>(`
query docFiles {
Expand Down
12 changes: 12 additions & 0 deletions src/pages/docs/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React, { useEffect } from 'react'
import { navigate } from "gatsby"

const DocsRedirect: React.FC = () => {
useEffect(() => {
navigate("/docs/getting-started-with-open-data-hub")
}, [])

return null
}

export default DocsRedirect

0 comments on commit 56f786a

Please sign in to comment.