1- ' use client' ;
1+ " use client" ;
22
3- import { CodeHighlight } from ' @mantine/code-highlight' ;
3+ import { CodeHighlight } from " @mantine/code-highlight" ;
44import {
55 ActionIcon ,
66 Alert ,
@@ -19,18 +19,18 @@ import {
1919 TextInput ,
2020 ThemeIcon ,
2121 Title ,
22- } from ' @mantine/core' ;
23- import { notifications } from ' @mantine/notifications' ;
24- import { IconBulb , IconChevronDown , IconChevronUp , IconCoins , IconCopy , IconLogout , IconSend , IconWallet } from ' @tabler/icons-react' ;
25- import { useState } from ' react' ;
26- import { formatEther , parseEther } from ' viem' ;
27- import { useAccount , useDisconnect , usePublicClient , useSendTransaction , useWaitForTransactionReceipt } from ' wagmi' ;
28- import { balanceCodeExample , transactionCodeExample , walletCodeExample } from ' ./examples' ;
22+ } from " @mantine/core" ;
23+ import { notifications } from " @mantine/notifications" ;
24+ import { IconBulb , IconChevronDown , IconChevronUp , IconCoins , IconCopy , IconLogout , IconSend , IconWallet } from " @tabler/icons-react" ;
25+ import { useState } from " react" ;
26+ import { formatEther , parseEther } from " viem" ;
27+ import { useAccount , useDisconnect , usePublicClient , useSendTransaction , useWaitForTransactionReceipt } from " wagmi" ;
28+ import { balanceCodeExample , transactionCodeExample , walletCodeExample } from " ./examples" ;
2929
3030function Examples ( ) {
31- const [ balance , setBalance ] = useState ( '' ) ;
32- const [ recipient , setRecipient ] = useState ( '' ) ;
33- const [ amount , setAmount ] = useState ( '' ) ;
31+ const [ balance , setBalance ] = useState ( "" ) ;
32+ const [ recipient , setRecipient ] = useState ( "" ) ;
33+ const [ amount , setAmount ] = useState ( "" ) ;
3434
3535 // Code visibility toggles
3636 const [ showWalletCode , setShowWalletCode ] = useState ( false ) ;
@@ -51,17 +51,17 @@ function Examples() {
5151 try {
5252 navigator . clipboard . writeText ( text ) . then ( ( ) => {
5353 notifications . show ( {
54- title : ' Copied!' ,
55- message : ' Code copied to clipboard' ,
56- color : ' green' ,
54+ title : " Copied!" ,
55+ message : " Code copied to clipboard" ,
56+ color : " green" ,
5757 } ) ;
5858 } ) ;
5959 } catch ( err ) {
60- console . error ( ' Failed to copy text: ' , err ) ;
60+ console . error ( " Failed to copy text: " , err ) ;
6161 notifications . show ( {
62- title : ' Error' ,
63- message : ' Failed to copy to clipboard' ,
64- color : ' red' ,
62+ title : " Error" ,
63+ message : " Failed to copy to clipboard" ,
64+ color : " red" ,
6565 } ) ;
6666 }
6767 } ;
@@ -78,9 +78,9 @@ function Examples() {
7878 const sendSei = async ( ) => {
7979 if ( ! recipient || ! amount ) {
8080 notifications . show ( {
81- title : ' Missing Information' ,
82- message : ' Please enter recipient address and amount' ,
83- color : ' orange' ,
81+ title : " Missing Information" ,
82+ message : " Please enter recipient address and amount" ,
83+ color : " orange" ,
8484 } ) ;
8585 return ;
8686 }
@@ -91,11 +91,11 @@ function Examples() {
9191 value : parseEther ( amount ) ,
9292 } ) ;
9393 } catch ( error ) {
94- console . error ( ' Transaction error:' , error ) ;
94+ console . error ( " Transaction error:" , error ) ;
9595 notifications . show ( {
96- title : ' Transaction Error' ,
97- message : ' Failed to send transaction' ,
98- color : ' red' ,
96+ title : " Transaction Error" ,
97+ message : " Failed to send transaction" ,
98+ color : " red" ,
9999 } ) ;
100100 }
101101 } ;
@@ -147,7 +147,7 @@ function Examples() {
147147 </ Text >
148148 < Flex justify = "space-between" align = "center" >
149149 < Code bg = "white" p = "xs" >
150- { address || ' No wallet connected' }
150+ { address || " No wallet connected" }
151151 </ Code >
152152 { isConnected && address && (
153153 < Group gap = "xs" >
@@ -171,7 +171,7 @@ function Examples() {
171171 leftSection = { showWalletCode ? < IconChevronUp size = { 14 } /> : < IconChevronDown size = { 14 } /> }
172172 onClick = { ( ) => setShowWalletCode ( ! showWalletCode ) }
173173 >
174- { showWalletCode ? ' Hide' : ' View' } Implementation
174+ { showWalletCode ? " Hide" : " View" } Implementation
175175 </ Button >
176176 { showWalletCode && (
177177 < ActionIcon variant = "subtle" color = "gray" size = "sm" radius = "md" onClick = { ( ) => copyToClipboard ( walletCodeExample ) } >
@@ -247,7 +247,7 @@ function Examples() {
247247 color = "green"
248248 leftSection = { < IconCoins size = { 14 } /> }
249249 >
250- { balance ? ' Refresh' : ' Check Balance' }
250+ { balance ? " Refresh" : " Check Balance" }
251251 </ Button >
252252 </ Flex >
253253 </ Paper >
@@ -261,7 +261,7 @@ function Examples() {
261261 leftSection = { showBalanceCode ? < IconChevronUp size = { 14 } /> : < IconChevronDown size = { 14 } /> }
262262 onClick = { ( ) => setShowBalanceCode ( ! showBalanceCode ) }
263263 >
264- { showBalanceCode ? ' Hide' : ' View' } Implementation
264+ { showBalanceCode ? " Hide" : " View" } Implementation
265265 </ Button >
266266 { showBalanceCode && (
267267 < ActionIcon variant = "subtle" color = "gray" size = "sm" radius = "md" onClick = { ( ) => copyToClipboard ( balanceCodeExample ) } >
@@ -377,7 +377,7 @@ function Examples() {
377377 leftSection = { showTransactionCode ? < IconChevronUp size = { 14 } /> : < IconChevronDown size = { 14 } /> }
378378 onClick = { ( ) => setShowTransactionCode ( ! showTransactionCode ) }
379379 >
380- { showTransactionCode ? ' Hide' : ' View' } Implementation
380+ { showTransactionCode ? " Hide" : " View" } Implementation
381381 </ Button >
382382 { showTransactionCode && (
383383 < ActionIcon variant = "subtle" color = "gray" size = "sm" radius = "xl" onClick = { ( ) => copyToClipboard ( transactionCodeExample ) } >
0 commit comments