changed the array, added props
This commit is contained in:
@@ -23,7 +23,6 @@ module.exports = {
|
|||||||
descriptionSize: ['0.75rem', { lineHeight: '1.25' }],
|
descriptionSize: ['0.75rem', { lineHeight: '1.25' }],
|
||||||
xxs: ['0.625rem', { lineHeight: '0.75' }],
|
xxs: ['0.625rem', { lineHeight: '0.75' }],
|
||||||
xs: ['0.75rem', { lineHeight: '1.5' }],
|
xs: ['0.75rem', { lineHeight: '1.5' }],
|
||||||
descriptionSize: ['0.75rem', { lineHeight: '1.25' }],
|
|
||||||
sm: ['0.875rem', { lineHeight: '1.5715' }],
|
sm: ['0.875rem', { lineHeight: '1.5715' }],
|
||||||
base: ['1rem', { lineHeight: '1.5', letterSpacing: '-0.01em' }],
|
base: ['1rem', { lineHeight: '1.5', letterSpacing: '-0.01em' }],
|
||||||
lg: ['1.125rem', { lineHeight: '1.5', letterSpacing: '-0.01em' }],
|
lg: ['1.125rem', { lineHeight: '1.5', letterSpacing: '-0.01em' }],
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
|
|
||||||
import Sidebar from '../../partials/Sidebar';
|
import Sidebar from '../../partials/Sidebar';
|
||||||
import Header from '../../partials/Header';
|
import Header from '../../partials/Header';
|
||||||
|
|
||||||
@@ -9,69 +8,75 @@ function Verify () {
|
|||||||
|
|
||||||
const verifiedData = [
|
const verifiedData = [
|
||||||
{
|
{
|
||||||
id: 0,
|
"date": "31.05.2022 10:48",
|
||||||
time: '10:48',
|
"fields": [
|
||||||
property: 'Residence',
|
{
|
||||||
value: 'United Kindom',
|
"name": "Residence",
|
||||||
validatedData: '7234ABC3423423523457234ABC34234'
|
"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,
|
"date": "31.05.2022 10:48",
|
||||||
time: '10:48',
|
"fields": [
|
||||||
property: 'Document ID',
|
{
|
||||||
value: 'A1321313',
|
"name": 'Residence',
|
||||||
validatedData: '4568ABC3423423523457234ABC34234'
|
"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,
|
"date": "31.05.2022 10:48",
|
||||||
time: '10:48',
|
"fields": [
|
||||||
property: 'Document ID',
|
{
|
||||||
value: 'A3451313',
|
"name": 'Residence',
|
||||||
validatedData: '9584ABC3423423523457234ABC34234'
|
"value": 'China',
|
||||||
},
|
"hash1": '0000ABC3423423523457234ABC34234',
|
||||||
{
|
"hash2": '0000ABC3423423523457234ABC34234'
|
||||||
id: 3,
|
},
|
||||||
time: '03:00',
|
{
|
||||||
property: 'Residence',
|
"name": 'Document ID',
|
||||||
value: 'Holland',
|
"value": 'C3451313',
|
||||||
validatedData: '1024ABC3423423523457234ABC34234'
|
"hash1": '1230ABC3423423523457234ABC34234',
|
||||||
},
|
"hash2": '1230ABC3423423523457234ABC34234'
|
||||||
{
|
},
|
||||||
id: 4,
|
{
|
||||||
time: '03:00',
|
"name": 'Document ID',
|
||||||
property: 'Document ID',
|
"value": 'D3451313',
|
||||||
value: 'B3451313',
|
"hash1": '4483ABC3423423523457234ABC34234',
|
||||||
validatedData: '7893ABC3423423523457234ABC34234'
|
"hash2": '4483ABC3423423523457234ABC34234'
|
||||||
},
|
},
|
||||||
{
|
]
|
||||||
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 (
|
return (
|
||||||
<div className="flex h-screen overflow-hidden">
|
<div className="flex h-screen overflow-hidden">
|
||||||
@@ -105,57 +110,55 @@ function Verify () {
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/* Blocks */}
|
{/* Block */}
|
||||||
{verifiedData.sort((first, second) => {
|
<div className="flex flex-col gap-y-4">
|
||||||
if (first.time < second.time) {
|
{verifiedData.map((item, index) => (
|
||||||
return -1;
|
<div key={index} className="w-[1095px] pl-5 pr-[13px] pb-8 bg-white border border-slate-200 rounded shadow-[0_4px_6px_-1px_rgba(5,23,42,0.08)]">
|
||||||
}
|
{/* Header */}
|
||||||
if (first.time > second.time) {
|
<div className="flex justify-between items-center h-[42px]">
|
||||||
return 1;
|
<span className="font-normal text-descriptionSize text-slate-500" >
|
||||||
}
|
Yesterday at {item.date.slice(-5)} AM
|
||||||
if (first.time === second.time) {
|
</span>
|
||||||
return 0;
|
{/* Buttons */}
|
||||||
}
|
<div className="flex gap-x-[6px]">
|
||||||
})}
|
<div className="flex items-center">
|
||||||
<div className="w-[1095px] pl-5 pr-[13px] py-3 bg-white border border-slate-200 rounded shadow-[0_4px_6px_-1px_rgba(5,23,42,0.08)]">
|
<button className="text-slate-400 hover:text-slate-500 rounded-full">
|
||||||
{/* Header */}
|
<span className="sr-only">Link</span>
|
||||||
<div className="flex justify-between">
|
<svg className="w-4 h-4 fill-current shrink-0 text-slate-400" viewBox="0 0 16 16">
|
||||||
<span className="font-normal text-descriptionSize text-slate-500" >
|
<path d="M11 0c1.3 0 2.6.5 3.5 1.5 1 .9 1.5 2.2 1.5 3.5 0 1.3-.5 2.6-1.4 3.5l-1.2 1.2c-.2.2-.5.3-.7.3-.2 0-.5-.1-.7-.3-.4-.4-.4-1 0-1.4l1.1-1.2c.6-.5.9-1.3.9-2.1s-.3-1.6-.9-2.2C12 1.7 10 1.7 8.9 2.8L7.7 4c-.4.4-1 .4-1.4 0-.4-.4-.4-1 0-1.4l1.2-1.1C8.4.5 9.7 0 11 0ZM8.3 12c.4-.4 1-.5 1.4-.1.4.4.4 1 0 1.4l-1.2 1.2C7.6 15.5 6.3 16 5 16c-1.3 0-2.6-.5-3.5-1.5C.5 13.6 0 12.3 0 11c0-1.3.5-2.6 1.5-3.5l1.1-1.2c.4-.4 1-.4 1.4 0 .4.4.4 1 0 1.4L2.9 8.9c-.6.5-.9 1.3-.9 2.1s.3 1.6.9 2.2c1.1 1.1 3.1 1.1 4.2 0L8.3 12Zm1.1-6.8c.4-.4 1-.4 1.4 0 .4.4.4 1 0 1.4l-4.2 4.2c-.2.2-.5.3-.7.3-.2 0-.5-.1-.7-.3-.4-.4-.4-1 0-1.4l4.2-4.2Z" />
|
||||||
Yesterday at 10:48 AM
|
</svg>
|
||||||
</span>
|
</button>
|
||||||
{/* Buttons */}
|
</div>
|
||||||
<div className="flex gap-x-[6px]">
|
<div className="flex items-center">
|
||||||
<div className="flex items-center">
|
<button
|
||||||
<button className="text-slate-400 hover:text-slate-500 rounded-full">
|
className={`text-slate-400 hover:text-slate-500 transform ${descriptionOpen && 'rotate-180'}`}
|
||||||
<span className="sr-only">Link</span>
|
aria-expanded={descriptionOpen}
|
||||||
<svg className="w-4 h-4 fill-current shrink-0 text-slate-400" viewBox="0 0 16 16">
|
onClick={() => setDescriptionOpen(!descriptionOpen)}
|
||||||
<path d="M11 0c1.3 0 2.6.5 3.5 1.5 1 .9 1.5 2.2 1.5 3.5 0 1.3-.5 2.6-1.4 3.5l-1.2 1.2c-.2.2-.5.3-.7.3-.2 0-.5-.1-.7-.3-.4-.4-.4-1 0-1.4l1.1-1.2c.6-.5.9-1.3.9-2.1s-.3-1.6-.9-2.2C12 1.7 10 1.7 8.9 2.8L7.7 4c-.4.4-1 .4-1.4 0-.4-.4-.4-1 0-1.4l1.2-1.1C8.4.5 9.7 0 11 0ZM8.3 12c.4-.4 1-.5 1.4-.1.4.4.4 1 0 1.4l-1.2 1.2C7.6 15.5 6.3 16 5 16c-1.3 0-2.6-.5-3.5-1.5C.5 13.6 0 12.3 0 11c0-1.3.5-2.6 1.5-3.5l1.1-1.2c.4-.4 1-.4 1.4 0 .4.4.4 1 0 1.4L2.9 8.9c-.6.5-.9 1.3-.9 2.1s.3 1.6.9 2.2c1.1 1.1 3.1 1.1 4.2 0L8.3 12Zm1.1-6.8c.4-.4 1-.4 1.4 0 .4.4.4 1 0 1.4l-4.2 4.2c-.2.2-.5.3-.7.3-.2 0-.5-.1-.7-.3-.4-.4-.4-1 0-1.4l4.2-4.2Z" />
|
>
|
||||||
</svg>
|
<svg className="w-8 h-8 fill-current" viewBox="0 0 32 32">
|
||||||
</button>
|
<path d="M16 20l-5.4-5.4 1.4-1.4 4 4 4-4 1.4 1.4z" />
|
||||||
</div>
|
</svg>
|
||||||
<div className="flex items-center">
|
</button>
|
||||||
<button
|
</div>
|
||||||
className={`text-slate-400 hover:text-slate-500 transform ${descriptionOpen && 'rotate-180'}`}
|
|
||||||
aria-expanded={descriptionOpen}
|
|
||||||
>
|
|
||||||
<span className="sr-only">Show more</span>
|
|
||||||
<svg className="w-8 h-8 fill-current" viewBox="0 0 32 32">
|
|
||||||
<path d="M16 20l-5.4-5.4 1.4-1.4 4 4 4-4 1.4 1.4z" />
|
|
||||||
</svg>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className='flex gap-y-2'>
|
|
||||||
<div className='flex flex-col'>
|
|
||||||
<div className='flex flex-row items-center'>
|
|
||||||
<span className='font-semibold text-slate-800 text-base w-[204px]'>United Kindom</span>
|
|
||||||
<span className='font-semibold text-descriptionSize text-slate-600 underline w-80'>7234ABC3423423523457234ABC34234</span>
|
|
||||||
<span className='font-semibold text-descriptionSize text-slate-600 underline w-80'>7234ABC3423423523457234ABC34234</span>
|
|
||||||
</div>
|
</div>
|
||||||
<span className='font-normal text-xxs'>Residence</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{/* Content */}
|
||||||
|
<div className='flex flex-col gap-y-[9px]'>
|
||||||
|
{item.fields.map((elem) => (
|
||||||
|
<div className='flex gap-y-2'>
|
||||||
|
<div className='flex flex-col'>
|
||||||
|
<div className='flex flex-row items-center'>
|
||||||
|
<span className='font-semibold text-slate-800 text-base w-[204px]'>{elem.value}</span>
|
||||||
|
<span className='font-semibold text-descriptionSize text-slate-600 underline w-80'>{elem.hash1}</span>
|
||||||
|
<span className='font-semibold text-descriptionSize text-slate-600 underline w-80'>{elem.hash2}</span>
|
||||||
|
</div>
|
||||||
|
<span className='font-normal text-xxs'>{elem.name}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|||||||
Reference in New Issue
Block a user