uikit/deploy-demo/main.jsx
Mohamadzadeh 36b003914e
All checks were successful
Build and Deploy Next.js + Nginx Docker Image / build-and-deploy (push) Successful in 54s
Build and Deploy Next.js + Nginx Docker Image / deploy (push) Successful in 7s
build and fix build
2026-10-03 19:56:24 +03:30

21 lines
851 B
JavaScript

import React from "react";
import ReactDOM from "react-dom/client";
import { DEFAULT_REMOTE_URLS } from "../src/remote/ui/_core/constants.js";
// The deployed preview must exercise the same remote files that consumer apps load.
// Keep the filenames stable; only resolve them against the current deployment origin.
const remoteBaseUrl = window.location.origin;
DEFAULT_REMOTE_URLS.AppHeader = `${remoteBaseUrl}/AppHeader.js`;
DEFAULT_REMOTE_URLS.AppSidebar = `${remoteBaseUrl}/AppSidebar.js`;
DEFAULT_REMOTE_URLS.Pagination = `${remoteBaseUrl}/Pagination.js`;
DEFAULT_REMOTE_URLS.GBadge = `${remoteBaseUrl}/GBadge.js`;
import("../src/dev/AppHeaderPreview.jsx").then(({ default: RemoteUiPreview }) => {
ReactDOM.createRoot(document.getElementById("root")).render(
<React.StrictMode>
<RemoteUiPreview />
</React.StrictMode>,
);
});