Skip to content

Commit

Permalink
Merge pull request #1011 from InseeFr/fix/operation
Browse files Browse the repository at this point in the history
fix: add missing goBack prop
  • Loading branch information
PierreVasseur authored Oct 8, 2024
2 parents 2a8e180 + 90c79e7 commit b3dd99f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/packages/modules-operations/operations/edition/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ import { OperationsApi } from '../../../sdk/operations-api';
import { ReduxModel } from '../../../redux/model';
import { Operation } from '../../../model/Operation';
import { Series } from '../../../model/operations/series';
import { useGoBack } from '../../../utils/hooks/useGoBack';

export const Component = () => {
const { id } = useParams<{ id: string }>();
const [series, setSeries] = useState<Series[]>([]);
const [operation, setOperation] = useState<Operation | undefined>(undefined);
const stamp = useSelector((state: ReduxModel) => state.app!.auth.user.stamp);
const goBack = useGoBack();

useEffect(() => {
if (id) {
Expand All @@ -40,6 +42,7 @@ export const Component = () => {
series={series}
id={id}
operation={editingOperation}
goBack={goBack}
/>
);
};

0 comments on commit b3dd99f

Please sign in to comment.