From 82498855f19bc871feab2bfdf2a8e197b27fd660 Mon Sep 17 00:00:00 2001 From: ayush00git Date: Sat, 15 Aug 2026 14:58:32 +0530 Subject: [PATCH 1/3] fix(build): frontend build crashes cuz null val of profile --- app/src/pages/profile/Profile.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/src/pages/profile/Profile.tsx b/app/src/pages/profile/Profile.tsx index 993a1f6..236095c 100644 --- a/app/src/pages/profile/Profile.tsx +++ b/app/src/pages/profile/Profile.tsx @@ -200,14 +200,14 @@ export function Profile() { function openProfileEdit() { setProfileForm({ - name: profile.name ?? '', - phone_number: profile.phone_number ?? '', - building: profile.building ?? '', - hostel: profile.hostel ?? '', - department: profile.department ?? '', - house_number: profile.house_number ?? '', - block: profile.block ?? '', - type: profile.type ?? '', + name: profile?.name ?? '', + phone_number: profile?.phone_number ?? '', + building: profile?.building ?? '', + hostel: profile?.hostel ?? '', + department: profile?.department ?? '', + house_number: profile?.house_number ?? '', + block: profile?.block ?? '', + type: profile?.type ?? '', }); setProfileError(null); setIsEditingProfile(true); From 35b39efcc2f72629b2b49becd1f5dd4b5dd28489 Mon Sep 17 00:00:00 2001 From: ayush00git Date: Sat, 15 Aug 2026 14:59:07 +0530 Subject: [PATCH 2/3] feat(ci): add frontend/backend ci build checks --- .github/workflows/deploy.yml | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a4dfd73..267fbe7 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -30,9 +30,41 @@ jobs: - name: Run tests run: go test ./test/... -v -count=1 + build: + name: Build check + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version-file: go.mod + cache: true + + - name: Build backend + run: go build ./... + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 24 + cache: npm + cache-dependency-path: app/package-lock.json + + - name: Install frontend dependencies + working-directory: app + run: npm ci + + - name: Build frontend + working-directory: app + run: npm run build + deploy-backend: name: Deploy backend - needs: test + needs: [test, build] if: github.event_name == 'push' && github.ref == 'refs/heads/main' runs-on: ubuntu-latest @@ -89,7 +121,7 @@ jobs: deploy-frontend: name: Deploy frontend - needs: test + needs: [test, build] if: github.event_name == 'push' && github.ref == 'refs/heads/main' runs-on: ubuntu-latest From 35bf7cf64bb7b2373e905335a0b96ed596097549 Mon Sep 17 00:00:00 2001 From: ayush00git Date: Sat, 15 Aug 2026 15:15:38 +0530 Subject: [PATCH 3/3] revert --- .github/workflows/deploy.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 267fbe7..207fa6d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -183,4 +183,5 @@ jobs: echo "Reloading Nginx..." sudo -n /usr/bin/systemctl reload nginx - echo "Frontend deployed successfully." \ No newline at end of file + echo "Frontend deployed successfully." + \ No newline at end of file