Skip to content

Commit

Permalink
Implement Client Library and Version (#54)
Browse files Browse the repository at this point in the history
* Implement Client Library and Version

* Adding null check to prevent null access

Co-authored-by: Tim Morse <[email protected]>
  • Loading branch information
Wilsonl9 and timothymorse authored Jul 12, 2022
1 parent c0d65d3 commit 51d86c6
Show file tree
Hide file tree
Showing 6 changed files with 35,428 additions and 764 deletions.
13 changes: 1 addition & 12 deletions demo/src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { render } from 'react-dom';
import { PSClickWrap, PSBrowseWrap } from '../../src';
import { PSClickWrap } from '../../src';
import './styles.css';

class Demo extends React.Component {
Expand Down Expand Up @@ -197,19 +197,8 @@ class Demo extends React.Component {
onClick={this.onClickSubmit}
>
Submit

</button>
<br />
<br />
<br />
<PSBrowseWrap
accessId={process.env.PACTSAFE_ACCESS_ID}
groupKey="example-browsewrap"
linkText="Legal Center"
alwaysVisible
position="right"
/>
<br />
</div>
);
}
Expand Down
16 changes: 16 additions & 0 deletions nwb.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const Dotenv = require('dotenv-webpack');
const { version } = require('./package.json');

module.exports = {
type: 'react-component',
Expand All @@ -21,4 +22,19 @@ module.exports = {
],
},
},
babel: {
plugins: [
[
'search-and-replace',
{
rules: [
{
search: '_client-version',
replace: version,
},
],
},
],
],
},
};
Loading

0 comments on commit 51d86c6

Please sign in to comment.