mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-14 00:46:39 +00:00
refactor contexts, format zod errors, and more refactoring
This commit is contained in:
@@ -4,7 +4,9 @@ import { useContext } from "react";
|
||||
export function useResourceContext() {
|
||||
const context = useContext(ResourceContext);
|
||||
if (context === undefined) {
|
||||
throw new Error('useResourceContext must be used within a ResourceProvider');
|
||||
throw new Error(
|
||||
"useResourceContext must be used within a ResourceProvider"
|
||||
);
|
||||
}
|
||||
return context;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user