mirror of
https://github.com/eigent-ai/eigent.git
synced 2026-04-29 04:00:09 +00:00
Initial commit of eigent-main
This commit is contained in:
commit
723df5a03e
1144 changed files with 103478 additions and 0 deletions
28
package/@stackframe/react/dist/esm/components/iframe-preventer.js
vendored
Normal file
28
package/@stackframe/react/dist/esm/components/iframe-preventer.js
vendored
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
"use client";
|
||||
"use client";
|
||||
|
||||
// src/components/iframe-preventer.tsx
|
||||
import { useEffect, useState } from "react";
|
||||
import { jsxs } from "react/jsx-runtime";
|
||||
function IframePreventer({ children }) {
|
||||
const [isIframe, setIsIframe] = useState(false);
|
||||
useEffect(() => {
|
||||
if (window.self !== window.top) {
|
||||
setIsIframe(true);
|
||||
}
|
||||
}, []);
|
||||
if (isIframe) {
|
||||
return /* @__PURE__ */ jsxs("div", { children: [
|
||||
"Stack Auth components may not run in an ",
|
||||
"<",
|
||||
"iframe",
|
||||
">",
|
||||
"."
|
||||
] });
|
||||
}
|
||||
return children;
|
||||
}
|
||||
export {
|
||||
IframePreventer
|
||||
};
|
||||
//# sourceMappingURL=iframe-preventer.js.map
|
||||
Loading…
Add table
Add a link
Reference in a new issue