Fix getRandomTopics (#419)
This commit is contained in:
parent
7a57c39a75
commit
fe9fd37d9d
|
@ -142,10 +142,8 @@ export const Header = (props: Props) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
if (window.location.pathname === '/' || window.location.pathname === '') {
|
const topics = await apiClient.getRandomTopics({ amount: RANDOM_TOPICS_COUNT })
|
||||||
const topics = await apiClient.getRandomTopics({ amount: RANDOM_TOPICS_COUNT })
|
setRandomTopics(topics)
|
||||||
setRandomTopics(topics)
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const handleToggleMenuByLink = (event: MouseEvent, route: keyof typeof ROUTES) => {
|
const handleToggleMenuByLink = (event: MouseEvent, route: keyof typeof ROUTES) => {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user