Skip to content

Commit

Permalink
feat: re-open as draft redirect to edition screen.
Browse files Browse the repository at this point in the history
  • Loading branch information
benoitdevos committed Mar 28, 2024
1 parent c0c8e30 commit d136441
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/loc/LocDetailsTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import { createDocumentTemplateItem, createLinkTemplateItem, createMetadataTempl
import { useLogionChain } from "src/logion-chain";
import { CollectionInfo } from "./CollectionInfo";
import { TransactionInfo } from "./TransactionInfo";
import { locDetailsPath } from "../wallet-user/UserRouter";

export interface Props {
loc: LocData;
Expand Down Expand Up @@ -235,13 +236,13 @@ export function LocDetailsTabContent(props: ContentProps) {
await mutateLocState(async current => {
if(current instanceof RejectedRequest) {
const next = await current.rework();
navigate(backPath);
navigate(locDetailsPath(current.locId, current.data().locType));
return next.locsState();
} else {
return current;
}
});
}, [ mutateLocState, navigate, backPath ]);
}, [ mutateLocState, navigate ]);

if(!loc) {
return null;
Expand Down

0 comments on commit d136441

Please sign in to comment.