mirror of
https://github.com/wassname/optuna-dashboard.git
synced 2026-10-30 13:30:17 +08:00
Implement useQuery in queryUtil.ts
This commit is contained in:
1 parent
6752b17be5
commit
4c0f5e5347
1 file changed
+7
@@ -0,0 +1,7 @@
|
||||
import { useLocation } from "react-router-dom"
|
||||
import { useMemo } from "react"
|
||||
|
||||
export const useQuery = (): URLSearchParams => {
|
||||
const { search } = useLocation()
|
||||
return useMemo(() => new URLSearchParams(search), [search])
|
||||
}
|
||||
Reference in new issue
Block a user