-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add a deployed app with latest react adobe embed component
- Loading branch information
Ziping Liu
committed
Oct 27, 2023
1 parent
3db1312
commit cbdd7f7
Showing
8 changed files
with
445 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Build and Deploy | ||
|
||
on: | ||
push: | ||
branches: [ "slave" ] | ||
pull_request: | ||
branches: [ "slave" ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- uses: actions/checkout@v3 | ||
- name: Build and then Deploy the static react canary app that uses the react adobe coponent | ||
uses: omkartapale/react-deployment-gh-pages@v1.0.0 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
node_modules | ||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom/client'; | ||
import { HashRouter as Router, Route, Link, Routes } from 'react-router-dom'; | ||
|
||
import ReactViewAdobe from "../src/index" | ||
|
||
export const App = () => { | ||
|
||
return ( | ||
<Router> | ||
<header> | ||
<nav className='navbar navbar-default navbar-fixed'> | ||
<div className="container"> | ||
<div className="navbar-header"> | ||
<div className="navbar-collapse"> | ||
|
||
<ul style={{ | ||
display: "inline-flex", | ||
flexDirection: "row", | ||
justifyContent: "center", | ||
alignItems: "center", | ||
alignContent: "center", | ||
listStyle: "none", | ||
margin: "0", | ||
|
||
}} className="nav navbar-nav"> | ||
<li className="dropdown"> | ||
<Link | ||
style={{ | ||
textDecoration: "none", | ||
padding: "10px", | ||
}} | ||
className="dropdown" to="/test">Test Route</Link> | ||
</li> | ||
<li className="dropdown"> | ||
<Link | ||
style={{ | ||
textDecoration: "none", | ||
padding: "10px", | ||
}} | ||
className='dropdown' to="/home">Home Route</Link> | ||
</li> | ||
</ul> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
</nav> | ||
|
||
</header> | ||
<Routes> | ||
<Route path="/test" element={ | ||
<div className="section container"> | ||
<div className="row"> | ||
<div className="col s12"> | ||
<h5 data-testid="test-route" className="header">Test Route View</h5> | ||
<iframe src="https://ziping-liu-corporation.github.io/react-adobe-embed" style={{ | ||
width: "100%", | ||
height: "900px", | ||
border: "1px solid black", | ||
alignContent: "center", | ||
justifyContent: "center", | ||
|
||
}}></iframe> | ||
</div> | ||
</div> | ||
</div> | ||
} /> | ||
<Route path="*" element={ | ||
<ReactViewAdobe | ||
previewConfig={ | ||
{ | ||
embedMode: "FULL_WINDOW", | ||
defaultViewMode: "FIT_PAGE", | ||
|
||
enableLinearization: true, | ||
|
||
|
||
} | ||
} | ||
|
||
fileMeta= { | ||
{ | ||
"fileName": "23andMe_Ancestry_Book.pdf", | ||
} | ||
} | ||
|
||
style={{ | ||
width: "100%", | ||
height: "900px", | ||
border: "1px solid black", | ||
alignContent: "center", | ||
justifyContent: "center", | ||
|
||
}} | ||
url="https://storage.googleapis.com/laotzu/awslegal/notarized/23andMe_Ancestry_Book.pdf" | ||
clientId={ | ||
window.location.hostname === 'localhost' ? | ||
'324caa2a91b84f688935436cd2d25217' : | ||
'9c16d364507948289a9f65f9ab9da8bf'} | ||
/> | ||
} /> | ||
</Routes> | ||
</Router> | ||
); | ||
} | ||
|
||
|
||
const appelem = document.getElementById('app'); | ||
|
||
if (appelem) { | ||
|
||
const reactrootapp = ReactDOM.createRoot(appelem); | ||
|
||
reactrootapp.render(<App />); | ||
|
||
} | ||
|
||
|
||
|
||
|
||
|
Oops, something went wrong.