Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
32 lines
673 B
Plaintext
32 lines
673 B
Plaintext
'use client';
|
|
|
|
import { c as _c } from "react/compiler-runtime";
|
|
import { useEffect } from 'react';
|
|
import { useAuth } from '../../providers/Auth/index.js';
|
|
export function HydrateAuthProvider(t0) {
|
|
const $ = _c(4);
|
|
const {
|
|
permissions
|
|
} = t0;
|
|
const {
|
|
setPermissions
|
|
} = useAuth();
|
|
let t1;
|
|
let t2;
|
|
if ($[0] !== permissions || $[1] !== setPermissions) {
|
|
t1 = () => {
|
|
setPermissions(permissions);
|
|
};
|
|
t2 = [permissions, setPermissions];
|
|
$[0] = permissions;
|
|
$[1] = setPermissions;
|
|
$[2] = t1;
|
|
$[3] = t2;
|
|
} else {
|
|
t1 = $[2];
|
|
t2 = $[3];
|
|
}
|
|
useEffect(t1, t2);
|
|
return null;
|
|
}
|
|
//# sourceMappingURL=index.js.map |