Compare commits

..

No commits in common. "759fb86f7634e15057eb8c6505b20b8c299bb5d6" and "a945005e762fa0ac157152db37c786f7ae3344b2" have entirely different histories.

4 changed files with 14 additions and 10 deletions

View File

@ -11,6 +11,5 @@ RUN pnpm install --frozen-lockfile
COPY . .
RUN pnpm build
RUN pnpm postbuild
CMD ["pnpm", "start"]

View File

@ -4,7 +4,9 @@ services:
container_name: bettersplit
restart: always
ports:
- "3004:3000"
- "3000:3000"
expose:
- "3000"
labels:
- "traefik.enable=true"
- "traefik.http.routers.bettersplit.rule=Host(`bettersplit.shortman.me`)"
@ -19,7 +21,7 @@ services:
restart: always
shm_size: 128mb
env_file:
- .env
- .env.production
volumes:
- pgdata:/var/lib/postgresql/data
ports:

View File

@ -5,7 +5,6 @@
"type": "module",
"scripts": {
"build": "next build",
"postbuild": "pnpm db:push",
"export": "next export",
"check": "biome check .",
"check:unsafe": "biome check --write --unsafe .",

View File

@ -8,17 +8,21 @@ 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(() => {
if (sessionUser) {
addParticipants([sessionUser]);
setPayments([{ amount: 0, userId: sessionUser.id }]);
}
addParticipants([sessionUser]);
setPayments([{ amount: 0, userId: sessionUser.id }]);
}, []);
if (!sessionUser) return <>sessino user missing</>;
const groupBadges = useExpenseStore((state) => state.groupBadges);
const addGroupBadges = useExpenseStore((state) => state.addGroupBadges);
return (
<>
<Header text="Add Expense">