Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 09b3d7e commit bad7ffbCopy full SHA for bad7ffb
site/src/pages/index.tsx
@@ -1,6 +1,13 @@
1
import { FC } from "react"
2
-import { Navigate } from "react-router-dom"
+import { Navigate, useSearchParams } from "react-router-dom"
3
4
export const IndexPage: FC = () => {
5
+ const [searchParams, _] = useSearchParams()
6
+ const template = searchParams.get("template")
7
+
8
+ if (template) {
9
+ return <Navigate to={`/templates/${template}`} replace />
10
+ }
11
12
return <Navigate to="/workspaces" replace />
13
}
0 commit comments