import dynamic from 'next/dynamic'; import React from 'react'; import { Amplify } from 'aws-amplify'; import awsExports from '@environments/liveness/liveness-environment/src/aws-exports'; import LivenessDefault from '../components/LivenessDefault'; import Layout from '../components/Layout'; import { Alert, Card, Heading, View, Text } from '@aws-amplify/ui-react'; Amplify.configure({ ...awsExports, API: { endpoints: [ { name: 'SampleBackend', endpoint: 'https://s0ctzw9239.execute-api.us-east-1.amazonaws.com/prod', region: 'us-east-1', // endpoint: '/liveness-next-example/api', }, ], }, Analytics: { autoSessionRecord: false, }, }); const App = () => { return ( { return ( Face liveness check You will go through a face verification process to prove that you are a real person. ); }, PhotosensitiveWarning: (): JSX.Element => { return ( This check displays colored lights. Use caution if you are photosensitive. ); }, Instructions: (): JSX.Element => { return ( Instructions to follow to use liveness face detector
  1. Make sure your face is not covered with sunglasses or a mask.
  2. Move to a well-lit place that is not dark or in direct sunlight.
  3. Fill onscreen oval with your face and hold for colored lights.
); }, ErrorView: ({ error, children }) => { return ( My Custom Error Modal Hey there was an error: {error} {children} ); }, }} />
); }; export default dynamic(() => Promise.resolve(App), { ssr: false, });