Files
SCM-Manager/scm-ui/ui-components/src/avatar/AvatarWrapper.tsx

14 lines
339 B
TypeScript
Raw Normal View History

import React, { FC } from "react";
import { useBinder } from "@scm-manager/ui-extensions";
import { EXTENSION_POINT } from "./Avatar";
2018-10-18 14:40:35 +02:00
const AvatarWrapper: FC = ({ children }) => {
const binder = useBinder();
if (binder.hasExtension(EXTENSION_POINT)) {
return <>{children}</>;
2018-10-18 14:40:35 +02:00
}
return null;
};
2018-10-18 14:40:35 +02:00
export default AvatarWrapper;