chore: remove get data on mount

This commit is contained in:
Faisal Amir 2024-11-18 16:17:31 +07:00
parent a6f2de922c
commit 18e9a2e4d8
2 changed files with 1 additions and 7 deletions

View File

@ -2,12 +2,7 @@
import { Fragment, ReactNode, useEffect } from 'react' import { Fragment, ReactNode, useEffect } from 'react'
import { import { AppConfiguration, getUserHomePath } from '@janhq/core'
AppConfiguration,
events,
getUserHomePath,
ModelEvent,
} from '@janhq/core'
import { useSetAtom } from 'jotai' import { useSetAtom } from 'jotai'
import useAssistants from '@/hooks/useAssistants' import useAssistants from '@/hooks/useAssistants'

View File

@ -84,7 +84,6 @@ const useModels = () => {
useEffect(() => { useEffect(() => {
// Try get data on mount // Try get data on mount
if (isUpdated) { if (isUpdated) {
reloadData()
// Listen for model updates // Listen for model updates
events.on(ModelEvent.OnModelsUpdate, async () => reloadData()) events.on(ModelEvent.OnModelsUpdate, async () => reloadData())
return () => { return () => {