Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com> Co-authored-by: Matheus <matheus_benini@hotmail.com> Co-authored-by: v1b3m <vibenjamin6@gmail.com>
14 lines
373 B
TypeScript
14 lines
373 B
TypeScript
import { useRecoilCallback } from 'recoil';
|
|
|
|
import { generatedApiKeyFamilyState } from '@/settings/developers/states/generatedApiKeyFamilyState';
|
|
|
|
export const useGeneratedApiKeys = () => {
|
|
return useRecoilCallback(
|
|
({ set }) =>
|
|
(apiKeyId: string, apiKey: string | null) => {
|
|
set(generatedApiKeyFamilyState(apiKeyId), apiKey);
|
|
},
|
|
[],
|
|
);
|
|
};
|