10 lines
257 B
TypeScript
10 lines
257 B
TypeScript
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)
|
|
}
|