Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2020
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.10 KB | None | 0 0
  1. import React from 'react'
  2. import styled from "styled-components";
  3. // import { EmbedID } from "trulioo-react";
  4. // import VerifyButton from "@passbase/button/react";
  5. import {StripeProvider} from 'react-stripe-elements'
  6.  
  7. const Picture = styled.img`
  8. border-radius: 50%;
  9. border: 3px solid white;
  10. width: 100px;
  11. `;
  12.  
  13. const additionalFields = {
  14. title: 'Additional Fields',
  15. type: 'object',
  16. required: ['name', 'age'],
  17. properties: {
  18. name: {
  19. title: 'What is your name?',
  20. type: 'string',
  21. },
  22. age: {
  23. title: 'What is your age?',
  24. type: 'number',
  25. },
  26. color: {
  27. title: 'What is your favourite color?',
  28. type: 'string',
  29. enum: ['red', 'yellow', 'blue'],
  30. },
  31. },
  32. };
  33.  
  34. const handleResponse = (e) => {
  35. console.dir(e, {depth: null});
  36. }
  37.  
  38. const handleSubmit = (e) => {
  39. console.dir(e, {depth: null});
  40. }
  41.  
  42. const VerifyFinished = (error, authKey, additionalAttributes) => {
  43. console.log(error, authKey, additionalAttributes);
  44. }
  45.  
  46. function Profile({ user }) {
  47. return (
  48. <div>
  49. <h2>
  50. <Picture src={user.picture} alt={user.displayName} /> Hello, {user.displayName}
  51. </h2>
  52. <p>This is what we know about you:</p>
  53. <ul>
  54. { Object.keys(user).map(key => (
  55. <li key={key}>{key}: {user[key].toString()}</li>
  56. ))}
  57. </ul>
  58. <div>
  59. <StripeProvider apiKey="pk_test_Y12mq3xm7Ws1y7MNJoYNvF0A00e35011hV">
  60. <h2>Compliance</h2>
  61. </StripeProvider>
  62. {/*
  63. <VerifyButton
  64. apiKey={"e0e006dbd8df146aad04474e85feaebb8f975640b5495da363f5ca11923a8b86"}
  65. onFinished={VerifyFinished}
  66. additionalAttributes={{ }}
  67. prefillAttributes={{ }}
  68. theme={{ }}
  69. />
  70. */}
  71. {/*
  72. <EmbedID url='http://localhost:3000/'
  73. handleResponse={handleResponse}
  74. handleSubmit={handleSubmit}
  75. additionalFields={additionalFields}
  76. />
  77. */}
  78. </div>
  79. </div>
  80. );
  81. }
  82.  
  83. export default Profile;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement