Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: fix custom hook alert title and trim slash from url #5117

Merged
merged 2 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function ExternalSourceAlert({ className, onChange, title, children }: Ex
return (
<styledEl.Contents className={className}>
<AlertTriangle size={48} strokeWidth={1} />
<h3>{title}</h3>
<styledEl.Title>{title}</styledEl.Title>
{children}

<styledEl.AcceptanceBox>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,21 @@ export const Contents = styled.div`
color: var(${UI.COLOR_DANGER_TEXT});
background: var(${UI.COLOR_DANGER_BG});

h3 {
font-size: 24px;
text-align: center;
margin: 16px 0;
font-weight: bold;
}

p {
margin: 6px 0;
}

> svg > path,
> svg > line {
stroke: var(${UI.COLOR_DANGER_TEXT});
stroke-width: 2px;
}
`

export const Title = styled.h4`
font-size: 24px;
text-align: center;
margin: 16px 0;
font-weight: bold;
width: 100%;
`

export const AcceptanceBox = styled.label`
display: flex;
gap: 6px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export function AddCustomHookForm({ addHookDapp, children, isPreHook, walletType
type="text"
placeholder="Enter a hook dapp URL"
value={input}
onChange={(e) => setInput(e.target.value?.trim())}
onChange={(e) => setInput(e.target.value?.trim().replace(/\/+$/, ''))}
/>

{/* Validation and Error Messages */}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ export function SwapWidget({ topContent, bottomContent }: SwapWidgetProps) {
iconSize={24}
orientation={BannerOrientation.Horizontal}
backDropBlur
margin="10px auto auto"
>
Funds stuck? <Link to={cowShedLink}>Recover your funds</Link>
</InlineBanner>
Expand Down
Loading