File tree Expand file tree Collapse file tree 1 file changed +18
-15
lines changed
packages/grant-explorer/src/features/projects Expand file tree Collapse file tree 1 file changed +18
-15
lines changed Original file line number Diff line number Diff line change @@ -94,6 +94,7 @@ export default function ViewProject() {
94
94
) ;
95
95
96
96
const [ tokenBalance , setTokenBalance ] = useState < bigint > ( BigInt ( "0" ) ) ;
97
+ const directAllocationPoolId = getDirectAllocationPoolId ( chainId ?? 1 ) ;
97
98
98
99
useEffect ( ( ) => {
99
100
const runner = async ( ) => {
@@ -292,21 +293,23 @@ export default function ViewProject() {
292
293
< div className = "md:flex gap-4 flex-row-reverse" >
293
294
< div className = "mb-4" >
294
295
< Sidebar projectApplications = { projectApplications } />
295
- < button
296
- type = "button"
297
- data-testid = "direct-allocation-button"
298
- className = "w-full block my-0 mx-1 bg-gitcoin-violet-100 py-2 text-center text-sm font-semibold rounded-lg leading-6 text-gitcoin-violet-400 shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
299
- onClick = { ( ) => {
300
- if ( ! isConnected ) {
301
- openConnectModal ?.( ) ;
302
- return ;
303
- }
304
- setShowDirectAllocationModal ( true ) ;
305
- } }
306
- >
307
- < BoltIcon className = "w-4 h-4 inline-block mr-1 mb-1" />
308
- Donate
309
- </ button >
296
+ { directAllocationPoolId && (
297
+ < button
298
+ type = "button"
299
+ data-testid = "direct-allocation-button"
300
+ className = "w-full block my-0 mx-1 bg-gitcoin-violet-100 py-2 text-center text-sm font-semibold rounded-lg leading-6 text-gitcoin-violet-400 shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
301
+ onClick = { ( ) => {
302
+ if ( ! isConnected ) {
303
+ openConnectModal ?.( ) ;
304
+ return ;
305
+ }
306
+ setShowDirectAllocationModal ( true ) ;
307
+ } }
308
+ >
309
+ < BoltIcon className = "w-4 h-4 inline-block mr-1 mb-1" />
310
+ Donate
311
+ </ button >
312
+ ) }
310
313
</ div >
311
314
< div className = "flex-1" >
312
315
{ projectError === undefined ? (
You can’t perform that action at this time.
0 commit comments