Files
cstb-next/src/components/window/Header.tsx

21 lines
769 B
TypeScript
Raw Normal View History

2025-03-22 17:50:55 +08:00
import { useSteamStore } from "@/store/steam"
2025-03-23 22:41:19 +08:00
import { useRouter } from "next/navigation"
2025-03-22 17:50:55 +08:00
2024-09-20 23:15:42 +08:00
const Header = () => {
2025-03-22 17:50:55 +08:00
const steam = useSteamStore()
2025-03-23 22:41:19 +08:00
const router = useRouter()
2025-03-22 17:50:55 +08:00
2024-09-20 23:15:42 +08:00
return (
<div className="pt-6 select-none pb-9" data-tauri-drag-region>
2025-03-23 22:41:19 +08:00
<h1 className="mb-0.5 text-xl font-semibold tracking-wide w-fit active:scale-95 transition cursor-pointer" onClick={() => router.push('/users')}>
{steam.currentUser()?.persona_name || 'CS工具箱'}
2024-09-20 23:15:42 +08:00
</h1>
2025-03-23 22:41:19 +08:00
<p className="text-sm font-light tracking-wide transition cursor-pointer text-zinc-400 w-fit active:scale-95" onClick={() => router.push('/users')}>
{steam.currentUser()?.account_name || '本周使用CS工具箱 114 小时'}
2024-09-20 23:15:42 +08:00
</p>
</div>
2024-11-11 10:04:00 +08:00
)
}
2024-09-20 23:15:42 +08:00
2024-11-11 10:04:00 +08:00
export default Header