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>
|
<BreadcrumbList>
|
||||||
{breadcrumbs.length === 1 && (
|
{breadcrumbs.length === 1 && (
|
||||||
<BreadcrumbItem>
|
<BreadcrumbItem>
|
||||||
<Link to="/">Ironmount</Link>
|
<Link to="/volumes">Ironmount</Link>
|
||||||
</BreadcrumbItem>
|
</BreadcrumbItem>
|
||||||
)}
|
)}
|
||||||
{breadcrumbs.map((breadcrumb, index) => {
|
{breadcrumbs.map((breadcrumb, index) => {
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import { cn } from "~/lib/utils";
|
|||||||
const items = [
|
const items = [
|
||||||
{
|
{
|
||||||
title: "Volumes",
|
title: "Volumes",
|
||||||
url: "/",
|
url: "/volumes",
|
||||||
icon: HardDrive,
|
icon: HardDrive,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -42,7 +42,7 @@ export function AppSidebar() {
|
|||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger asChild>
|
<TooltipTrigger asChild>
|
||||||
<SidebarMenuButton asChild>
|
<SidebarMenuButton asChild>
|
||||||
<NavLink to={item.url} end>
|
<NavLink to={item.url}>
|
||||||
{({ isActive }) => (
|
{({ isActive }) => (
|
||||||
<>
|
<>
|
||||||
<item.icon className={cn({ "text-strong-accent": 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
|
// Always start with Home
|
||||||
breadcrumbs.push({
|
breadcrumbs.push({
|
||||||
label: "Volumes",
|
label: "Volumes",
|
||||||
href: "/",
|
href: "/volumes",
|
||||||
isCurrentPage: pathname === "/",
|
isCurrentPage: pathname === "/volumes",
|
||||||
});
|
});
|
||||||
|
|
||||||
// Handle volume details page
|
// 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 [
|
export default [
|
||||||
route("onboarding", "./routes/onboarding.tsx"),
|
route("onboarding", "./routes/onboarding.tsx"),
|
||||||
route("login", "./routes/login.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;
|
] satisfies RouteConfig;
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ export default function DetailsPage({ loaderData }: Route.ComponentProps) {
|
|||||||
...deleteVolumeMutation(),
|
...deleteVolumeMutation(),
|
||||||
onSuccess: () => {
|
onSuccess: () => {
|
||||||
toast.success("Volume deleted successfully");
|
toast.success("Volume deleted successfully");
|
||||||
navigate("/");
|
navigate("/volumes");
|
||||||
},
|
},
|
||||||
onError: (error) => {
|
onError: (error) => {
|
||||||
toast.error("Failed to delete volume", {
|
toast.error("Failed to delete volume", {
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ export default function LoginPage() {
|
|||||||
const login = useMutation({
|
const login = useMutation({
|
||||||
...loginMutation(),
|
...loginMutation(),
|
||||||
onSuccess: async () => {
|
onSuccess: async () => {
|
||||||
navigate("/");
|
navigate("/volumes");
|
||||||
},
|
},
|
||||||
onError: (error) => {
|
onError: (error) => {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ export default function OnboardingPage() {
|
|||||||
...registerMutation(),
|
...registerMutation(),
|
||||||
onSuccess: async () => {
|
onSuccess: async () => {
|
||||||
toast.success("Admin user created successfully!");
|
toast.success("Admin user created successfully!");
|
||||||
navigate("/");
|
navigate("/volumes");
|
||||||
},
|
},
|
||||||
onError: (error) => {
|
onError: (error) => {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
|||||||
Reference in New Issue
Block a user