Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
AlenaLoik committed Feb 4, 2025
1 parent 165ed3b commit 7071d52
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/TodoFilter/TodoFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const TodoFilter: React.FC<Props> = ({

<span className="icon is-right" style={{ pointerEvents: 'all' }}>
{/* eslint-disable-next-line jsx-a11y/control-has-associated-label */}
{query.length && (
{query.length > 0 && (
<button
data-cy="clearSearchButton"
type="button"
Expand Down
11 changes: 9 additions & 2 deletions src/components/TodoModal/TodoModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,15 @@ type Props = {
closeModal: () => void;
};

const defaultUser: User = {
id: 0,
name: '',
email: '',
phone: '',
};

export const TodoModal: React.FC<Props> = ({ todo, closeModal }) => {
const [user, setUser] = useState({} as User);
const [user, setUser] = useState(defaultUser as User);
const [loading, setLoading] = useState(false);

useEffect(() => {
Expand Down Expand Up @@ -65,7 +72,7 @@ export const TodoModal: React.FC<Props> = ({ todo, closeModal }) => {

{' by '}

<a href="mailto:[email protected]">{user.name}</a>
<a href={`mailto:${user.email}`}>{user.name}</a>
</p>
</div>
</div>
Expand Down

0 comments on commit 7071d52

Please sign in to comment.