mirror of
https://github.com/nicotsx/ironmount.git
synced 2025-12-10 12:10:51 +01:00
refactor: / -> /volumes
This commit is contained in:
@@ -19,7 +19,7 @@ export function AppBreadcrumb() {
|
||||
<BreadcrumbList>
|
||||
{breadcrumbs.length === 1 && (
|
||||
<BreadcrumbItem>
|
||||
<Link to="/">Ironmount</Link>
|
||||
<Link to="/volumes">Ironmount</Link>
|
||||
</BreadcrumbItem>
|
||||
)}
|
||||
{breadcrumbs.map((breadcrumb, index) => {
|
||||
|
||||
@@ -16,7 +16,7 @@ import { cn } from "~/lib/utils";
|
||||
const items = [
|
||||
{
|
||||
title: "Volumes",
|
||||
url: "/",
|
||||
url: "/volumes",
|
||||
icon: HardDrive,
|
||||
},
|
||||
{
|
||||
@@ -42,7 +42,7 @@ export function AppSidebar() {
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<SidebarMenuButton asChild>
|
||||
<NavLink to={item.url} end>
|
||||
<NavLink to={item.url}>
|
||||
{({ isActive }) => (
|
||||
<>
|
||||
<item.icon className={cn({ "text-strong-accent": isActive })} />
|
||||
|
||||
@@ -18,8 +18,8 @@ export function generateBreadcrumbs(pathname: string, params: Record<string, str
|
||||
// Always start with Home
|
||||
breadcrumbs.push({
|
||||
label: "Volumes",
|
||||
href: "/",
|
||||
isCurrentPage: pathname === "/",
|
||||
href: "/volumes",
|
||||
isCurrentPage: pathname === "/volumes",
|
||||
});
|
||||
|
||||
// Handle volume details page
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
import { index, layout, type RouteConfig, route } from "@react-router/dev/routes";
|
||||
import { layout, type RouteConfig, route } from "@react-router/dev/routes";
|
||||
|
||||
export default [
|
||||
route("onboarding", "./routes/onboarding.tsx"),
|
||||
route("login", "./routes/login.tsx"),
|
||||
layout("./components/layout.tsx", [index("./routes/home.tsx"), route("volumes/:name", "./routes/details.tsx")]),
|
||||
layout("./components/layout.tsx", [
|
||||
route("volumes", "./routes/home.tsx"),
|
||||
route("volumes/:name", "./routes/details.tsx"),
|
||||
]),
|
||||
] satisfies RouteConfig;
|
||||
|
||||
@@ -52,7 +52,7 @@ export default function DetailsPage({ loaderData }: Route.ComponentProps) {
|
||||
...deleteVolumeMutation(),
|
||||
onSuccess: () => {
|
||||
toast.success("Volume deleted successfully");
|
||||
navigate("/");
|
||||
navigate("/volumes");
|
||||
},
|
||||
onError: (error) => {
|
||||
toast.error("Failed to delete volume", {
|
||||
|
||||
@@ -32,7 +32,7 @@ export default function LoginPage() {
|
||||
const login = useMutation({
|
||||
...loginMutation(),
|
||||
onSuccess: async () => {
|
||||
navigate("/");
|
||||
navigate("/volumes");
|
||||
},
|
||||
onError: (error) => {
|
||||
console.error(error);
|
||||
|
||||
@@ -35,7 +35,7 @@ export default function OnboardingPage() {
|
||||
...registerMutation(),
|
||||
onSuccess: async () => {
|
||||
toast.success("Admin user created successfully!");
|
||||
navigate("/");
|
||||
navigate("/volumes");
|
||||
},
|
||||
onError: (error) => {
|
||||
console.error(error);
|
||||
|
||||
Reference in New Issue
Block a user