Skip to content

Commit 77f4dda

Browse files
committed
chore: upgrade example with-nextjs
1 parent ee21b99 commit 77f4dda

File tree

4 files changed

+10
-17
lines changed

4 files changed

+10
-17
lines changed

examples/with-nextjs/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
"next": "14",
1111
"react": "^18.3.1",
1212
"react-dom": "^18.3.1",
13-
"zod": "^3.23.8"
13+
"zod": "^3.24.2"
1414
},
1515
"devDependencies": {
1616
"@types/node": "^22.5.4",
1717
"@types/react": "^18.3.12",
1818
"@types/react-dom": "^18.3.1",
1919
"typescript": "^5.5.4"
2020
}
21-
}
21+
}

examples/with-nextjs/src/lib/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { NextAction } from '@yme/api/next/action';
1+
import { NextAction } from '@yme/api/next';
22
import { logger } from '@yme/api/middleware';
33
import { ZodError } from 'zod';
44
import { ApiError } from '@yme/api';

examples/with-nextjs/src/lib/apiClient.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
'use client';
22

3-
import type { HttpApiRequest } from '@yme/api';
4-
import { ApiClient } from '@yme/api/client';
3+
import { createClient } from '@yme/api/client';
54
import { replacePathParams } from '@yme/api/client';
65
import { logger } from '@yme/api/middleware';
76
import { z } from 'zod';
87

9-
export const api = new ApiClient<
10-
HttpApiRequest & {
8+
export const api = createClient<{
9+
Req: {
1110
signal?: AbortSignal;
1211
headers?: Record<string, string>;
13-
},
14-
{}
15-
>({
12+
};
13+
}>({
1614
action: async ({ req }) => {
1715
const url = new URL(`/api/${req.url}`, window.location.origin);
1816
let body: any = null;

pnpm-lock.yaml

Lines changed: 2 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)