parent
04fdb4b0e1
commit
bb96fe4774
1 changed files with 9 additions and 0 deletions
@ -0,0 +1,9 @@ |
|||||||
|
import { useAppContext } from '../../contexts/AppContext' |
||||||
|
import { Stack } from '../../types' |
||||||
|
|
||||||
|
export const useCreateStack = () => { |
||||||
|
const api = useAppContext() |
||||||
|
|
||||||
|
return (body: Omit<Stack, 'id'>): Promise<Stack> => |
||||||
|
api.post<Stack>('/stacks', body) |
||||||
|
} |
Loading…
Reference in new issue