update dep + preference styles setup
This commit is contained in:
@@ -3,7 +3,7 @@ import { RocketOne, Minus, Close, Square } from "@icon-park/react"
|
||||
import { /* relaunch, */ exit } from "@tauri-apps/plugin-process"
|
||||
import { getCurrentWindow } from "@tauri-apps/api/window"
|
||||
// import { platform } from "@tauri-apps/plugin-os"
|
||||
import { useRouter } from "next/navigation"
|
||||
import { useRouter, usePathname } from "next/navigation"
|
||||
|
||||
const Nav = () => {
|
||||
const close = async () => {
|
||||
@@ -32,12 +32,13 @@ const Nav = () => {
|
||||
// await relaunch()
|
||||
// }
|
||||
const router = useRouter()
|
||||
const pathname = usePathname()
|
||||
|
||||
return (
|
||||
<nav className="absolute top-0 right-0 flex flex-row h-16 gap-0.5 p-4" data-tauri-drag-region>
|
||||
<button
|
||||
className="px-2 py-0 transition rounded hover:bg-zinc-200/80 active:scale-95"
|
||||
onClick={() => router.push("/prepare")}
|
||||
onClick={() => pathname !== "/prepare" ? router.push("/prepare") : router.back()}
|
||||
>
|
||||
<RocketOne size={16} />
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user