forked from allo-protocol/SeaGrants
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f6a7caa
commit 7e1572a
Showing
6 changed files
with
91 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,35 @@ | ||
import ApplicationDetails from "@/components/application/Application"; | ||
import ApplicationDetail from "@/components/application/ApplicationDetail"; | ||
import Container from "@/components/shared/Container"; | ||
import { graphqlEndpoint, getMicroGrantRecipientQuery } from "@/utils/query"; | ||
import request from "graphql-request"; | ||
|
||
export default async function Application({ | ||
params, | ||
}: { | ||
params: { chainId: string; poolId: string; applicationId: string }; | ||
}) { | ||
let recipient; | ||
let isError = false; | ||
|
||
try { | ||
const response: any = await request( | ||
graphqlEndpoint, | ||
getMicroGrantRecipientQuery, | ||
{ | ||
chainId: params.chainId, | ||
poolId: params.poolId, | ||
recipientId: params.applicationId, | ||
} | ||
); | ||
recipient = response?.microGrantRecipient; | ||
} catch (error) { | ||
isError = true; | ||
console.error(error); | ||
} | ||
|
||
export default function ApplicationDetail() { | ||
return ( | ||
<Container> | ||
<ApplicationDetails /> | ||
<ApplicationDetail application={recipient} isError={isError} /> | ||
</Container> | ||
); | ||
} |
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