Skip to content

Commit 3e07396

Browse files
Merge pull request #64 from oslabs-beta/john/final-test
John/final test
2 parents 03099fc + 02d32aa commit 3e07396

File tree

6 files changed

+7
-17
lines changed

6 files changed

+7
-17
lines changed

.DS_Store

0 Bytes
Binary file not shown.

extension/src/App.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ function App() {
3838

3939
// By checking data more thoroughly, we can avoid adding data that we don't expect in child components. This is the data we have the least control over.
4040
// Future iteration could use Zod or something a little less manual and be a more prcise
41-
console.log('Recieved event message', message)
4241
if (
4342
message.type === 'event' &&
4443
message.payload &&

package-react/example/server/models/technology.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[
22
{
33
"text": "Agree on the dev experience. Also, for those looking to optimize their app's performance, React Query's automatic data fetching on window refocus or network reconnect is a neat feature. Reduces the need for manual refetching and ensures data is always fresh.",
4-
"liked": true,
4+
"liked": false,
55
"createComment": false,
66
"timestamp": "Mar 4, 2024",
77
"username": "Marcus Holloway",
@@ -18,6 +18,12 @@
1818
"timestamp": "Mar 20, 2024",
1919
"username": "Guest",
2020
"picture": "guest"
21+
},
22+
{
23+
"text": "test",
24+
"timestamp": "May 22, 2024",
25+
"username": "Guest",
26+
"picture": "guest"
2127
}
2228
]
2329
},

package-react/src/Subscription.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ function Subscription({ handleMessages }: SubscriptionProps) {
1111
const queryCache = queryClient.getQueryCache();
1212

1313
const handleQueryCacheChange = async (event: any) => {
14-
// console.log('event', event);
1514
const message = formatData(event, queryClient);
16-
// console.log('message', message);
1715
if (message) handleMessages(message);
1816
};
1917

package-react/src/formatData.ts

-8
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,6 @@ export function formatData(
2121

2222
if (eventType === 'updated' && event.action?.type === 'success') {
2323
const queryData = queryClient.getQueryData(queryKey);
24-
console.log('full event: ', event);
25-
console.log('parsed event: ', {
26-
eventType,
27-
queryKey,
28-
queryHash,
29-
timestamp,
30-
queryData,
31-
});
3224
return {
3325
eventType,
3426
queryKey,

package-react/src/index.tsx

-5
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,13 @@ function ReactQueryRewind() {
1515

1616
const handleMessages = (message: any) => {
1717
if (contentConnectedRef.current) {
18-
console.log('Sending Event');
1918
sendEvent(message);
2019
} else {
2120
contentMessageQueueRef.current.push(message);
22-
console.log('Current Queue:', contentMessageQueueRef.current);
2321
}
2422
};
2523

2624
const sendEvent = (event: any) => {
27-
console.log('Sending Event:', event.queryHash);
2825
window.postMessage(
2926
{ framework: 'react', type: 'event', payload: event },
3027
'*'
@@ -33,7 +30,6 @@ function ReactQueryRewind() {
3330

3431
const handleContentMessages = (message: MessageEvent) => {
3532
if (message.data?.type === 'content-script-ready') {
36-
console.log('APP: Content.ts connected');
3733
contentConnectedRef.current = true;
3834
window.postMessage({ type: 'app-connected' }, '*');
3935
sendContentMessageQueue();
@@ -45,7 +41,6 @@ function ReactQueryRewind() {
4541
};
4642

4743
useEffect(() => {
48-
// console.log('APP: Mounting Event Listeners');
4944
window.addEventListener('message', handleContentMessages);
5045

5146
return () => {

0 commit comments

Comments
 (0)