test add page error fix
This commit is contained in:
parent
a945005e76
commit
4a862ec06a
@ -11,5 +11,6 @@ RUN pnpm install --frozen-lockfile
|
||||
COPY . .
|
||||
|
||||
RUN pnpm build
|
||||
RUN pnpm postbuild
|
||||
|
||||
CMD ["pnpm", "start"]
|
||||
|
||||
@ -4,9 +4,7 @@ services:
|
||||
container_name: bettersplit
|
||||
restart: always
|
||||
ports:
|
||||
- "3000:3000"
|
||||
expose:
|
||||
- "3000"
|
||||
- "3004:3000"
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.bettersplit.rule=Host(`bettersplit.shortman.me`)"
|
||||
@ -21,7 +19,7 @@ services:
|
||||
restart: always
|
||||
shm_size: 128mb
|
||||
env_file:
|
||||
- .env.production
|
||||
- .env
|
||||
volumes:
|
||||
- pgdata:/var/lib/postgresql/data
|
||||
ports:
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "next build",
|
||||
"postbuild": "pnpm db:push",
|
||||
"export": "next export",
|
||||
"check": "biome check .",
|
||||
"check:unsafe": "biome check --write --unsafe .",
|
||||
|
||||
@ -8,21 +8,17 @@ import { useExpenseStore } from "@/lib/store/expense-store";
|
||||
import ExpenseSplit from "./expense-split";
|
||||
import ExpenseParticipants from "./expense-participants";
|
||||
import { Separator } from "@/components/ui/separator";
|
||||
import { useSearchParams } from "next/navigation";
|
||||
import { api } from "@/trpc/react";
|
||||
|
||||
function ExpensePage({ sessionUser }: { sessionUser: User }) {
|
||||
function ExpensePage({ sessionUser }: { sessionUser?: User }) {
|
||||
const addParticipants = useExpenseStore((state) => state.addParticipants);
|
||||
const setPayments = useExpenseStore((state) => state.setPayments);
|
||||
React.useEffect(() => {
|
||||
addParticipants([sessionUser]);
|
||||
setPayments([{ amount: 0, userId: sessionUser.id }]);
|
||||
if (sessionUser) {
|
||||
addParticipants([sessionUser]);
|
||||
setPayments([{ amount: 0, userId: sessionUser.id }]);
|
||||
}
|
||||
}, []);
|
||||
|
||||
const groupBadges = useExpenseStore((state) => state.groupBadges);
|
||||
const addGroupBadges = useExpenseStore((state) => state.addGroupBadges);
|
||||
|
||||
|
||||
if (!sessionUser) return <>sessino user missing</>;
|
||||
return (
|
||||
<>
|
||||
<Header text="Add Expense">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user