app-tutor-ai-consumer 1.35.0 → 1.35.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "app-tutor-ai-consumer",
|
|
3
|
-
"version": "1.35.
|
|
3
|
+
"version": "1.35.1",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "rspack serve --env=development --config config/rspack/rspack.config.js",
|
|
@@ -111,9 +111,7 @@
|
|
|
111
111
|
"@hotmart-org-ca/sparkie": "~5.1.4",
|
|
112
112
|
"@hotmart/event-agent-js": "~1.1.2",
|
|
113
113
|
"@optimizely/react-sdk": "~3.2.4",
|
|
114
|
-
"@tanstack/query-sync-storage-persister": "~5.80.7",
|
|
115
114
|
"@tanstack/react-query": "~5.80.6",
|
|
116
|
-
"@tanstack/react-query-persist-client": "~5.80.7",
|
|
117
115
|
"clsx": "~2.1.1",
|
|
118
116
|
"dayjs": "~1.11.13",
|
|
119
117
|
"i18next": "~25.2.1",
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { createSyncStoragePersister } from '@tanstack/query-sync-storage-persister'
|
|
2
1
|
import { QueryClient } from '@tanstack/react-query'
|
|
3
2
|
|
|
4
3
|
import { DEFAULT_STALE_TIME, HttpCodes } from '@/src/lib/utils'
|
|
@@ -26,7 +25,3 @@ export const queryClient = new QueryClient({
|
|
|
26
25
|
}
|
|
27
26
|
}
|
|
28
27
|
})
|
|
29
|
-
|
|
30
|
-
export const persister = createSyncStoragePersister({
|
|
31
|
-
storage: window.localStorage
|
|
32
|
-
})
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { QueryClient } from '@tanstack/react-query'
|
|
2
|
+
import { QueryClientProvider } from '@tanstack/react-query'
|
|
2
3
|
import { ReactQueryDevtools } from '@tanstack/react-query-devtools'
|
|
3
|
-
import { PersistQueryClientProvider } from '@tanstack/react-query-persist-client'
|
|
4
4
|
import type { PropsWithChildren } from 'react'
|
|
5
5
|
|
|
6
|
-
import { persister } from './query-client'
|
|
7
|
-
|
|
8
6
|
export type QueryProviderProps = PropsWithChildren<{
|
|
9
7
|
showDevTools?: boolean
|
|
10
8
|
queryClient: QueryClient
|
|
@@ -12,17 +10,10 @@ export type QueryProviderProps = PropsWithChildren<{
|
|
|
12
10
|
|
|
13
11
|
function QueryProvider({ children, queryClient, showDevTools = true }: QueryProviderProps) {
|
|
14
12
|
return (
|
|
15
|
-
<
|
|
16
|
-
client={queryClient}
|
|
17
|
-
persistOptions={
|
|
18
|
-
{
|
|
19
|
-
persister,
|
|
20
|
-
shouldPersistQuery: (query: Query) => query.meta?.persist !== false
|
|
21
|
-
} as Parameters<typeof PersistQueryClientProvider>[0]['persistOptions']
|
|
22
|
-
}>
|
|
13
|
+
<QueryClientProvider client={queryClient}>
|
|
23
14
|
{children}
|
|
24
15
|
{showDevTools && <ReactQueryDevtools buttonPosition='top-right' />}
|
|
25
|
-
</
|
|
16
|
+
</QueryClientProvider>
|
|
26
17
|
)
|
|
27
18
|
}
|
|
28
19
|
|
|
@@ -44,9 +44,6 @@ export const getAllMessagesQuery = ({
|
|
|
44
44
|
return minSentAt
|
|
45
45
|
},
|
|
46
46
|
enabled: Boolean(conversationId && profileId) && limit > 0,
|
|
47
|
-
meta: {
|
|
48
|
-
persist: false
|
|
49
|
-
},
|
|
50
47
|
select(data) {
|
|
51
48
|
const messages = data.pages?.flatMap((page) => page.messages) ?? []
|
|
52
49
|
return messagesParser({ messages, profileId: profileId as string }).reduce(
|