Skip to content

Commit

Permalink
download certificate (#1139)
Browse files Browse the repository at this point in the history
* download certificate

* fix(marketplace): Dont use **/* as include pattern

* review changes

---------

Co-authored-by: Johannes Schill <[email protected]>
  • Loading branch information
PiranavanShanmugavadivelu and jschill authored Jan 18, 2024
1 parent f83a6fc commit 91622b9
Show file tree
Hide file tree
Showing 8 changed files with 478 additions and 1,156 deletions.
467 changes: 449 additions & 18 deletions frontend/marketplace/src/components/CertificateCard.vue

Large diffs are not rendered by default.

10 changes: 1 addition & 9 deletions frontend/marketplace/src/components/CertificateTabContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ const showSpinner = computed(() => {
const { notifyer } = useNotifyer();
const auth = useAuth();
const wallet = useWallet();
const viewCertificate = (certificateId: string) => {
const url = `${window.location.origin}/certificate/${certificateId}`;
window.open(url, "_blank");
};
const creditOffsetCertificates = computed(() => {
return certificatesData.value?.result?.creditOffsetCertificates ?? undefined;
Expand Down Expand Up @@ -60,7 +56,6 @@ const getCreditCollection = (id: string) => {
const getCreditCollectionMediaFiles = (id: string) => {
const collection = getCreditCollection(id);
if (collection) {
console.log("collection", collection);
const collectionNodes = collection.creditData?.nodes ?? [];
return collectionNodes[0]?.mediaFiles?.nodes;
}
Expand Down Expand Up @@ -159,10 +154,7 @@ onUnmounted(() => {
v-for="certificate in creditOffsetCertificatesAndCreditCollections"
:key="certificate.id"
>
<CertificateCard
:card-data="certificate"
@viewCertificate="viewCertificate"
/>
<CertificateCard :card-data="certificate" />
</div>
<div class="flex justify-center md:justify-end my-10">
<CustomPagination
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import gql from "graphql-tag";

export const GET_CREDIT_OFFSET_CERTIFICATE = gql`
query GetCreditOffsetCertificate($id: String!) {
creditOffsetCertificates(filter: { id: { equalTo: $id } }) {
nodes {
id
nodeId
denom
retiringEntityName
retiringEntityAdditionalData
walletId
amount
}
}
}
`;
1 change: 1 addition & 0 deletions frontend/marketplace/src/graphql/queries/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from "./creditCollections";
export * from "./creditOffsetCertificates";
export * from "./creditOffsetCertificate";
Loading

0 comments on commit 91622b9

Please sign in to comment.