chore: remove get data on mount
This commit is contained in:
parent
a6f2de922c
commit
18e9a2e4d8
@ -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'
|
||||||
|
|||||||
@ -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 () => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user