@clerk/nextjs
Version:
Clerk SDK for NextJS
22 lines • 613 B
JavaScript
"use client";
import "../../chunk-BUSYA2B4.js";
import { useEffect } from "react";
import { canUseKeyless } from "../../utils/feature-flags";
function KeylessCookieSync(props) {
useEffect(() => {
if (canUseKeyless) {
void import("../keyless-actions.js").then(
(m) => m.syncKeylessConfigAction({
...props,
// Preserve the current url and return back, once keys are synced in the middleware
returnUrl: window.location.href
})
);
}
}, []);
return props.children;
}
export {
KeylessCookieSync
};
//# sourceMappingURL=keyless-cookie-sync.js.map