This file contains hidden or 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
| import { Suspense, useLayoutEffect, useRef, useState } from 'react'; | |
| type IFrameProps = React.ComponentPropsWithRef<'iframe'> & { | |
| fallback?: JSX.Element; | |
| }; | |
| export function IFrame(props: IFrameProps) { | |
| const { fallback, ...rest } = props; | |
| return ( |
This file contains hidden or 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
| import React, { useState, useEffect, createContext, useContext, ReactNode } from 'react' | |
| import Amplify, { Auth, Hub } from 'aws-amplify' | |
| import { CognitoUser } from '@aws-amplify/auth' | |
| import { CognitoUserSession } from 'amazon-cognito-identity-js' | |
| import { HubCallback } from '@aws-amplify/core/lib/Hub' | |
| import IUser from '../../types/IUser' | |
| interface IAuthContext { | |
| user: IUser | null | |
| login(username: string, password: string): Promise<CognitoUser> |