@@ -2,9 +2,8 @@ import React, { useState, useEffect } from 'react';
22import PostsOne from './components/PostsOne' ;
33import PostsTwo from './components/PostsTwo' ;
44import PostsThree from './components/PostsThree' ;
5- import ChromeComponent from './components/ChromeComponent' ;
6- import { useQuery } from '@tanstack/react-query' ;
7- import { QueryKey } from '@tanstack/react-query' ;
5+ // import ChromeComponent from './components/ChromeComponent';
6+ import { useQuery , QueryKey } from '@tanstack/react-query' ;
87
98type QueryEvent = {
109 eventType : string ;
@@ -22,7 +21,6 @@ type QueryData = {
2221
2322const App = ( ) => {
2423 const [ screenView , setScreenView ] = useState < string > ( 'Posts One' ) ;
25-
2624 const [ queryData , setQueryData ] = useState < QueryData > ( { } ) ;
2725
2826 // Fetch the data from React Query's cache
@@ -36,7 +34,6 @@ const App = () => {
3634 'queryHash' in queryEvent
3735 ) {
3836 const newEvent = queryEvent as QueryEvent ;
39-
4037 const queryHash = newEvent . queryHash ;
4138 const existingUpdates = queryData [ queryHash ] ?. updates || [ ] ;
4239
@@ -99,7 +96,7 @@ const App = () => {
9996 { screenView === 'Posts One' && < PostsOne /> }
10097 { screenView === 'Posts Two' && < PostsTwo /> }
10198 { screenView === 'Posts Three' && < PostsThree /> }
102- { screenView === 'Data' && < ChromeComponent queryData = { queryData } /> }
99+ { /* { screenView === 'Data' && <ChromeComponent queryData={queryData} /> } */ }
103100 </ div >
104101 </ >
105102 ) ;
0 commit comments