Skip to content

Commit

Permalink
Added redirect to replied wave page
Browse files Browse the repository at this point in the history
  • Loading branch information
dkildar committed Dec 2, 2024
1 parent 1473a81 commit 07f772e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/app/waves/_components/waves-fast-reply-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { WaveEntry } from "@/entities";
import { WaveForm } from "@/features/waves";
import { WavesListItem } from "@/app/waves/_components/waves-list-item";
import { AnimatePresence } from "framer-motion";
import { useRouter } from "next/navigation";

interface Props {
show: boolean;
Expand All @@ -12,6 +13,8 @@ interface Props {
}

export function WavesFastReplyDialog({ show, onHide, entry }: Props) {
const router = useRouter();

return (
<Modal size="lg" centered={true} show={show} onHide={onHide}>
<ModalHeader closeButton={true}>
Expand All @@ -23,7 +26,11 @@ export function WavesFastReplyDialog({ show, onHide, entry }: Props) {
<AnimatePresence>
{entry && <WavesListItem interactable={false} item={entry} i={0} />}
</AnimatePresence>
<WaveForm entry={undefined} replySource={entry} />
<WaveForm
entry={undefined}
replySource={entry}
onSuccess={() => router.push(`/waves/${entry?.author}/${entry?.permlink}`)}
/>
</Modal>
);
}

0 comments on commit 07f772e

Please sign in to comment.