mirror of
https://github.com/pds-nest/nest.git
synced 2024-11-25 06:24:19 +00:00
14 lines
No EOL
379 B
JavaScript
14 lines
No EOL
379 B
JavaScript
import { useContext } from "react"
|
|
import ContextRepositoryEditor from "../contexts/ContextRepositoryEditor"
|
|
|
|
|
|
/**
|
|
* @todo Document this.
|
|
*/
|
|
export default function useRepositoryEditor() {
|
|
const context = useContext(ContextRepositoryEditor)
|
|
if(!context) {
|
|
throw new Error("Questo componente deve essere messo in un RepositoryEditor.")
|
|
}
|
|
return context
|
|
} |