23 lines
		
	
	
		
			425 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			425 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| import { createContext, useContext } from 'react'
 | |
| 
 | |
| const WebLNContext = createContext({})
 | |
| 
 | |
| export const Status = {
 | |
|   Initialized: 'Initialized',
 | |
|   Enabled: 'Enabled',
 | |
|   Locked: 'Locked',
 | |
|   Error: 'Error'
 | |
| }
 | |
| 
 | |
| export function WebLNProvider ({ children }) {
 | |
|   return (
 | |
|     <WebLNContext.Provider value={null}>
 | |
|       {children}
 | |
|     </WebLNContext.Provider>
 | |
|   )
 | |
| }
 | |
| 
 | |
| export function useWebLN () {
 | |
|   return useContext(WebLNContext)
 | |
| }
 |