From 582160a8a14e7423a6509555ebf2b447c34f44e9 Mon Sep 17 00:00:00 2001 From: sergesoroka Date: Thu, 29 Aug 2024 10:14:52 +0200 Subject: [PATCH] Using query params to display h5web component --- components/h5web/h5web.jsx | 6 ++++-- src/App.css | 2 ++ src/App.jsx | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/components/h5web/h5web.jsx b/components/h5web/h5web.jsx index 4e1a08e..97098c0 100755 --- a/components/h5web/h5web.jsx +++ b/components/h5web/h5web.jsx @@ -3,8 +3,10 @@ import "@h5web/app/dist/styles.css"; import { App, HsdsProvider } from "@h5web/app"; // eslint-disable-next-line react/prop-types -export default function H5web({ domain }) { +export default function H5web({ domain, h5webParams }) { console.log("h5web", domain); + console.log("h5webParams", h5webParams); + return (
@@ -12,7 +14,7 @@ export default function H5web({ domain }) { url="https://hsds-kc.ideaconsult.net" username="system-public-user" password="system-public-user" - filepath={`${domain}`} + filepath={`${domain ? domain : h5webParams}`} > diff --git a/src/App.css b/src/App.css index cc55251..7730ef5 100755 --- a/src/App.css +++ b/src/App.css @@ -271,7 +271,9 @@ h1 { align-items: baseline; justify-content: space-between; align-items: flex-start; + flex-direction: column; margin: 1rem 0; + gap: 16px; } .shareBtn { diff --git a/src/App.jsx b/src/App.jsx index be09f41..c26bcef 100755 --- a/src/App.jsx +++ b/src/App.jsx @@ -22,7 +22,7 @@ function App() {
{h5webParams ? ( - + ) : (