Fix getRandomTopics (#419)

This commit is contained in:
Ilya Y 2024-02-25 10:04:05 +03:00 committed by GitHub
parent 7a57c39a75
commit fe9fd37d9d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -142,10 +142,8 @@ export const Header = (props: Props) => {
}
onMount(async () => {
if (window.location.pathname === '/' || window.location.pathname === '') {
const topics = await apiClient.getRandomTopics({ amount: RANDOM_TOPICS_COUNT })
setRandomTopics(topics)
}
const topics = await apiClient.getRandomTopics({ amount: RANDOM_TOPICS_COUNT })
setRandomTopics(topics)
})
const handleToggleMenuByLink = (event: MouseEvent, route: keyof typeof ROUTES) => {