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,
|
||||
element: null,
|
||||
loader: () => redirect("/tool/uuid"),
|
||||
},
|
||||
]
|
||||
},
|
||||
@@ -32,15 +32,11 @@ const router = createBrowserRouter([
|
||||
},
|
||||
{
|
||||
index: true,
|
||||
loader: () => {
|
||||
return redirect("/tool");
|
||||
},
|
||||
loader: () => redirect("/tool"),
|
||||
},
|
||||
{
|
||||
path: "*",
|
||||
loader: () => {
|
||||
return redirect("/tool");
|
||||
},
|
||||
loader: () => redirect("/tool"),
|
||||
},
|
||||
]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user