Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM node:lts-bookworm

WORKDIR /app
COPY package.json ./
COPY yarn.lock ./

RUN yarn install --prod

COPY . ./

# RUN yarn build,

CMD ["yarn", "dev"]
3 changes: 1 addition & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ services:
mongo:
image: mongo:4.4
ports:
- "127.0.0.1:27017:27017"

- "127.0.0.1:27017:27017"
6 changes: 3 additions & 3 deletions src/app/calculator/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";
import { ObjectId } from "mongodb";
import "./page.css";
import { redirect } from "next/navigation";
// import { redirect } from "next/navigation";
import UserVer from "@/components/UserVer";

import NavBar from "../../components/Header";
Expand All @@ -14,7 +14,7 @@ type userProps = {
auth: boolean;
};

export default function stats() {
export default function Stats() {
const [selectedUsers, setSelectedUsers] = useState<userProps[]>([]);

const addUserToList = async (e: any) => {
Expand All @@ -37,7 +37,7 @@ export default function stats() {
setSelectedUsers([
...selectedUsers,
{
id: "-1",
id: new ObjectId(-1),
userName: userName,
auth: false,
},
Expand Down
5 changes: 3 additions & 2 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
'use client';

import "./page.css"
import "./Page.css"
import { redirect } from 'next/navigation'

import NavBar from '../components/Header'
import Modal from "../components/Modal"

import { useEffect, useState } from 'react';
import { PizzaType } from "./types";

export default function Home() {

Expand All @@ -25,7 +26,7 @@ export default function Home() {
SelectedPizzaId("-1")
}

const [pizzas, setPizzas] = useState([])
const [pizzas, setPizzas] = useState<PizzaType[]>([])
useEffect( () => {
const fetchPizzas = async () => {
const response = await fetch("http://localhost:3000/api/pizza")
Expand Down