Compare commits

...

2 commits

Author SHA1 Message Date
Anthony Al Lazkani
592adb15d3 Set timeout for 15 minutes instead of 10 seconds 2024-12-25 22:22:39 +01:00
Anthony Al Lazkani
abb7282869 Fix a small bug within the URL shortener component 2024-12-25 22:22:35 +01:00

View file

@ -48,7 +48,7 @@ export default function () {
setTimeout(() => {
setShowInput(false);
}, 10000);
}, 900000);
} catch (error) {
console.log(error);
}
@ -82,14 +82,15 @@ export default function () {
<form className="url-input" onSubmit={ShortenIt}>
<input
type="text"
placeholder="www.example.com"
placeholder="http://www.example.com"
aria-label="URL input field"
value={url}
onChange={(e) => setUrl(e.target.value)}
/>
<button type="submit">Shorten It</button>
</form>
{shortenedUrl && (
{shortenedUrl && showInput && (
<div className="url-input shortened">
<input type="text" readOnly value={shortenedUrl} />
<button onClick={copyURL}>Copy</button>
@ -102,8 +103,8 @@ export default function () {
</div>
<div className="right-side-content">
<p>
Shortenit is a free and open-source URL shortening service
designed for simplicity and efficiency.
Shortenit is a free and open-source URL shortening service designed
for simplicity and efficiency.
</p>
</div>
</div>