Skip to content

Commit ae67969

Browse files
committed
fix(ui): drop 'Submit another' on the network form (one network per submission)
1 parent 54628c2 commit ae67969

2 files changed

Lines changed: 15 additions & 5 deletions

File tree

_config/ui/app/_components/Submit/NetworkSubmitForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ export function NetworkSubmitForm({chain, signedIn}: {chain: TAllChainInfo; sign
265265
</Button>
266266
</div>
267267

268-
<SubmitResult prURL={prURL} onClose={() => setPrURL(null)} />
268+
<SubmitResult prURL={prURL} onClose={() => setPrURL(null)} showSubmitAnother={false} />
269269
</>
270270
);
271271
}

_config/ui/app/_components/Submit/SubmitResult.tsx

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,15 @@ import Link from 'next/link';
88

99
import type {ReactElement} from 'react';
1010

11-
export function SubmitResult({prURL, onClose}: {prURL: string | null; onClose: () => void}): ReactElement {
11+
export function SubmitResult({
12+
prURL,
13+
onClose,
14+
showSubmitAnother = true
15+
}: {
16+
prURL: string | null;
17+
onClose: () => void;
18+
showSubmitAnother?: boolean;
19+
}): ReactElement {
1220
return (
1321
<Dialog.Root
1422
open={Boolean(prURL)}
@@ -40,9 +48,11 @@ export function SubmitResult({prURL, onClose}: {prURL: string | null; onClose: (
4048
<Link href={prURL || '#'} target={'_blank'} rel={'noopener noreferrer'}>
4149
<Button variant={'default'}>{'View pull request →'}</Button>
4250
</Link>
43-
<Button variant={'outline'} onClick={onClose}>
44-
{'Submit another'}
45-
</Button>
51+
{showSubmitAnother && (
52+
<Button variant={'outline'} onClick={onClose}>
53+
{'Submit another'}
54+
</Button>
55+
)}
4656
</div>
4757
</Dialog.Content>
4858
</Dialog.Portal>

0 commit comments

Comments
 (0)