Fix a small bug within the URL shortener component
This commit is contained in:
parent
35fa564a70
commit
abb7282869
1 changed files with 5 additions and 4 deletions
|
@ -82,14 +82,15 @@ export default function () {
|
||||||
<form className="url-input" onSubmit={ShortenIt}>
|
<form className="url-input" onSubmit={ShortenIt}>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="www.example.com"
|
placeholder="http://www.example.com"
|
||||||
aria-label="URL input field"
|
aria-label="URL input field"
|
||||||
value={url}
|
value={url}
|
||||||
onChange={(e) => setUrl(e.target.value)}
|
onChange={(e) => setUrl(e.target.value)}
|
||||||
/>
|
/>
|
||||||
<button type="submit">Shorten It</button>
|
<button type="submit">Shorten It</button>
|
||||||
</form>
|
</form>
|
||||||
{shortenedUrl && (
|
|
||||||
|
{shortenedUrl && showInput && (
|
||||||
<div className="url-input shortened">
|
<div className="url-input shortened">
|
||||||
<input type="text" readOnly value={shortenedUrl} />
|
<input type="text" readOnly value={shortenedUrl} />
|
||||||
<button onClick={copyURL}>Copy</button>
|
<button onClick={copyURL}>Copy</button>
|
||||||
|
@ -102,8 +103,8 @@ export default function () {
|
||||||
</div>
|
</div>
|
||||||
<div className="right-side-content">
|
<div className="right-side-content">
|
||||||
<p>
|
<p>
|
||||||
Shortenit is a free and open-source URL shortening service
|
Shortenit is a free and open-source URL shortening service designed
|
||||||
designed for simplicity and efficiency.
|
for simplicity and efficiency.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue