From a7f4242eccb8684808ea5dffe78a07a87172c66f Mon Sep 17 00:00:00 2001 From: Indigo Tang Date: Sun, 6 Jul 2025 12:14:03 +0000 Subject: [PATCH] I see this error with the app, reported by NextJS, please fix it. The er --- src/data/operations.ts | 2 -- src/lib/db.ts | 6 +++++- toyshare.db | Bin 0 -> 4096 bytes toyshare.db-shm | Bin 0 -> 32768 bytes toyshare.db-wal | Bin 0 -> 28872 bytes 5 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 toyshare.db create mode 100644 toyshare.db-shm create mode 100644 toyshare.db-wal diff --git a/src/data/operations.ts b/src/data/operations.ts index a08dccc..de4580c 100644 --- a/src/data/operations.ts +++ b/src/data/operations.ts @@ -1,6 +1,4 @@ -'use server'; - import db from '@/lib/db'; import type { Toy, User } from '@/types'; import { mockOwnerProfiles } from '@/lib/mockData'; diff --git a/src/lib/db.ts b/src/lib/db.ts index 0003b98..9e917f7 100644 --- a/src/lib/db.ts +++ b/src/lib/db.ts @@ -61,8 +61,12 @@ function initDb() { const insertManyUsers = db.transaction((users) => { for (const user of users) { insertUser.run({ - ...user, + id: user.id, + name: user.name, email: `${user.id}@example.com`, // Generate mock email + role: user.role, + avatarUrl: user.avatarUrl ?? null, + bio: user.bio ?? null }); } }); diff --git a/toyshare.db b/toyshare.db new file mode 100644 index 0000000000000000000000000000000000000000..db7a7459cf0d014b0dc2333abb5541c58c2d6ed1 GIT binary patch literal 4096 zcmWFz^vNtqRY=P(%1ta$FlG>7U}9o$P*7lCU|@t|AVoG{WYBBV;st3JAlr;ljiVtj n8UmvsFd71*Aut*OqaiRF0;3@?8UmvsFd71*Aut*O6ovo*g{}s{ literal 0 HcmV?d00001 diff --git a/toyshare.db-shm b/toyshare.db-shm new file mode 100644 index 0000000000000000000000000000000000000000..f0197b0e52470cd8fcd1f581f9d1acf18b52a000 GIT binary patch literal 32768 zcmeI)Ee^s!5C+hee~GN)0-!;mFdP6^%PEjp4uVG^kX(Qx;0T9+orVw;36l1G$z;=} z+1+{dQ(Pxmq?IbqvSB~1y{LP+o}Q2M)$O#uYzEuWZaFI#<3sV|_i3vtvG3y}uh;J- zon76boz_mOc-wAzF2+wY-%O+Av2!POh#_%Mo~4% zX=}A83YQ46=8D$I&DS&rU*CS)$!&Kj3MZc&_xU%3p8hqVf6f2VzqH*{#329y2tWV= z5P$##AOHafKmY=J5O^@`>Xl{LRl8=YGX+*DGox&uiIFr7XDP{sM-r6SAu`}4_R#Vq zODD2qEFHfZPEV36bn-+aRZ@$ro=m2)B&j44PKFg#t~8sX!TP$MQ!A!!-_F^`ojYY;xP#)(QwQy- zJ(g%+LzREeZ|)Zqr`P}b&u)zRc(A^ez^`FI00Izz00bZa0SG_<0uX=z1R&6z0(_64 zxi9ehOH4fSYV)9%2eB`}6)+$G0SG_<0uX=z1Rwwb2tWV=-7LUs0NhS}!P4RN@0b6a ze}{d6Zhpz}+#mn}2tWV=5P$##AOHafKmYtD0<1H>#bpT2Y;2Wjp6AsFbXVcdft+@zZLl zJ*zL2m=SN3-nUoR&l}n-8)HUPtrDwnzgcx((5<6zj?j6WSSn59qe))3PX-!y8?=_i zXqqM?G*d74AJFnal1h>&O;D>5KqQ=rgrl@xb$`qw$>##wRo!#j+#o-f&|jdn6~X`g z1w8x>=KNn^bLHh*Z)oHU`U~v8j~yH_1Rwwb2tWV=5P$##AOHafKwuXF{I`F}*%x5b lKc(T