feat(dashboard,ui): Streamline spacing and sizing (#6061)

This commit is contained in:
Kasper Fabricius Kristensen
2024-01-15 11:43:16 +01:00
committed by GitHub
parent 5dacd4ac9f
commit a2c149e7e5
266 changed files with 10738 additions and 4646 deletions
@@ -0,0 +1,16 @@
import { useSearchParams } from "react-router-dom"
export function useQueryParams<T extends string>(
keys: T[]
): Record<T, string | undefined> {
const [params] = useSearchParams()
// Use a type assertion to initialize the result
const result = {} as Record<T, string | undefined>
keys.forEach((key) => {
result[key] = params.get(key) || undefined
})
return result
}