declaring cookie consent var
This commit is contained in:
parent
b1b20d1898
commit
ae38fdb924
|
|
@ -4,6 +4,8 @@ import CountriesJSON from "../data/countries/countries.json";
|
||||||
export const UserContext = createContext();
|
export const UserContext = createContext();
|
||||||
|
|
||||||
export function UserContextProvider({ children }) {
|
export function UserContextProvider({ children }) {
|
||||||
|
const [hasConsentedCookies, setHasConsentedCookies] = useState(false);
|
||||||
|
|
||||||
const localLanguage = localStorage.getItem("userLanguage") || "FR";
|
const localLanguage = localStorage.getItem("userLanguage") || "FR";
|
||||||
const localCountry = JSON.parse(localStorage.getItem("userCountry")) || {
|
const localCountry = JSON.parse(localStorage.getItem("userCountry")) || {
|
||||||
name: "belgique",
|
name: "belgique",
|
||||||
|
|
@ -59,6 +61,8 @@ export function UserContextProvider({ children }) {
|
||||||
changeUserLanguage,
|
changeUserLanguage,
|
||||||
// changeLanguage,
|
// changeLanguage,
|
||||||
country,
|
country,
|
||||||
|
hasConsentedCookies,
|
||||||
|
setHasConsentedCookies,
|
||||||
setLanguage,
|
setLanguage,
|
||||||
changeCountry,
|
changeCountry,
|
||||||
profile,
|
profile,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user