Skip to content

Commit 9250e31

Browse files
committed
fix: resolve Toolbar import issue
1 parent 316cf52 commit 9250e31

File tree

5 files changed

+10
-6
lines changed

5 files changed

+10
-6
lines changed

.github/workflows/cd_frontend.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
file: ./docker/Dockerfile.frontend
2323
build-args: |
2424
DATABASE_URL=${{ secrets.DATABASE_URL }}
25+
JWT_SECRET=${{ secrets.JWT_SECRET }}
2526
push: true
2627
tags: coderomm/collabydraw:${{ github.sha }}
2728
## Step to deploy this to a VM
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ interface ToolbarProps {
88
onToolSelect: (tool: ToolType) => void
99
}
1010

11-
export default function Toolbar({ selectedTool, onToolSelect }: ToolbarProps) {
11+
export default function Toolsbar({ selectedTool, onToolSelect }: ToolbarProps) {
1212
return (
1313
<TooltipProvider delayDuration={0}>
1414
<header className="Tool_Bar flex items-center gap-1 p-1.5 rounded-lg Island">

apps/collabydraw/components/canvas/CanvasSheet.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ import { MainMenuStack } from "../MainMenuStack";
1010
import { ToolMenuStack } from "../ToolMenuStack";
1111
import SidebarTriggerButton from "../SidebarTriggerButton";
1212
import { useMediaQuery } from "@/hooks/useMediaQuery";
13-
import Toolbar from "../Toolbar";
1413
import ScreenLoading from "../ScreenLoading";
1514
import CollaborationStart from "../CollaborationStartBtn";
1615
import { useWebSocket } from "@/hooks/useWebSocket";
1716
import { WsDataType } from "@repo/common/types";
1817
import { useRouter } from "next/navigation";
1918
import { cn } from "@/lib/utils";
19+
import Toolsbar from "../Toolsbar";
2020

2121
export default function CanvasSheet({ roomName, roomId, userId, userName, token }: {
2222
roomName: string; roomId: string; userId: string; userName: string; token: string;
@@ -259,7 +259,7 @@ export default function CanvasSheet({ roomName, roomId, userId, userName, token
259259

260260
</div>
261261
)}
262-
<Toolbar
262+
<Toolsbar
263263
selectedTool={canvasState.activeTool}
264264
onToolSelect={(newTool: SetStateAction<ToolType>) =>
265265
setCanvasState(prev => ({ ...prev, activeTool: typeof newTool === 'function' ? newTool(prev.activeTool) : newTool }))

apps/collabydraw/components/canvas/StandaloneCanvas.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { Game } from "@/draw/Game";
44
import { BgFill, canvasBgLight, LOCALSTORAGE_CANVAS_KEY, Shape, StrokeEdge, StrokeFill, StrokeStyle, StrokeWidth, ToolType } from "@/types/canvas";
55
import { useCallback, useEffect, useRef, useState } from "react";
66
import { Scale } from "../Scale";
7-
import Toolbar from "../Toolbar";
87
import { MobileNavbar } from "../mobile-navbar";
98
import { useTheme } from "next-themes";
109
import { MainMenuStack } from "../MainMenuStack";
@@ -17,6 +16,7 @@ import CollaborationStart from "../CollaborationStartBtn";
1716
import { cn } from "@/lib/utils";
1817
import UserRoomsList from "../UserRoomsList";
1918
import { useSession } from "next-auth/react";
19+
import Toolsbar from "../Toolsbar";
2020

2121
export function StandaloneCanvas() {
2222
const { theme } = useTheme()
@@ -343,7 +343,7 @@ export function StandaloneCanvas() {
343343
</div>
344344
)}
345345

346-
<Toolbar
346+
<Toolsbar
347347
selectedTool={activeTool}
348348
onToolSelect={handleToolSelect}
349349
/>

docker/Dockerfile.frontend

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ WORKDIR /usr/src/app
77

88
# Add ARG for DATABASE_URL
99
ARG DATABASE_URL
10+
ARG JWT_SECRET
1011
# ENV DATABASE_URL=${DATABASE_URL}
1112

1213
# Copy necessary files for dependency installation
@@ -34,7 +35,9 @@ RUN prisma generate
3435
WORKDIR /usr/src/app
3536

3637
# Build the application with database URL
37-
RUN DATABASE_URL=${DATABASE_URL} pnpm run build
38+
ENV DATABASE_URL=${DATABASE_URL}
39+
ENV JWT_SECRET=${JWT_SECRET}
40+
RUN pnpm run build
3841

3942
# Expose the port
4043
EXPOSE 3000

0 commit comments

Comments
 (0)