mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-24 17:51:14 +02:00
22 lines
614 B
TypeScript
22 lines
614 B
TypeScript
import { VFC } from 'react';
|
|
import { useParams } from 'react-router-dom';
|
|
import { FeatureTypeSchema } from 'openapi';
|
|
import { FeatureTypeForm } from './FeatureTypeForm/FeatureTypeForm';
|
|
|
|
type FeatureTypeEditProps = {
|
|
featureTypes: FeatureTypeSchema[];
|
|
loading: boolean;
|
|
};
|
|
|
|
export const FeatureTypeEdit: VFC<FeatureTypeEditProps> = ({
|
|
featureTypes,
|
|
loading,
|
|
}) => {
|
|
const { featureTypeId } = useParams();
|
|
const featureType = featureTypes.find(
|
|
featureType => featureType.id === featureTypeId
|
|
);
|
|
|
|
return <FeatureTypeForm featureType={featureType} loading={loading} />;
|
|
};
|