d8d-design-web-player
v0.0.45
Published
d8d-design-web-player
Downloads
25
Readme
import {
D8dWebPlayer,
getHashUrlParams,
useLoadMap,
} from "d8d-design-web-player";
const AppLoadUrl = `${import.meta.env.VITE_API_HOST}/api/website/app/search`;
export default () => {
const { treeid, appId } = getHashUrlParams() as { [key: string]: string };
const [AppMap, FrontendConfig] = useLoadMap({
appId,
url: AppLoadUrl,
});
const ApiConfig = {
PlayCloudHost: import.meta.env.VITE_PLAY_CLOUD_HOST,
AppLoad: AppLoadUrl,
};
return (
<D8dWebPlayer
playerMode="preview"
// playerMode="stage"
treeid={treeid}
AppId={appId}
ApiConfig={ApiConfig}
FrontendCodeMap={AppMap}
FrontendConfig={FrontendConfig}
/>
);
};