Skip to content

done#2187

Open
bcheban wants to merge 1 commit into
mate-academy:masterfrom
bcheban:develop
Open

done#2187
bcheban wants to merge 1 commit into
mate-academy:masterfrom
bcheban:develop

Conversation

@bcheban
Copy link
Copy Markdown

@bcheban bcheban commented May 3, 2026

Copy link
Copy Markdown

@Anton-Kuchmasov Anton-Kuchmasov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job!

Check out comments below - they might be helpful before passing the Final review

Comment thread src/hooks/useError.tsx
import { useEffect, useState } from 'react';
import { ErrorType } from '../types/Error';

export const useError = () => {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good implementation!

Comment on lines +24 to +28
{error === 'load' && 'Unable to load todos'}
{error === 'title' && 'Title should not be empty'}
{error === 'add' && 'Unable to add a todo'}
{error === 'delete' && 'Unable to delete a todo'}
{error === 'update' && 'Unable to update a todo'}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind to create an object as const or simple Map to re-group those values?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants