Skip to content

Commit

Permalink
Using query params to display h5web component
Browse files Browse the repository at this point in the history
  • Loading branch information
sergesoroka committed Aug 29, 2024
1 parent 74b442d commit 582160a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions components/h5web/h5web.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,18 @@ 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 (
<div>
<div style={{ height: "90vh" }}>
<HsdsProvider
url="https://hsds-kc.ideaconsult.net"
username="system-public-user"
password="system-public-user"
filepath={`${domain}`}
filepath={`${domain ? domain : h5webParams}`}
>
<App initialPath="/"/>
</HsdsProvider>
Expand Down
2 changes: 2 additions & 0 deletions src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function App() {
<UnderDevelopent />
<div>
{h5webParams ? (
<H5web domain={domain} />
<H5web domain={domain} h5webParams={h5webParams}/>
) : (
<div>
<SearchComp setDomain={setDomain} />
Expand Down

0 comments on commit 582160a

Please sign in to comment.