Skip to content

Commit

Permalink
Fix: Hide EditSeriesModal on route change (#931)
Browse files Browse the repository at this point in the history
  • Loading branch information
fearnlj01 authored Jun 2, 2024
1 parent fbf6f52 commit 5d01a6a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/Collection/Series/EditSeriesModal.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from 'react';
import React, { useEffect, useState } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import cx from 'classnames';
import { map } from 'lodash';
Expand Down Expand Up @@ -52,6 +52,8 @@ const EditSeriesModal = () => {
dispatch(setSeriesId(-1));
});

useEffect(() => onClose, [onClose]);

const seriesId = useSelector((state: RootState) => state.modals.editSeries.seriesId);

const [activeTab, setActiveTab] = useState('name');
Expand Down

0 comments on commit 5d01a6a

Please sign in to comment.