@plutoxyz/frame-js
Version:
SDK for integrating with Pluto Frame
21 lines (20 loc) • 680 B
JavaScript
// This stub is used in SSR environments to prevent "window is not defined" errors
// /**
// * This file is shipped to every Node / RSC environment
// * so SSR never loads the real browser bundle.
// */
export const connect = () => {
throw new Error("`connect()` is a browser-only API");
};
export const resetConnection = connect;
export const isConnected = () => false;
export const isInitialized = () => false;
export const initialize = connect;
// Add a default export so that `import pluto from "@plutoxyz/frame-js"` works even when the Node/RSC stub is resolved
export default {
connect,
resetConnection,
isConnected,
isInitialized,
initialize,
};