diff --git a/src/components/App/AppBar/index.tsx b/src/components/App/AppBar/index.tsx index 99bb6abe5..a9670f8ad 100644 --- a/src/components/App/AppBar/index.tsx +++ b/src/components/App/AppBar/index.tsx @@ -13,7 +13,7 @@ import { media } from '~/utils/media' export const AppBar = () => { const appMetaData = useAppStore((s) => s.appMetaData) const { resetAiSummaryAnswer, setNewLoading } = useAiSummaryStore() - const { abortFetchData } = useDataStore((s) => s) + const { abortFetchData, resetGraph } = useDataStore((s) => s) const navigate = useNavigate() if (!appMetaData) { @@ -23,6 +23,7 @@ export const AppBar = () => { const handleLogoClick = () => { setNewLoading(null) abortFetchData() + resetGraph() resetAiSummaryAnswer() navigate('/') } diff --git a/src/stores/useDataStore/index.ts b/src/stores/useDataStore/index.ts index f1491c6f1..49102547c 100644 --- a/src/stores/useDataStore/index.ts +++ b/src/stores/useDataStore/index.ts @@ -279,6 +279,7 @@ export const useDataStore = create()( resetGraph: () => { set({ filters: defaultData.filters, + dataInitial: null, dataNew: null, })