-
-
Notifications
You must be signed in to change notification settings - Fork 16
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 #1287 from AletheiaFact/create-verification-reques…
…t-page Create verification request page
- Loading branch information
Showing
15 changed files
with
280 additions
and
60 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
{ | ||
"verificationRequestListHeader": "Verification Requests", | ||
"verificationRequestTitle": "Verification Request", | ||
"manageVerificationRequests": "Manage selected verification requests", | ||
"createClaimFromVerificationRequest": "No claim was created with this verification request", | ||
"openVerificationRequestClaimLabel": "A claim created was related to this verification request", | ||
"openVerificationRequestClaimButton": "Open claim", | ||
"agroupVerificationRequest": "Related verification requests" | ||
"agroupVerificationRequest": "Related verification requests", | ||
"openVerificationRequest": "Open" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
{ | ||
"verificationRequestListHeader": "Denúncias", | ||
"verificationRequestTitle": "Denúncia", | ||
"manageVerificationRequests": "Gerenciar denúncias selecionadas", | ||
"createClaimFromVerificationRequest": "Nenhuma afirmação foi criada com esta denúncia", | ||
"openVerificationRequestClaimLabel": "Uma afirmação criada foi relacionada com essa denúncia", | ||
"openVerificationRequestClaimButton": "Abrir afirmação", | ||
"agroupVerificationRequest": "Denúncias relacionadas" | ||
"agroupVerificationRequest": "Denúncias relacionadas", | ||
"openVerificationRequest": "Abrir" | ||
} |
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
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
52 changes: 52 additions & 0 deletions
52
src/components/VerificationRequest/VerificationRequestList.tsx
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,52 @@ | ||
import React from "react"; | ||
import BaseList from "../List/BaseList"; | ||
import { Col, Row } from "antd"; | ||
import { useTranslation } from "next-i18next"; | ||
import { useAtom } from "jotai"; | ||
import { currentNameSpace } from "../../atoms/namespace"; | ||
import verificationRequestApi from "../../api/verificationRequestApi"; | ||
import VerificationRequestCard from "./VerificationRequestCard"; | ||
import AletheiaButton from "../Button"; | ||
|
||
const VerificationRequestList = () => { | ||
const { t } = useTranslation(); | ||
const [nameSpace] = useAtom(currentNameSpace); | ||
|
||
return ( | ||
<Row justify="center"> | ||
<Col span={18}> | ||
<BaseList | ||
apiCall={verificationRequestApi.get} | ||
filter={{ nameSpace }} | ||
title={t( | ||
"verificationRequest:verificationRequestListHeader" | ||
)} | ||
renderItem={({ content, data_hash }, index) => ( | ||
<VerificationRequestCard | ||
key={index} | ||
content={content} | ||
expandable={false} | ||
actions={[ | ||
<AletheiaButton | ||
href={`/verification-request/${data_hash}`} | ||
> | ||
{t( | ||
"verificationRequest:openVerificationRequest" | ||
)} | ||
</AletheiaButton>, | ||
]} | ||
/> | ||
)} | ||
grid={{ | ||
gutter: 20, | ||
md: 2, | ||
lg: 2, | ||
xl: 2, | ||
xxl: 2, | ||
}} | ||
/> | ||
</Col> | ||
</Row> | ||
); | ||
}; | ||
export default VerificationRequestList; |
Oops, something went wrong.