This commit is contained in:
Victor
2024-03-27 10:51:41 +01:00
commit 1b61871097
38 changed files with 9828 additions and 0 deletions
+2
View File
@@ -0,0 +1,2 @@
export * from "./use-auth";
export * from "./use-query";
+7
View File
@@ -0,0 +1,7 @@
import React from "react";
import { AuthenticationContext } from "../contexts";
export function useAuth() {
return React.useContext(AuthenticationContext);
}
+9
View File
@@ -0,0 +1,9 @@
import React from 'react'
import { useLocation } from 'react-router-dom'
export const useQuery = () => {
const { search } = useLocation()
return React.useMemo(() => new URLSearchParams(search), [search])
}