Skip to content

Commit

Permalink
further bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
elewis2 committed May 2, 2024
1 parent 36c69af commit 291efd5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/views/NewRecordView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ import util from '@/services/util';

const VARIANT_CLASSES = ['variant', 'positionalvariant', 'categoryvariant'];

const NewRecordView = () => {
const NewRecordView = ({ modelName: propsModelName }) => {
const navigate = useNavigate();
const { pathname } = useLocation();
const [searchParams] = useSearchParams();
const { modelName } = useParams<{ modelName: string }>();
const { modelName: paramsModelName } = useParams<{ modelName: string }>();
const modelName = propsModelName || paramsModelName;

/**
* After the form is submitted/completed. Handle the corresponding redirect
*/
Expand Down

0 comments on commit 291efd5

Please sign in to comment.