Skip to content

Conversation

@Dmytro-Doronin
Copy link

No description provided.

@Dmytro-Doronin
Copy link
Author

Copy link

@robvk robvk left a comment

Choose a reason for hiding this comment

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

Nice work as usual, great to see that you are doing some extra things to hopefully challenge yourself a little ;).

  • I like the functionality split, having api separate is a nice way of doing it. Arguments I have heard against this structure is that it separates code for the same feature from each other. But that is a preference thing I would say.
  • The formatting seems off in your project. Check that prettier is running and formatting your code. See Layout.tsx for an example where it is definitely not formatted the prettier way
  • What you call Notification is usually called Toast. A Notification is this:
image
  • Your toast system shows me 2 errors if I am offline. Steps I took: go to the main page, go offline, then click on a detail page (1 error), then click back and I see 2 errors:
image

Make sure you fix the double error problem, the rest is all purely for information. I don't expect you to do all of that, is for the next time. As such, I will approve it, I assume you can find out the double error on your own ;)

Nice work

<span className={`${styles.glow} ${styles['glow-bright']} ${styles['glow-bottom']}`}></span>
<div className={styles.inner}>
<img className={styles['card-img']} src={image} alt={title}/>
<h3>{replaceFake(title)}</h3>
Copy link

Choose a reason for hiding this comment

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

Do you still need the replaceFake function?

const [data, setData] = useState<T | null>(null)
const [error, setError] = useState<string | null>(null)
const { notify } = useNotification()
const request = useCallback(
Copy link

Choose a reason for hiding this comment

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

A question you may get during interviews is why you use a useCallback here. What would be your answer?

loading: categoriesLoading,
} = useFetch(getAllCategories)

const [currentCategory, setCurrentCategory] = useState<categoriesType>('All')
Copy link

Choose a reason for hiding this comment

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

You use 'All' a lot in different parts now. Maybe it is better to make it a constant now to ensure it remains the same

@robvk robvk added the Approved label Dec 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants