Skip to content

Commit

Permalink
refactor: layout
Browse files Browse the repository at this point in the history
  • Loading branch information
TinsFox committed Nov 2, 2024
1 parent b1be784 commit c884b96
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 77 deletions.
66 changes: 0 additions & 66 deletions src/components/layout/page-header.tsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import { Button } from "@/components/ui/button"
import { languages } from "@/i18n"
import { cn } from "@/lib/utils"

import { Icons } from "../icons"
import { useTheme } from "../theme/theme-provider"
import { Icons } from "./icons"
import { useTheme } from "./theme/theme-provider"
import {
CommandDialog,
CommandEmpty,
Expand All @@ -20,7 +20,7 @@ import {
CommandItem,
CommandList,
CommandSeparator,
} from "../ui/command"
} from "./ui/command"

export function Search({ ...props }: ButtonProps & DialogProps) {
const navigate = useNavigate()
Expand Down
12 changes: 6 additions & 6 deletions src/pages/(admin)/charts/[chartName]/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { Link, Outlet, useLoaderData } from "react-router-dom"

import { Announcement } from "@/components/announcement"
import {
PageActions,
PageHeader,
PageHeaderDescription,
PageHeaderHeading,
} from "@/components/layout/page-header"
import { ThemesSwitcher } from "@/components/theme/themes-selector"
import { Button } from "@/components/ui/button"
import { THEMES } from "@/lib/themes"

import { ChartsNav } from "../charts-nav"
import {
PageActions,
PageHeader,
PageHeaderDescription,
PageHeaderHeading,
} from "../components/page-header"

export const loader = async ({
params,
Expand Down
2 changes: 1 addition & 1 deletion src/pages/(admin)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { Link, Outlet, redirect } from "react-router-dom"

import { AppSidebar } from "@/components/app-sidebar"
import { Icons } from "@/components/icons"
import { Search } from "@/components/layout/search"
import { NavBreadcrumb } from "@/components/nav-breadcrumb"
import { Search } from "@/components/search"
import { ThemeCustomizer } from "@/components/theme/theme-customizer"
import { ThemeSwitcher } from "@/components/theme/theme-switcher"
import { Button } from "@/components/ui/button"
Expand Down
2 changes: 1 addition & 1 deletion src/pages/(main)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Link, Outlet } from "react-router-dom"

import { Logo } from "@/components/icons/logo"
import { Search } from "@/components/layout/search"
import { Search } from "@/components/search"
import { Button } from "@/components/ui/button"

export function Component() {
Expand Down

0 comments on commit c884b96

Please sign in to comment.