Skip to content

Commit e845d35

Browse files
Merge pull request #39 from StabilityNexus/sarthak
Image path fixed
2 parents bba9879 + 8cc7dfa commit e845d35

6 files changed

Lines changed: 8 additions & 12 deletions

File tree

app/[hackathon]/InteractionClient.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, D
1414

1515
// Helper function to get the correct image path for GitHub Pages
1616
const getImagePath = (path: string) => {
17-
const basePath = process.env.NODE_ENV === 'production' ? '/HackHub-WebUI' : '';
18-
return `${basePath}${path}`;
17+
// Let Next.js handle the basePath automatically through the configuration
18+
return path;
1919
};
2020

2121
import { HackathonData, getHackathonStatus, getDaysRemaining, Judge, Project } from "@/hooks/useHackathons"

app/createHackathon/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ import {
2323

2424
// Helper function to get the correct image path for GitHub Pages
2525
const getImagePath = (path: string) => {
26-
const basePath = process.env.NODE_ENV === 'production' ? '/HackHub-WebUI' : '';
27-
return `${basePath}${path}`;
26+
// Let Next.js handle the basePath automatically through the configuration
27+
return path;
2828
};
2929

3030
interface Judge {

app/explorer/page.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@
77

88
// Helper function to get the correct image path for GitHub Pages
99
const getImagePath = (path: string) => {
10-
const basePath = process.env.NODE_ENV === 'production' ? '/HackHub-WebUI' : '';
11-
return `${basePath}${path}`;
10+
return path;
1211
};
1312
import { HackathonData, getHackathonStatus } from "@/hooks/useHackathons"
1413
import { getPublicClient } from "@wagmi/core"

app/organizer/OrganizerClient.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ import { Card, CardContent } from "@/components/ui/card"
88

99
// Helper function to get the correct image path for GitHub Pages
1010
const getImagePath = (path: string) => {
11-
const basePath = process.env.NODE_ENV === 'production' ? '/HackHub-WebUI' : '';
12-
return `${basePath}${path}`;
11+
return path;
1312
};
1413
import { HackathonData, getHackathonStatus, getDaysRemaining } from "@/hooks/useHackathons"
1514
import { getPublicClient } from "@wagmi/core"

app/page.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ import {
2626

2727
// Helper function to get the correct image path for GitHub Pages
2828
const getImagePath = (path: string) => {
29-
const basePath = process.env.NODE_ENV === 'production' ? '/HackHub-WebUI' : '';
30-
return `${basePath}${path}`;
29+
return path;
3130
};
3231

3332
export default function HomePage() {

app/projects/ProjectsClient.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, D
1414

1515
// Helper function to get the correct image path for GitHub Pages
1616
const getImagePath = (path: string) => {
17-
const basePath = process.env.NODE_ENV === 'production' ? '/HackHub-WebUI' : '';
18-
return `${basePath}${path}`;
17+
return path;
1918
};
2019

2120
import { HackathonData, getHackathonStatus, getDaysRemaining, Judge, Project } from "@/hooks/useHackathons"

0 commit comments

Comments
 (0)