Skip to content

Commit 0f1d49c

Browse files
authored
Merge pull request #263 from greidinger-reis/next-safe-action
[#240] Next safe action refactor
2 parents 4c83ffc + baedf81 commit 0f1d49c

File tree

21 files changed

+381
-365
lines changed

21 files changed

+381
-365
lines changed

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"lucide-react": "^0.259.0",
4141
"next": "13.4.9",
4242
"next-auth": "^4.22.1",
43+
"next-safe-action": "^3.0.1",
4344
"next-themes": "^0.2.1",
4445
"nextjs-toploader": "^1.4.2",
4546
"postcss": "8.4.25",
@@ -54,7 +55,6 @@
5455
"tailwindcss": "3.3.2",
5556
"tailwindcss-animate": "^1.0.6",
5657
"unstyled-table": "^0.0.3-alpha-3",
57-
"zact": "^0.0.2",
5858
"zod": "^3.21.4"
5959
},
6060
"devDependencies": {

src/app/(profile-related)/profile/_components/confirmation.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export default function DeleteConfirmation({
3333
setIsLoading(true);
3434
e.preventDefault();
3535
try {
36-
await deleteUserAction();
36+
await deleteUserAction({});
3737
await signOut({
3838
callbackUrl: "/",
3939
});

src/app/(user)/[userId]/page.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { Heading } from "@/components/ui/heading";
22
import { prisma } from "@/lib/prisma";
33

4-
54
interface PageProps {
65
params: {
76
userId: string;
@@ -20,7 +19,10 @@ const page = async ({ params }: PageProps) => {
2019
title="Hello, Welcome to my profile"
2120
description="Here you can find information about the user"
2221
/>
23-
<h1>If anyone works on the design of this page let me know discord @trace2798</h1>
22+
<h1>
23+
If anyone works on the design of this page let me know discord
24+
@trace2798
25+
</h1>
2426
{/* <h1>Account Created:{formatTime}</h1> */}
2527
<h1>My Id is: {user?.id}</h1>
2628
<h2>Name: {user?.name}</h2>

0 commit comments

Comments
 (0)