Vollständiges Redesign mit Gold-Formularen, BMP-Logo, multi-step Forms (Bewerbung, Kontakt, Sponsoring), Netlify-Deployment. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
15 lines
526 B
JavaScript
15 lines
526 B
JavaScript
import * as React from 'react';
|
|
import { useSidecar } from './hook';
|
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
export function sidecar(importer, errorComponent) {
|
|
const ErrorCase = () => errorComponent;
|
|
return function Sidecar(props) {
|
|
const [Car, error] = useSidecar(importer, props.sideCar);
|
|
if (error && errorComponent) {
|
|
return ErrorCase;
|
|
}
|
|
// @ts-expect-error type shenanigans
|
|
return Car ? React.createElement(Car, { ...props }) : null;
|
|
};
|
|
}
|