feat: preserve query params when navigating back to flow page from flow editor
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import * as React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { Link, useLocation } from 'react-router-dom';
|
||||
import Card from '@mui/material/Card';
|
||||
import IconButton from '@mui/material/IconButton';
|
||||
import CardActionArea from '@mui/material/CardActionArea';
|
||||
@@ -34,6 +34,7 @@ function getFlowStatusColor(status) {
|
||||
}
|
||||
|
||||
function FlowRow(props) {
|
||||
const location = useLocation();
|
||||
const formatMessage = useFormatMessage();
|
||||
const contextButtonRef = React.useRef(null);
|
||||
const [anchorEl, setAnchorEl] = React.useState(null);
|
||||
@@ -63,6 +64,9 @@ function FlowRow(props) {
|
||||
component={Link}
|
||||
to={URLS.FLOW(flow.id)}
|
||||
data-test="card-action-area"
|
||||
state={{
|
||||
from: `${location.pathname}${location.search}${location.hash}`,
|
||||
}}
|
||||
>
|
||||
<CardContent>
|
||||
<Apps direction="row" gap={1} sx={{ gridArea: 'apps' }}>
|
||||
|
||||
Reference in New Issue
Block a user