Skip to content

Commit

Permalink
Merge pull request #82 from oslabs-beta/john/nextjs
Browse files Browse the repository at this point in the history
John/nextjs
  • Loading branch information
johnwdunn20 authored Jul 25, 2024
2 parents a7c4911 + 7169882 commit 7e1bcd4
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 15 deletions.
9 changes: 9 additions & 0 deletions package-react/example/server/models/finance.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
[
{
"text": "test",
"liked": false,
"replies": [],
"createComment": false,
"timestamp": "Jul 24, 2024",
"username": "Guest",
"picture": "guest"
},
{
"text": "With the current market volatility, I'm exploring more into crypto. It's a high-risk, high-reward scenario, but diversification is key.",
"liked": false,
Expand Down
2 changes: 1 addition & 1 deletion package-react/example/server/models/technology.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"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.",
"liked": false,
"liked": true,
"createComment": false,
"timestamp": "Mar 4, 2024",
"username": "Marcus Holloway",
Expand Down
4 changes: 2 additions & 2 deletions package-react/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"type": "git",
"url": "git+https://github.com/oslabs-beta/react-query-rewind.git"
},
"version": "2.1.11",
"version": "2.1.12",
"description": "React Query Rewind is a library that helps developers debug applications that use React Query (ie TanStack Query) by letting them time travel through state changes directly in their chrome dev tools",
"keywords": [
"react",
Expand Down
2 changes: 1 addition & 1 deletion package-react/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
exclude: 'node_modules/**'
}),
// terser(), // Minifies the bundles
terser(), // Minifies the bundles
]
};

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { ErrorBoundary as ReactErrorBoundary, FallbackProps } from 'react-error-boundary';
import { ErrorBoundary, FallbackProps } from 'react-error-boundary';

// Fallback component to display when an error is caught
const ErrorFallback: React.FC<FallbackProps> = ({ error }) => {
Expand All @@ -11,12 +11,12 @@ const ErrorFallback: React.FC<FallbackProps> = ({ error }) => {
};

// ErrorBoundary component wrapping the ErrorFallback
const ErrorBoundary: React.FC<{ children: React.ReactNode }> = ({ children }) => {
const CustomErrorBoundary: React.FC<{ children: React.ReactNode }> = ({ children }) => {
return (
<ReactErrorBoundary FallbackComponent={ErrorFallback}>
<ErrorBoundary FallbackComponent={ErrorFallback}>
{children}
</ReactErrorBoundary>
</ErrorBoundary>
);
};

export default ErrorBoundary;
export default CustomErrorBoundary;
6 changes: 3 additions & 3 deletions package-react/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useEffect, useRef, useState } from 'react';
import Subscription from './Subscription';
import TimeTravel from './TimeTravel';
import ErrorBoundary from './ErrorBoundary';
import CustomErrorBoundary from './CustomErrorBoundary';

function ReactQueryRewind() {
const [timeTravel, setTimeTravel] = useState(false);
Expand Down Expand Up @@ -49,13 +49,13 @@ function ReactQueryRewind() {
}, []);

return (
<ErrorBoundary>
<CustomErrorBoundary>
{timeTravel ? (
<TimeTravel />
) : (
<Subscription handleMessages={handleMessages} />
)}
</ErrorBoundary>
</CustomErrorBoundary>
);
}

Expand Down
2 changes: 1 addition & 1 deletion package-svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"type": "git",
"url": "git+https://github.com/oslabs-beta/react-query-rewind.git"
},
"version": "1.1.8",
"version": "1.1.9",
"description": "Svelte Query Rewind is a library that helps developers debug applications that use React Query (ie TanStack Query) by letting them time travel through state changes directly in their chrome dev tools",
"keywords": [
"svelte",
Expand Down
2 changes: 1 addition & 1 deletion package-vue/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-query-rewind/vue-query-rewind",
"version": "1.1.9",
"version": "1.1.10",
"description": "Vue Query Rewind is a library that helps developers debug applications that use React Query (ie TanStack Query) by letting them time travel through state changes directly in their chrome dev tools",
"type": "module",
"files": [
Expand Down

0 comments on commit 7e1bcd4

Please sign in to comment.