-
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.
Minor UI/UX update to include updated CSS and more functionality plac…
…eholders
- Loading branch information
Showing
7 changed files
with
235 additions
and
128 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { useWallet } from '@solana/wallet-adapter-react' | ||
import { FC, useCallback } from 'react' | ||
import { WalletNotConnectedError } from '@solana/wallet-adapter-base' | ||
import toast from 'react-hot-toast' | ||
|
||
import { useWalletContext } from '@/components/providers/wallet' | ||
import { Button } from '@/components/ui/button' | ||
|
||
export const CalculateCostButton: FC<{ className?: string }> = ({ | ||
className, | ||
}) => { | ||
const { publicKey } = useWallet() | ||
const { endpoint } = useWalletContext() | ||
|
||
const onClick = useCallback(async () => { | ||
if (!publicKey) throw new WalletNotConnectedError() | ||
|
||
try { | ||
// TODO: Implement | ||
toast.error('Not Implemented') | ||
} catch (error: any) { | ||
console.error(error) | ||
toast.error(`Increment Failed: ${error.message}`) | ||
} | ||
}, [publicKey, endpoint]) | ||
|
||
return ( | ||
<Button onClick={onClick} disabled={!publicKey} className={className}> | ||
Upload File | ||
</Button> | ||
) | ||
} | ||
|
||
export default CalculateCostButton |
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { useWallet } from '@solana/wallet-adapter-react' | ||
import { FC, useCallback } from 'react' | ||
import { WalletNotConnectedError } from '@solana/wallet-adapter-base' | ||
import toast from 'react-hot-toast' | ||
|
||
import { useWalletContext } from '@/components/providers/wallet' | ||
import { Button } from '@/components/ui/button' | ||
|
||
export const DecrementCounterButton: FC<{ className?: string }> = ({ | ||
className, | ||
}) => { | ||
const { publicKey } = useWallet() | ||
const { endpoint } = useWalletContext() | ||
|
||
const onClick = useCallback(async () => { | ||
if (!publicKey) throw new WalletNotConnectedError() | ||
|
||
try { | ||
// TODO: Implement | ||
toast.error('Not Implemented') | ||
} catch (error: any) { | ||
console.error(error) | ||
toast.error(`Increment Failed: ${error.message}`) | ||
} | ||
}, [publicKey, endpoint]) | ||
|
||
return ( | ||
<Button onClick={onClick} disabled={!publicKey} className={className}> | ||
Decrement Counter | ||
</Button> | ||
) | ||
} | ||
|
||
export default DecrementCounterButton |
Oops, something went wrong.