Skip to content

Commit

Permalink
1541: remote component now works
Browse files Browse the repository at this point in the history
  • Loading branch information
sinejespersen committed May 29, 2024
1 parent ff94967 commit 855c043
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 19 deletions.
9 changes: 0 additions & 9 deletions config-overrides.js

This file was deleted.

8 changes: 4 additions & 4 deletions src/components/slide/preview/remote-component-wrapper.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { React, useEffect, useState } from "react";
import { Button } from "react-bootstrap";
import PropTypes from "prop-types";
import { useTranslation } from "react-i18next";
// import { useRemoteComponent } from "./remote-component-helper";
import { useRemoteComponent } from "./remote-component-helper";
import ErrorBoundary from "../../../error-boundary";
import "./remote-component-wrapper.scss";

Expand Down Expand Up @@ -32,7 +32,7 @@ function RemoteComponentWrapper({
}) {
const { t } = useTranslation("common");
const [remoteComponentSlide, setRemoteComponentSlide] = useState(null);
// const [loading, err, Component] = useRemoteComponent(url);
const [loading, err, Component] = useRemoteComponent(url);
const [runId, setRunId] = useState("");

/** Create remoteComponentSlide from slide and mediaData */
Expand Down Expand Up @@ -101,7 +101,7 @@ function RemoteComponentWrapper({
id="EXE-ID-PREVIEW"
>
<ErrorBoundary errorText="remote-component.error-boundary-text">
{/* {loading && <div />}
{loading && <div />}
{!loading && err == null && remoteComponentSlide && Component && (
<Component
slide={remoteComponentSlide}
Expand All @@ -110,7 +110,7 @@ function RemoteComponentWrapper({
slideDone={() => {}}
executionId="EXE-ID-PREVIEW"
/>
)} */}
)}
</ErrorBoundary>
</div>
</div>
Expand Down
10 changes: 4 additions & 6 deletions src/remote-component.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/* eslint-disable global-require */
/** Dependencies for Remote Components */
module.exports = {
resolve: {
react: require("react"),
},
import react from 'react';

export const resolve = {
react
};

0 comments on commit 855c043

Please sign in to comment.