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
29
package/@stackframe/react/dist/esm/providers/stack-provider-client.js
vendored
Normal file
29
package/@stackframe/react/dist/esm/providers/stack-provider-client.js
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
"use client";
|
||||
"use client";
|
||||
|
||||
// src/providers/stack-provider-client.tsx
|
||||
import { globalVar } from "@stackframe/stack-shared/dist/utils/globals";
|
||||
import React, { useEffect } from "react";
|
||||
import { useStackApp } from "..";
|
||||
import { StackClientApp, stackAppInternalsSymbol } from "../lib/stack-app";
|
||||
import { jsx } from "react/jsx-runtime";
|
||||
var StackContext = React.createContext(null);
|
||||
function StackProviderClient(props) {
|
||||
const app = props.serialized ? StackClientApp[stackAppInternalsSymbol].fromClientJson(props.app) : props.app;
|
||||
globalVar.__STACK_AUTH__ = { app };
|
||||
return /* @__PURE__ */ jsx(StackContext.Provider, { value: { app }, children: props.children });
|
||||
}
|
||||
function UserSetter(props) {
|
||||
const app = useStackApp();
|
||||
useEffect(() => {
|
||||
const promise = (async () => await props.userJsonPromise)();
|
||||
app[stackAppInternalsSymbol].setCurrentUser(promise);
|
||||
}, []);
|
||||
return null;
|
||||
}
|
||||
export {
|
||||
StackContext,
|
||||
StackProviderClient,
|
||||
UserSetter
|
||||
};
|
||||
//# sourceMappingURL=stack-provider-client.js.map
|
||||
Loading…
Add table
Add a link
Reference in a new issue