Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

Commit

Permalink
Removed user credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
Shilpy Khanna (y509125) authored and Shilpy Khanna (y509125) committed Nov 25, 2021
1 parent 80ecd06 commit cd75c90
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-scripts": "4.0.3",
"sample-react-library-widget": "^1.0.7",
"typescript": "^4.4.2",
"web-vitals": "^1.1.2"
},
Expand Down
21 changes: 10 additions & 11 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
import './App.css';
import { BasicAuth, Client } from '@c8y/client';
import { FetchDeviceDetails } from 'sample-react-library-widget/lib';
import { FetchDeviceDetails } from 'sample-react-library-widget';

function App() {
const auth = new BasicAuth({
user: 'username',
password: 'password',
tenant: 'tenantId'
});

const client = new Client(auth, 'tenantUrl');
client.setAuth(auth);
const fetchClient = client.core;
const auth = new BasicAuth({
user: 'username',
password: 'password',
tenant: 'tenantId'
});
const client = new Client(auth, 'tenantUrl');
client.setAuth(auth);
const fetchClient = client.core;

return (
<div>
<FetchDeviceDetails fetchClient = {fetchClient} id={'2170'}></FetchDeviceDetails>
<FetchDeviceDetails fetchClient = {fetchClient} id={'deviceId'}></FetchDeviceDetails>
</div>
);
}
Expand Down

0 comments on commit cd75c90

Please sign in to comment.