Spaces:
Configuration error
Configuration error
Download web/apps/labelstudio/src/components/Error/InlineError.jsx from bisalsaha/lebel-studio: direct link, hf CLI and curl.
- Browser
- Download file 693 Bytes
-
https://huggingface.co/spaces/bisalsaha/lebel-studio/resolve/main/web/apps/labelstudio/src/components/Error/InlineError.jsx
- Command line
-
hf download hf://spaces/bisalsaha/lebel-studio/web/apps/labelstudio/src/components/Error/InlineError.jsx
-
curl -L -o InlineError.jsx https://huggingface.co/spaces/bisalsaha/lebel-studio/resolve/main/web/apps/labelstudio/src/components/Error/InlineError.jsx
693 Bytes
| import React from "react"; | |
| import { ApiContext } from "../../providers/ApiProvider"; | |
| import { cn } from "../../utils/bem"; | |
| import { ErrorWrapper } from "./Error"; | |
| export const InlineError = ({ minimal, children, includeValidation, className, style }) => { | |
| const context = React.useContext(ApiContext); | |
| React.useEffect(() => { | |
| context.showGlobalError = false; | |
| }, [context]); | |
| return context.error ? ( | |
| <div className={cn("inline-error").mix(className).toClassName()} style={style}> | |
| <ErrorWrapper | |
| possum={false} | |
| minimal={minimal} | |
| {...context.errorFormatter(context.error, { includeValidation })} | |
| /> | |
| {children} | |
| </div> | |
| ) : null; | |
| }; | |