feat: update routing to redirect to tool paths
- Modified router configuration to set default redirects for the root and wildcard paths to "/tool" and "/tool/uuid". - Simplified loader functions for cleaner code.
This commit is contained in:
@@ -24,7 +24,7 @@ const router = createBrowserRouter([
|
|||||||
)),
|
)),
|
||||||
{
|
{
|
||||||
index: true,
|
index: true,
|
||||||
element: null,
|
loader: () => redirect("/tool/uuid"),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -32,15 +32,11 @@ const router = createBrowserRouter([
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
index: true,
|
index: true,
|
||||||
loader: () => {
|
loader: () => redirect("/tool"),
|
||||||
return redirect("/tool");
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "*",
|
path: "*",
|
||||||
loader: () => {
|
loader: () => redirect("/tool"),
|
||||||
return redirect("/tool");
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user