-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from merokudao/verification-feature
add verification changes
- Loading branch information
Showing
10 changed files
with
1,171 additions
and
1,122 deletions.
There are no files selected for viewing
This file contains 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import React from "react"; | ||
import Image from "next/image"; | ||
import moment from "moment"; | ||
|
||
export type verifiedType = { | ||
resultURL: string; | ||
icon: string; | ||
description: string; | ||
type: string; | ||
vendorName: string; | ||
verifiedOn: string; | ||
verificationExpires: string; | ||
}; | ||
|
||
export type VerificationDetailsProps = { | ||
verification: { | ||
icon: string; | ||
verified: verifiedType[]; | ||
}; | ||
}; | ||
|
||
const VerificationDetails = ({ verification }: VerificationDetailsProps) => { | ||
return ( | ||
<div id="verification-section"> | ||
<h1 className="text-2xl leading-2xl font-[500] mb-4">Verification</h1> | ||
{verification?.verified && | ||
verification?.verified.map((item, index) => ( | ||
<> | ||
<div className="grid md:grid-cols-2 xl:grid-cols-2 gap-y-4 gap-x-5 mt-6 md:mt-0 w-full justify-between"> | ||
<div> | ||
<label>Verifier</label> <p>{item.vendorName}</p> | ||
</div> | ||
<div> | ||
<label>Verifier Icon</label> | ||
<Image alt="icon" height={30} width={30} src={item?.icon} /> | ||
</div> | ||
<div> | ||
<label>Verified On</label>{" "} | ||
<p>{moment(item?.verifiedOn).format("DD/MM/YYYY")}</p> | ||
</div> | ||
<div> | ||
<label>Verification Expires On</label>{" "} | ||
<p>{moment(item?.verificationExpires).format("DD/MM/YYYY")}</p> | ||
</div> | ||
<div> | ||
<label>Description</label> <p>{item?.description}</p> | ||
</div> | ||
<div> | ||
<label>Report</label>{" "} | ||
<p> | ||
<a | ||
className="text-blue-500" | ||
target="_blank" | ||
href={item?.resultURL} | ||
> | ||
View Report | ||
</a> | ||
</p> | ||
</div> | ||
</div> | ||
{index !== verification?.verified.length - 1 && <hr className="m-2 my-5"/>} | ||
</> | ||
))} | ||
</div> | ||
); | ||
}; | ||
|
||
export default VerificationDetails; |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.