From bcd7f89dee9ccf021891fedfb5e0b23ec6e494df Mon Sep 17 00:00:00 2001 From: Daria Golova Date: Mon, 30 May 2022 19:17:03 +0300 Subject: [PATCH 1/2] created ablock with a verified data --- src/css/tailwind.config.js | 1 + src/pages/digitalId/Verify.jsx | 144 ++++++++++++++++++++++++++++++++- 2 files changed, 141 insertions(+), 4 deletions(-) diff --git a/src/css/tailwind.config.js b/src/css/tailwind.config.js index 4f35c23..700b72f 100644 --- a/src/css/tailwind.config.js +++ b/src/css/tailwind.config.js @@ -23,6 +23,7 @@ module.exports = { descriptionSize: ['0.75rem', { lineHeight: '1.25' }], xxs: ['0.625rem', { lineHeight: '0.75' }], xs: ['0.75rem', { lineHeight: '1.5' }], + descriptionSize: ['0.75rem', { lineHeight: '1.25' }], sm: ['0.875rem', { lineHeight: '1.5715' }], base: ['1rem', { lineHeight: '1.5', letterSpacing: '-0.01em' }], lg: ['1.125rem', { lineHeight: '1.5', letterSpacing: '-0.01em' }], diff --git a/src/pages/digitalId/Verify.jsx b/src/pages/digitalId/Verify.jsx index ff9ccff..61aae8c 100644 --- a/src/pages/digitalId/Verify.jsx +++ b/src/pages/digitalId/Verify.jsx @@ -5,6 +5,73 @@ import Header from '../../partials/Header'; function Verify () { const [sidebarOpen, setSidebarOpen] = useState(false); + const [descriptionOpen, setDescriptionOpen] = useState(false); + + const verifiedData = [ + { + id: 0, + time: '10:48', + property: 'Residence', + value: 'United Kindom', + validatedData: '7234ABC3423423523457234ABC34234' + }, + { + id: 1, + time: '10:48', + property: 'Document ID', + value: 'A1321313', + validatedData: '4568ABC3423423523457234ABC34234' + }, + { + id: 2, + time: '10:48', + property: 'Document ID', + value: 'A3451313', + validatedData: '9584ABC3423423523457234ABC34234' + }, + { + id: 3, + time: '03:00', + property: 'Residence', + value: 'Holland', + validatedData: '1024ABC3423423523457234ABC34234' + }, + { + id: 4, + time: '03:00', + property: 'Document ID', + value: 'B3451313', + validatedData: '7893ABC3423423523457234ABC34234' + }, + { + id: 5, + time: '03:00', + property: 'Document ID', + value: 'A3451313', + validatedData: '7286ABC3423423523457234ABC34234' + }, + { + id: 6, + time: '10:00', + property: 'Residence', + value: 'China', + validatedData: '0000ABC3423423523457234ABC34234' + }, + { + id: 7, + time: '10:00', + property: 'Document ID', + value: 'C3451313', + validatedData: '1230ABC3423423523457234ABC34234' + }, + { + id: 8, + time: '10:00', + property: 'Document ID', + value: 'D3451313', + validatedData: '4483ABC3423423523457234ABC34234' + } + ] return (
@@ -15,11 +82,80 @@ function Verify () { {/* Site header */}
-
+
{/* Page header */} -
- {/* Title */} -

Verify ✨

+
+
+
    +
  • + +
  • +
  • + +
  • +
  • + +
  • +
+
+
+ {/* Blocks */} + {verifiedData.sort((first, second) => { + if (first.time < second.time) { + return -1; + } + if (first.time > second.time) { + return 1; + } + if (first.time === second.time) { + return 0; + } + })} +
+ {/* Header */} +
+ + Yesterday at 10:48 AM + + {/* Buttons */} +
+
+ +
+
+ +
+
+
+
+
+
+ United Kindom + 7234ABC3423423523457234ABC34234 + 7234ABC3423423523457234ABC34234 +
+ Residence +
+
From c7d797b2af1b408eff2bbffd6c52f50c13a2da45 Mon Sep 17 00:00:00 2001 From: Daria Golova Date: Tue, 31 May 2022 16:31:25 +0300 Subject: [PATCH 2/2] changed the array, added props --- src/css/tailwind.config.js | 1 - src/pages/digitalId/Verify.jsx | 219 +++++++++++++++++---------------- 2 files changed, 111 insertions(+), 109 deletions(-) diff --git a/src/css/tailwind.config.js b/src/css/tailwind.config.js index 700b72f..4f35c23 100644 --- a/src/css/tailwind.config.js +++ b/src/css/tailwind.config.js @@ -23,7 +23,6 @@ module.exports = { descriptionSize: ['0.75rem', { lineHeight: '1.25' }], xxs: ['0.625rem', { lineHeight: '0.75' }], xs: ['0.75rem', { lineHeight: '1.5' }], - descriptionSize: ['0.75rem', { lineHeight: '1.25' }], sm: ['0.875rem', { lineHeight: '1.5715' }], base: ['1rem', { lineHeight: '1.5', letterSpacing: '-0.01em' }], lg: ['1.125rem', { lineHeight: '1.5', letterSpacing: '-0.01em' }], diff --git a/src/pages/digitalId/Verify.jsx b/src/pages/digitalId/Verify.jsx index 61aae8c..aacb5d2 100644 --- a/src/pages/digitalId/Verify.jsx +++ b/src/pages/digitalId/Verify.jsx @@ -1,5 +1,4 @@ import React, { useState } from 'react'; - import Sidebar from '../../partials/Sidebar'; import Header from '../../partials/Header'; @@ -9,69 +8,75 @@ function Verify () { const verifiedData = [ { - id: 0, - time: '10:48', - property: 'Residence', - value: 'United Kindom', - validatedData: '7234ABC3423423523457234ABC34234' + "date": "31.05.2022 10:48", + "fields": [ + { + "name": "Residence", + "value": "United Kindom", + "hash1": "7234ABC3423423523457234ABC34234", + "hash2": "7234ABC3423423523457234ABC34234" + }, + { + "name": "Document ID", + "value": "A1321313", + "hash1": "7234ABC3423423523457234ABC34234", + "hash2": "7234ABC3423423523457234ABC34234" + }, + { + "name": 'Document ID', + "value": 'A3451313', + "hash1": '9584ABC3423423523457234ABC34234', + "hash2": '9584ABC3423423523457234ABC34234' + } + ] }, { - id: 1, - time: '10:48', - property: 'Document ID', - value: 'A1321313', - validatedData: '4568ABC3423423523457234ABC34234' + "date": "31.05.2022 10:48", + "fields": [ + { + "name": 'Residence', + "value": 'Holland', + "hash1": '1024ABC3423423523457234ABC34234', + "hash2": '1024ABC3423423523457234ABC34234' + }, + { + "name": 'Document ID', + "value": 'B3451313', + "hash1": '7893ABC3423423523457234ABC34234', + "hash2": '7893ABC3423423523457234ABC34234' + }, + { + "name": 'Document ID', + "value": 'A3451313', + "hash1": '7286ABC3423423523457234ABC34234', + "hash2": '7286ABC3423423523457234ABC34234' + }, + ] }, { - id: 2, - time: '10:48', - property: 'Document ID', - value: 'A3451313', - validatedData: '9584ABC3423423523457234ABC34234' - }, - { - id: 3, - time: '03:00', - property: 'Residence', - value: 'Holland', - validatedData: '1024ABC3423423523457234ABC34234' - }, - { - id: 4, - time: '03:00', - property: 'Document ID', - value: 'B3451313', - validatedData: '7893ABC3423423523457234ABC34234' - }, - { - id: 5, - time: '03:00', - property: 'Document ID', - value: 'A3451313', - validatedData: '7286ABC3423423523457234ABC34234' - }, - { - id: 6, - time: '10:00', - property: 'Residence', - value: 'China', - validatedData: '0000ABC3423423523457234ABC34234' - }, - { - id: 7, - time: '10:00', - property: 'Document ID', - value: 'C3451313', - validatedData: '1230ABC3423423523457234ABC34234' - }, - { - id: 8, - time: '10:00', - property: 'Document ID', - value: 'D3451313', - validatedData: '4483ABC3423423523457234ABC34234' + "date": "31.05.2022 10:48", + "fields": [ + { + "name": 'Residence', + "value": 'China', + "hash1": '0000ABC3423423523457234ABC34234', + "hash2": '0000ABC3423423523457234ABC34234' + }, + { + "name": 'Document ID', + "value": 'C3451313', + "hash1": '1230ABC3423423523457234ABC34234', + "hash2": '1230ABC3423423523457234ABC34234' + }, + { + "name": 'Document ID', + "value": 'D3451313', + "hash1": '4483ABC3423423523457234ABC34234', + "hash2": '4483ABC3423423523457234ABC34234' + }, + ] } - ] + ]; return (
@@ -105,57 +110,55 @@ function Verify () {
- {/* Blocks */} - {verifiedData.sort((first, second) => { - if (first.time < second.time) { - return -1; - } - if (first.time > second.time) { - return 1; - } - if (first.time === second.time) { - return 0; - } - })} -
- {/* Header */} -
- - Yesterday at 10:48 AM - - {/* Buttons */} -
-
- -
-
- -
-
-
-
-
-
- United Kindom - 7234ABC3423423523457234ABC34234 - 7234ABC3423423523457234ABC34234 + {/* Block */} +
+ {verifiedData.map((item, index) => ( +
+ {/* Header */} +
+ + Yesterday at {item.date.slice(-5)} AM + + {/* Buttons */} +
+
+ +
+
+ +
- Residence
-
+ {/* Content */} +
+ {item.fields.map((elem) => ( +
+
+
+ {elem.value} + {elem.hash1} + {elem.hash2} +
+ {elem.name} +
+
+ ))} +
+
+ ))}