-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
154 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
packages/afk_nostr_sdk/src/hooks/group/private/useAddMember.ts
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,22 @@ | ||
import {useMutation} from '@tanstack/react-query'; | ||
import {useNostrContext} from '../../../context/NostrContext'; | ||
import { useAuth } from '../../../store'; | ||
|
||
export type UseAddMemberOptions = { | ||
authors?: string[]; | ||
search?: string; | ||
}; | ||
|
||
// TODO | ||
export const useAddMember = (options?: UseAddMemberOptions) => { | ||
const {ndk} = useNostrContext(); | ||
const {publicKey} = useAuth() | ||
|
||
return useMutation({ | ||
mutationKey: ['addMemberGroup', ndk], | ||
mutationFn: async (data: {pubkey: string}) => { | ||
|
||
|
||
}, | ||
}); | ||
}; |
22 changes: 22 additions & 0 deletions
22
packages/afk_nostr_sdk/src/hooks/group/private/useAddPermissions.ts
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,22 @@ | ||
import {useMutation} from '@tanstack/react-query'; | ||
import {useNostrContext} from '../../../context/NostrContext'; | ||
import { useAuth } from '../../../store'; | ||
|
||
export type UseAddPermissionsOptions = { | ||
authors?: string[]; | ||
search?: string; | ||
}; | ||
|
||
// TODO | ||
export const useAddPermissions = (options?: UseAddPermissionsOptions) => { | ||
const {ndk} = useNostrContext(); | ||
const {publicKey} = useAuth() | ||
|
||
return useMutation({ | ||
mutationKey: ['addPermissions', ndk], | ||
mutationFn: async (data: {pubkey: string}) => { | ||
|
||
|
||
}, | ||
}); | ||
}; |
22 changes: 22 additions & 0 deletions
22
packages/afk_nostr_sdk/src/hooks/group/private/useCreateGroup.ts
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,22 @@ | ||
import { useMutation } from '@tanstack/react-query'; | ||
import { useNostrContext } from '../../../context/NostrContext'; | ||
import { useAuth } from '../../../store'; | ||
|
||
export type UseCreateGroupOptions = { | ||
authors?: string[]; | ||
search?: string; | ||
}; | ||
|
||
// TODO | ||
export const useCreateGroup = (options?: UseCreateGroupOptions) => { | ||
const { ndk } = useNostrContext(); | ||
const { publicKey } = useAuth() | ||
|
||
return useMutation({ | ||
mutationKey: ['createGroup', ndk], | ||
mutationFn: async (data: { pubkey: string }) => { | ||
|
||
|
||
}, | ||
}); | ||
}; |
22 changes: 22 additions & 0 deletions
22
packages/afk_nostr_sdk/src/hooks/group/private/useDeleteEvent.ts
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,22 @@ | ||
import {useMutation} from '@tanstack/react-query'; | ||
import {useNostrContext} from '../../../context/NostrContext'; | ||
import { useAuth } from '../../../store'; | ||
|
||
export type UseDeleteEventGroupOptions = { | ||
authors?: string[]; | ||
search?: string; | ||
}; | ||
|
||
// TODO | ||
export const useDeleteEvent = (options?: UseDeleteEventGroupOptions) => { | ||
const {ndk} = useNostrContext(); | ||
const {publicKey} = useAuth() | ||
|
||
return useMutation({ | ||
mutationKey: ['deleteEventGroup', ndk], | ||
mutationFn: async (data: {pubkey: string}) => { | ||
|
||
|
||
}, | ||
}); | ||
}; |
22 changes: 22 additions & 0 deletions
22
packages/afk_nostr_sdk/src/hooks/group/private/useRemoveMember.ts
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,22 @@ | ||
import { useMutation} from '@tanstack/react-query'; | ||
import {useNostrContext} from '../../../context/NostrContext'; | ||
import { useAuth } from '../../../store'; | ||
|
||
export type UseRemoveMemberOptions = { | ||
authors?: string[]; | ||
search?: string; | ||
}; | ||
|
||
// TODO | ||
export const useRemoveMember = (options?: UseRemoveMemberOptions) => { | ||
const {ndk} = useNostrContext(); | ||
const {publicKey} = useAuth() | ||
|
||
return useMutation({ | ||
mutationKey: ['removeMemberGroup', ndk], | ||
mutationFn: async (data: {pubkey: string}) => { | ||
|
||
|
||
}, | ||
}); | ||
}; |
22 changes: 22 additions & 0 deletions
22
packages/afk_nostr_sdk/src/hooks/group/private/useRemovePermissions.ts
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,22 @@ | ||
import {useMutation} from '@tanstack/react-query'; | ||
import {useNostrContext} from '../../../context/NostrContext'; | ||
import { useAuth } from '../../../store'; | ||
|
||
export type UseRemovePermissionsOptions = { | ||
authors?: string[]; | ||
search?: string; | ||
}; | ||
|
||
// TODO | ||
export const useRemovePermissions = (options?: UseRemovePermissionsOptions) => { | ||
const {ndk} = useNostrContext(); | ||
const {publicKey} = useAuth() | ||
|
||
return useMutation({ | ||
mutationKey: ['removePermissions', ndk], | ||
mutationFn: async (data: {pubkey: string}) => { | ||
|
||
|
||
}, | ||
}); | ||
}; |
22 changes: 22 additions & 0 deletions
22
packages/afk_nostr_sdk/src/hooks/group/private/useSendGroupMessage.ts
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,22 @@ | ||
import { useMutation } from '@tanstack/react-query'; | ||
import { useNostrContext } from '../../../context/NostrContext'; | ||
import { useAuth } from '../../../store'; | ||
|
||
export type UseSendGroupMessages = { | ||
authors?: string[]; | ||
search?: string; | ||
}; | ||
|
||
// TODO | ||
export const useSendGroupMessages = (options?: UseSendGroupMessages) => { | ||
const { ndk } = useNostrContext(); | ||
const { publicKey } = useAuth() | ||
|
||
return useMutation({ | ||
mutationKey: ['sendMessageGroup', ndk], | ||
mutationFn: async (data: { pubkey: string }) => { | ||
|
||
|
||
}, | ||
}); | ||
}; |