import { useLocation } from "react-router-dom" ; import { Class } from "./typings/interfaces" ; export function useQuery ( ) { return new URLSearchParams ( useLocation ( ) . search ) ; } export function shuffle ( array ) { if ( ! array || array . length === 0 ) { return [ ] ; } var a = array . length , c , i ; while ( a ) { i = Math . floor ( Math . random ( ) * a -- ) ; c = array [ a ] ; array [ a ] = array [ i ] ; array [ i ] = c ; } return array ; }