Skip to content

Commit

Permalink
Merge pull request #25 from dappforce/deploy/test-cd
Browse files Browse the repository at this point in the history
Add error text for incorrect url
  • Loading branch information
teodorus-nathaniel committed Feb 15, 2023
2 parents f7c120c + 9561f51 commit 5c05d70
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions src/components/cards/FetchTweetCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,22 @@ const FetchTweetCard = ({ disabled, onFetchTweet }: FetchTweetCardProps) => {
{`1. Find a tweet using URL ${isTweetFetched ? "✅" : ""}`}
</h2>
<div id="input-tweet-url-root" className={rootInput}>
<Input
label="Tweet URL"
value={tweetUrl}
// disabled={formDisabled}
disabled={disabled}
onChange={handleChange}
error={errorInput}
className={clsx("!rounded-lg bg-[#FAFBFB]", { "cursor-not-allowed": disabled })}
/>
<div className="flex flex-col gap-1">
<Input
label="Tweet URL"
value={tweetUrl}
// disabled={formDisabled}
disabled={disabled}
onChange={handleChange}
error={errorInput}
className={clsx("!rounded-lg bg-[#FAFBFB]", { "cursor-not-allowed": disabled })}
/>
{errorInput && (
<label className="text-xs text-[#f44336]">
Invalid link, please enter the link to a tweet on Twitter.
</label>
)}
</div>
{!tweetUrl || errorInput ? (
<Tooltip className="w-full cursor-not-allowed" message="Please enter tweet URL">
<Button
Expand Down

0 comments on commit 5c05d70

Please sign in to comment.