[feat] optimization for getting cs2 path + add Toast for auto path
This commit is contained in:
@@ -1,26 +1,13 @@
|
||||
"use client"
|
||||
import SteamUsers from "@/components/cstb/SteamUsers"
|
||||
import {
|
||||
Card,
|
||||
CardBody,
|
||||
CardHeader,
|
||||
CardIcon,
|
||||
CardTool,
|
||||
} from "@/components/window/Card"
|
||||
import { ToolButton } from "@/components/window/ToolButton"
|
||||
import { cn } from "@heroui/react"
|
||||
import {
|
||||
AssemblyLine, HardDisk, SettingConfig,
|
||||
UploadOne
|
||||
} from "@icon-park/react"
|
||||
import { usePathname, useRouter } from "next/navigation"
|
||||
// import { usePathname, useRouter } from "next/navigation"
|
||||
// import { platform } from "@tauri-apps/plugin-os"
|
||||
|
||||
export default function PreferenceLayout({
|
||||
children,
|
||||
}: { children: React.ReactNode }) {
|
||||
const router = useRouter()
|
||||
const pathname = usePathname()
|
||||
// const router = useRouter()
|
||||
// const pathname = usePathname()
|
||||
|
||||
return (
|
||||
<div className="flex w-full gap-3">
|
||||
|
||||
@@ -13,13 +13,10 @@ export default function Providers({ children }: { children: React.ReactNode }) {
|
||||
|
||||
return (
|
||||
<HeroUIProvider
|
||||
className={cn(
|
||||
"h-full bg-zinc-100/90 dark:bg-zinc-900",
|
||||
os === "macos" && "rounded-lg",
|
||||
)}
|
||||
className={cn("h-full bg-zinc-200/90 dark:bg-zinc-900", os === "macos" && "rounded-lg")}
|
||||
>
|
||||
<NextThemesProvider attribute="class" defaultTheme="light">
|
||||
<ToastProvider toastOffset={10} placement="top-center" />
|
||||
<ToastProvider toastOffset={10} placement="top-center" toastProps={{ timeout: 3000 }} />
|
||||
{children}
|
||||
</NextThemesProvider>
|
||||
</HeroUIProvider>
|
||||
|
||||
Reference in New Issue
Block a user