Skip to content

Commit

Permalink
[frontend] TS issue (#7400)
Browse files Browse the repository at this point in the history
  • Loading branch information
CelineSebe committed Sep 26, 2024
1 parent cdde706 commit 7764cb2
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ interface FeedCreationFormProps {
open: boolean;
isDuplicated: boolean;
onDrawerClose: () => void;
feed?: FeedAddInput;
feed: FeedAddInput | undefined;
}

const feedCreationValidation = (t_i18n: (s: string) => string) => Yup.object().shape({
Expand Down Expand Up @@ -175,15 +175,15 @@ const FeedCreation: FunctionComponent<FeedCreationFormProps> = (props) => {
...n,
mappings: R.indexBy(R.prop('type'), n.mappings),
}))
: []; // Si `feed_attributes` est null ou undefined, initialisez avec un tableau vide
: [];

const [feedAttributes, setFeedAttributes] = useState(feedAttributesInitialState);
const { ignoredAttributesInFeeds } = useAttributes();

const handleClose = () => {
setSelectedTypes([]);
helpers.handleClearAllFilters();
setFeedAttributes({ 0: {} });
setFeedAttributes(feedAttributesInitialState);
if (!isDuplicated) {
onDrawerClose();
}
Expand Down

0 comments on commit 7764cb2

Please sign in to comment.