mirror of
https://gitlab.com/soapbox-pub/mkstack.git
synced 2026-12-05 16:33:36 +00:00
messy, nwc support +_wallet fixes
This commit is contained in:
1 parent
11ac73776c
commit
45ff37e752
10 files changed
+594
-284
No files matched your search
@@ -0,0 +1,15 @@
|
||||
import { useContext } from 'react';
|
||||
import { createContext } from 'react';
|
||||
import { useNWCInternal } from '@/hooks/useNWC';
|
||||
|
||||
type NWCContextType = ReturnType<typeof useNWCInternal>;
|
||||
|
||||
export const NWCContext = createContext<NWCContextType | null>(null);
|
||||
|
||||
export function useNWC(): NWCContextType {
|
||||
const context = useContext(NWCContext);
|
||||
if (!context) {
|
||||
throw new Error('useNWC must be used within a NWCProvider');
|
||||
}
|
||||
return context;
|
||||
}
|
||||
Reference in new issue
Block a user