mirror of
https://github.com/Buriburizaem0n/nezha-dash-v1.git
synced 2026-09-21 02:30:15 +00:00
feat: implement command context and provider for command handling; add search button component; enhance network chart with packet loss calculation and display; update translations for new features
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import { CommandContext } from "@/context/command-context"
|
||||
import { useContext } from "react"
|
||||
|
||||
export function useCommand() {
|
||||
const context = useContext(CommandContext)
|
||||
if (context === undefined) {
|
||||
throw new Error("useCommand must be used within a CommandProvider")
|
||||
}
|
||||
return context
|
||||
}
|
||||
Reference in New Issue
Block a user