Skip to content

Commit 6684d2c

Browse files
committed
Updated queryData to check for empty string instead of N/A to align with extension's intial state
1 parent d544c46 commit 6684d2c

File tree

4 files changed

+50
-4
lines changed

4 files changed

+50
-4
lines changed

examples/example-2/client/src/client/linked/TimeTravel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const TimeTravel = () => {
99
const listener = (event: CustomEvent) => {
1010
const currentQuery: QueryDisplay[] = event.detail.currentQuery;
1111
currentQuery.forEach((queryState) => {
12-
if (queryState.queryData !== 'N/A') {
12+
if (queryState.queryData !== '') {
1313
queryClient.setQueryData(
1414
[queryState.queryKey.slice(2, -2)],
1515
queryState.queryData

examples/example-2/server/models/postsOne.json

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,31 @@
11
{
22
"posts": [
3+
{
4+
"text": "test",
5+
"liked": true,
6+
"comments": [],
7+
"createComment": false,
8+
"timestamp": "7:25 PM"
9+
},
10+
{
11+
"text": "new",
12+
"liked": true,
13+
"comments": [
14+
"hi"
15+
],
16+
"createComment": true,
17+
"timestamp": "5:59 PM"
18+
},
319
{
420
"text": "feed 2",
521
"liked": true,
622
"comments": [
723
"comment",
824
"comment 1",
9-
"comment 2"
25+
"comment 2",
26+
"hi"
1027
],
11-
"createComment": false,
28+
"createComment": true,
1229
"timestamp": "7:02 PM"
1330
}
1431
]

examples/example-2/server/models/postsThree.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
{
22
"posts": [
3+
{
4+
"text": "new",
5+
"liked": false,
6+
"comments": [],
7+
"createComment": false,
8+
"timestamp": "7:26 PM"
9+
},
310
{
411
"id": 1,
512
"text": "Feed 3 - First Post",

examples/example-2/server/models/postsTwo.json

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
{
22
"posts": [
3+
{
4+
"text": "test",
5+
"liked": false,
6+
"comments": [],
7+
"createComment": false,
8+
"timestamp": "7:33 PM"
9+
},
10+
{
11+
"text": "new",
12+
"liked": false,
13+
"comments": [],
14+
"createComment": false,
15+
"timestamp": "7:33 PM"
16+
},
17+
{
18+
"text": "hi",
19+
"liked": false,
20+
"comments": [],
21+
"createComment": false,
22+
"timestamp": "7:33 PM"
23+
},
324
{
425
"text": "4",
526
"liked": true,
@@ -11,7 +32,8 @@
1132
"text": "2",
1233
"liked": true,
1334
"comments": [
14-
"hello"
35+
"hello",
36+
"hi"
1537
],
1638
"createComment": true,
1739
"timestamp": "9:57 PM"

0 commit comments

Comments
 (0)