Skip to content

Commit

Permalink
Merge pull request #2150 from Shoaibdev7/Reset-Graph-Clicking-Home-Lo…
Browse files Browse the repository at this point in the history
…go-Button-and-Logo-Text

[Graph]:  Not Reset to Default Mode After Clicking Home/Logo Button Following Answer Generation
  • Loading branch information
Rassl authored Oct 17, 2024
2 parents e2a4195 + 2588c9f commit 0a9e102
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/App/AppBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -23,6 +23,7 @@ export const AppBar = () => {
const handleLogoClick = () => {
setNewLoading(null)
abortFetchData()
resetGraph()
resetAiSummaryAnswer()
navigate('/')
}
Expand Down
1 change: 1 addition & 0 deletions src/stores/useDataStore/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ export const useDataStore = create<DataStore>()(
resetGraph: () => {
set({
filters: defaultData.filters,
dataInitial: null,
dataNew: null,
})

Expand Down

0 comments on commit 0a9e102

Please sign in to comment.