eagle-id
Version:
A React based component to perform identity verification
37 lines (30 loc) • 1.02 kB
JavaScript
import { isMobile } from 'react-device-detect'
/* Screen constants */
export const routes = Object.freeze({
PRIVACY_SCREEN: "privacy_screen",
DOCUMENT_SCREEN: "document_screen",
WEBCAM_SCREEN: "webcam_screen",
CONFIRMATION_SCREEN: "confirmation_screen",
SELFIE_SCREEN: "selfie_screen",
UPLOAD_SCREEN: "upload_screen",
RESPONSE_SCREEN: "response_screen",
})
/* Document constants */
export const ID_FRONT = "id_front"
export const ID_BACK = "id_back"
export const VISA = "visa"
export const PASSPORT = "passport"
export const OTHER = "other"
export const SELFIE = "selfie"
/* Overlay constants */
export const OVERLAY_DOCUMENT = "document"
export const OVERLAY_SELFIE = "selfie"
export const OVERLAY_NONE = "none"
/* Camera constants */
export const camera = Object.freeze({
FRONT: "front",
BACK: "back"
})
export const SCREEN_WIDTH = isMobile? window.innerWidth - 25
: window.innerWidth / 3
export const SCREEN_HEIGHT = window.innerHeight - 50