Skip to content

Commit

Permalink
Fixed toggle button, Fixed build
Browse files Browse the repository at this point in the history
  • Loading branch information
SujithThirumalaisamy committed Jun 20, 2024
1 parent f21b009 commit 395da14
Show file tree
Hide file tree
Showing 9 changed files with 549 additions and 21 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ WORKDIR /usr/src/app
COPY . .

# Install dependencies
RUN yarn install
RUN pnpm install

# Generate Prisma client
RUN cd packages/db && npx prisma generate
RUN cd packages/db && pnpm dlx prisma generate

# Expose ports for both applications
EXPOSE 3000

WORKDIR /usr/src/app

# Command to start both services
CMD ["yarn", "run", "dev:docker"]
CMD ["pnpm", "run", "dev:docker"]
3 changes: 2 additions & 1 deletion apps/boilerplate-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"license": "ISC",
"dependencies": {
"@types/node": "^20.12.12",
"antlr4": "^4.13.1-patch-1"
"antlr4": "^4.13.1-patch-1",
"esbuild": "^0.21.5"
}
}
4 changes: 2 additions & 2 deletions apps/web/components/ModeToggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ import {
} from "../../../packages/ui/src/@/components/ui/dropdown-menu"

export function ModeToggle() {
const { resolvedTheme,setTheme } = useTheme()
const { resolvedTheme, setTheme } = useTheme()
return (
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button style={{color:resolvedTheme=='dark'?'white':'black'}} variant="outline" size="icon">
<Button style={{ color: resolvedTheme == 'dark' ? 'black' : 'white' }} >
<Sun className="h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" />
<Moon className="absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" />
<span className="sr-only">Toggle theme</span>
Expand Down
4 changes: 2 additions & 2 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@
"dependencies": {
"@marsidev/react-turnstile": "^0.7.1",
"@monaco-editor/react": "^4.6.0",
"@radix-ui/react-avatar": "^1.0.4",
"@radix-ui/react-slot": "^1.0.2",
"@repo/ui": "workspace:*",
"@repo/common": "workspace:*",
"@repo/ui": "workspace:*",
"@types/bcrypt": "^5.0.2",
"axios": "^1.7.2",
"bcrypt": "^5.1.1",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"ioredis": "^5.4.1",
"jose": "^5.4.1",
"lucide-react": "^0.383.0",
"next": "^14.1.1",
"next-auth": "^4.24.7",
Expand Down
6 changes: 3 additions & 3 deletions docker/problems/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ WORKDIR /usr/src/app
COPY ./apps/problems /usr/src/app/apps/problems

# Install dependencies
RUN npm install
RUN pnpm install

# Generate Prisma client
RUN cd packages/db && npx prisma generate
RUN cd packages/db && pnpm dlx prisma generate

# Expose ports for both applications
EXPOSE 3000
EXPOSE 3000
8 changes: 4 additions & 4 deletions docker/sweeper/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ COPY turbo.json /usr/src/app/
COPY tsconfig.json /usr/src/app/

# Install dependencies
RUN npm install
RUN pnpm install

# Generate Prisma client
RUN cd packages/db && DATABASE_URL=$DATABASE_URL npx prisma generate
RUN cd packages/db && DATABASE_URL=$DATABASE_URL pnpm dlx prisma generate

WORKDIR /usr/src/app

# Command to start both services
RUN npm run build --prefix apps/sweeper
CMD ["npm", "run", "start:sweeper"]
RUN pnpm run build --prefix apps/sweeper
CMD ["pnpm", "run", "start:sweeper"]
8 changes: 4 additions & 4 deletions docker/web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ COPY turbo.json /usr/src/app/
COPY tsconfig.json /usr/src/app/

# Install dependencies
RUN npm install
RUN pnpm install

# Generate Prisma client
RUN cd packages/db && DATABASE_URL=$DATABASE_URL npx prisma generate
RUN cd packages/db && DATABASE_URL=$DATABASE_URL pnpm dlx prisma generate

# Expose ports for both applications
EXPOSE 3000

WORKDIR /usr/src/app

# Command to start both services
RUN npm run build --prefix apps/web
CMD ["npm", "run", "start:web"]
RUN pnpm run build --prefix apps/web
CMD ["pnpm", "run", "start:web"]
9 changes: 8 additions & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,16 @@
"typescript": "^5.3.3"
},
"dependencies": {
"@radix-ui/react-avatar": "^1.1.0",
"@radix-ui/react-dropdown-menu": "^2.0.6",
"@radix-ui/react-label": "^2.0.2",
"@radix-ui/react-select": "^2.0.0",
"@radix-ui/react-tabs": "^1.0.4"
"@radix-ui/react-slot": "^1.0.2",
"@radix-ui/react-tabs": "^1.0.4",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"lucide-react": "^0.383.0",
"shadcn-ui": "^0.8.0",
"tailwind-merge": "^2.3.0"
}
}
Loading

0 comments on commit 395da14

Please sign in to comment.