diff --git a/js-miniapp-sample/src/pages/uuid-sdk.js b/js-miniapp-sample/src/pages/uuid-sdk.js index 0c8bc144d..f8d304047 100644 --- a/js-miniapp-sample/src/pages/uuid-sdk.js +++ b/js-miniapp-sample/src/pages/uuid-sdk.js @@ -11,16 +11,21 @@ import { CopyToClipboard } from 'react-copy-to-clipboard'; import { connect } from 'react-redux'; import GreyCard from '../components/GreyCard'; -import { setMessagingUniqueId, setMauid } from '../services/uuid/actions'; +import { + setMessagingUniqueId, + setMauid, + setUniqueId, +} from '../services/uuid/actions'; const useStyles = makeStyles((theme) => ({ card: { width: '100%', - height: '250px', + height: 'auto', marginTop: '40px', + display: 'grid', }, content: { - height: '16%', + height: 'auto', justifyContent: 'center', display: 'flex', flexDirection: 'column', @@ -39,10 +44,13 @@ const useStyles = makeStyles((theme) => ({ })); type UUIDProps = { + uniqueId: string, messagingUniqueId: string, mauid: string, + uniqueIdError: string, messagingUniqueIdError: string, mauidError: string, + getUniqueId: Function, getMessagingUniqueId: Function, getMauid: Function, }; @@ -64,12 +72,55 @@ const UuidFetcher = (props: UUIDProps) => { return ( + + {props.uniqueId ?? props.uniqueIdError ?? 'Not Available'} + + + + + + + { + setCopyStatus({ success: false, error: false }); + }} + message="Copied to clipboard !!" + /> + { + setCopyStatus({ success: false, error: false }); + }} + message="Failed to copy!" + /> + {props.messagingUniqueId ?? props.messagingUniqueIdError ?? 'Not Available'} -