-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added CaptureSelectionPage & DamageDisclosure in
demo-app
- Loading branch information
Showing
10 changed files
with
80 additions
and
1 deletion.
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
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
Empty file.
17 changes: 17 additions & 0 deletions
17
apps/demo-app/src/pages/CaptureSelectionPage/CaptureSelectionPage.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,17 @@ | ||
import { CaptureSelection } from '@monkvision/common-ui-web'; | ||
import { useNavigate } from 'react-router-dom'; | ||
import { useTranslation } from 'react-i18next'; | ||
import { Page } from '../pages'; | ||
|
||
export function CaptureSelectionPage() { | ||
const navigate = useNavigate(); | ||
const { i18n } = useTranslation(); | ||
|
||
return ( | ||
<CaptureSelection | ||
lang={i18n.language} | ||
onCapture={() => navigate(Page.PHOTO_CAPTURE)} | ||
onAddDamage={() => navigate(Page.DAMAGE_DISCLOSURE)} | ||
/> | ||
); | ||
} |
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 @@ | ||
export * from './CaptureSelectionPage'; |
7 changes: 7 additions & 0 deletions
7
apps/demo-app/src/pages/DamageDisclosurePage/DamageDisclosurePage.module.css
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,7 @@ | ||
.container { | ||
width: 100%; | ||
height: 100%; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
} |
30 changes: 30 additions & 0 deletions
30
apps/demo-app/src/pages/DamageDisclosurePage/DamageDisclosurePage.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,30 @@ | ||
import { useTranslation } from 'react-i18next'; | ||
import { useMonkAppState } from '@monkvision/common'; | ||
import { DamageDisclosure } from '@monkvision/inspection-capture-web'; | ||
import { useNavigate } from 'react-router-dom'; | ||
import styles from './DamageDisclosurePage.module.css'; | ||
import { Page } from '../pages'; | ||
|
||
export function DamageDisclosurePage() { | ||
const navigate = useNavigate(); | ||
const { i18n } = useTranslation(); | ||
const { config, authToken, inspectionId } = useMonkAppState({ | ||
requireInspection: true, | ||
}); | ||
|
||
return ( | ||
<div className={styles['container']}> | ||
<DamageDisclosure | ||
{...config} | ||
apiConfig={{ | ||
authToken, | ||
apiDomain: config.apiDomain, | ||
thumbnailDomain: config.thumbnailDomain, | ||
}} | ||
inspectionId={inspectionId} | ||
onComplete={() => navigate(Page.PHOTO_CAPTURE)} | ||
lang={i18n.language} | ||
/> | ||
</div> | ||
); | ||
} |
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 @@ | ||
export * from './DamageDisclosurePage'; |
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