-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fetch device code * Device code token retrieved * Add QR code * Add WS auth --------- Co-authored-by: micahg <[email protected]>
- Loading branch information
Showing
12 changed files
with
380 additions
and
16 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
11 changes: 11 additions & 0 deletions
11
src/components/DeviceCodeComponent/DeviceCodeComponent.lazy.tsx
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,11 @@ | ||
import React, { lazy, Suspense } from 'react'; | ||
|
||
const LazyDeviceCodeComponent = lazy(() => import('./DeviceCodeComponent')); | ||
|
||
const DeviceCodeComponent = (props: JSX.IntrinsicAttributes & { children?: React.ReactNode; }) => ( | ||
<Suspense fallback={null}> | ||
<LazyDeviceCodeComponent {...props} /> | ||
</Suspense> | ||
); | ||
|
||
export default DeviceCodeComponent; |
14 changes: 14 additions & 0 deletions
14
src/components/DeviceCodeComponent/DeviceCodeComponent.test.tsx
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,14 @@ | ||
import React from 'react'; | ||
import { render, screen } from '@testing-library/react'; | ||
import '@testing-library/jest-dom/extend-expect'; | ||
import DeviceCodeComponent from './DeviceCodeComponent'; | ||
|
||
describe('<DeviceCodeComponent />', () => { | ||
test('it should mount', () => { | ||
render(<DeviceCodeComponent />); | ||
|
||
const deviceCodeComponent = screen.getByTestId('DeviceCodeComponent'); | ||
|
||
expect(deviceCodeComponent).toBeInTheDocument(); | ||
}); | ||
}); |
Oops, something went wrong.