Skip to content
This repository was archived by the owner on Dec 13, 2024. It is now read-only.

Commit fce4ce8

Browse files
committed
fix baseUrl Problem
1 parent 39f1f43 commit fce4ce8

File tree

13 files changed

+37
-38
lines changed

13 files changed

+37
-38
lines changed

next.config.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ const nextConfig = {
88
},
99
trailingSlash: true,
1010
reactStrictMode: true,
11-
basePath: isProd ? '/sky24' : '',
12-
assetPrefix: isProd ? '/sky24' : '',
11+
basePath: '/sky24',
1312
};
1413

1514
module.exports = nextConfig;

public/teams.json

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@
4646
"ticContactNumber": "0761364398"
4747
},
4848
"selectedCenter": "matara",
49-
"selected": null,
50-
"final": null,
49+
"selected": true,
50+
"final": 1,
5151
"firstCheck": true,
5252
"finalround": null,
5353
"id": "School-1-Team B"
@@ -99,8 +99,8 @@
9999
"ticContactNumber": "0752534623"
100100
},
101101
"selectedCenter": "kandy",
102-
"selected": null,
103-
"final": null,
102+
"selected": true,
103+
"final": 2,
104104
"firstCheck": true,
105105
"finalround": null,
106106
"id": "School-2-Team A"
@@ -152,8 +152,8 @@
152152
"ticContactNumber": "0749793263"
153153
},
154154
"selectedCenter": "matara",
155-
"selected": null,
156-
"final": null,
155+
"selected": true,
156+
"final": 3,
157157
"firstCheck": true,
158158
"finalround": null,
159159
"id": "School-3-Team B"
@@ -205,8 +205,8 @@
205205
"ticContactNumber": "0781474772"
206206
},
207207
"selectedCenter": "anuradhapura",
208-
"selected": null,
209-
"final": null,
208+
"selected": true,
209+
"final": 4,
210210
"firstCheck": true,
211211
"finalround": null,
212212
"id": "School-4-Team B"
@@ -258,8 +258,8 @@
258258
"ticContactNumber": "0792992843"
259259
},
260260
"selectedCenter": "matara",
261-
"selected": null,
262-
"final": null,
261+
"selected": true,
262+
"final": 5,
263263
"firstCheck": true,
264264
"finalround": null,
265265
"id": "School-5-Team C"
@@ -311,8 +311,8 @@
311311
"ticContactNumber": "0725824208"
312312
},
313313
"selectedCenter": "colombo",
314-
"selected": null,
315-
"final": null,
314+
"selected": true,
315+
"final": 6,
316316
"firstCheck": true,
317317
"finalround": null,
318318
"id": "School-6-Team B"
@@ -364,8 +364,8 @@
364364
"ticContactNumber": "0733967067"
365365
},
366366
"selectedCenter": "kandy",
367-
"selected": null,
368-
"final": null,
367+
"selected": true,
368+
"final": 7,
369369
"firstCheck": true,
370370
"finalround": null,
371371
"id": "School-7-Team B"
@@ -417,8 +417,8 @@
417417
"ticContactNumber": "0716881117"
418418
},
419419
"selectedCenter": "matara",
420-
"selected": null,
421-
"final": null,
420+
"selected": true,
421+
"final": 8,
422422
"firstCheck": true,
423423
"finalround": null,
424424
"id": "School-8-Team B"
@@ -470,8 +470,8 @@
470470
"ticContactNumber": "0737902308"
471471
},
472472
"selectedCenter": "matara",
473-
"selected": null,
474-
"final": null,
473+
"selected": true,
474+
"final": 9,
475475
"firstCheck": true,
476476
"finalround": null,
477477
"id": "School-9-Team A"
@@ -523,8 +523,8 @@
523523
"ticContactNumber": "0794822014"
524524
},
525525
"selectedCenter": "kandy",
526-
"selected": null,
527-
"final": null,
526+
"selected": true,
527+
"final": 10,
528528
"firstCheck": true,
529529
"finalround": null,
530530
"id": "School-10-Team C"
@@ -576,7 +576,7 @@
576576
"ticContactNumber": "0720983683"
577577
},
578578
"selectedCenter": "matara",
579-
"selected": null,
579+
"selected": true,
580580
"final": null,
581581
"firstCheck": true,
582582
"finalround": null,

src/components/Check/FirstRound.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default function FirstRound({ examCenter }) {
3131
useEffect(() => {
3232
const fetchDataFromJson = async () => {
3333
try {
34-
const response = await fetch("/teams.json");
34+
const response = await fetch("/sky24/teams.json");
3535
const jsonData = await response.json();
3636
const teams = Object.values(jsonData); // Convert the object to an array
3737
const numTeamsInCenter = teams.filter(

src/components/round/FinalRound.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default function FinalRound({ finalTeams, otherTeams }) {
1010
e.preventDefault();
1111

1212
try {
13-
const response = await fetch("/path/to/teams.json");
13+
const response = await fetch("/sky24/teams.json");
1414
const teams = await response.json();
1515

1616
const team = teams.find(

src/components/round/FirstRound.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default function FirstRound({ teams }) {
1010
e.preventDefault();
1111

1212
try {
13-
const response = await fetch("/path/to/teams.json");
13+
const response = await fetch("/sky24/teams.json");
1414
const teams = await response.json();
1515

1616
const team = teams.find(

src/components/wtfadmin/admin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export default function Admin() {
4444
useEffect(() => {
4545
const fetchDataFromJson = async () => {
4646
try {
47-
const response = await fetch("/teams.json");
47+
const response = await fetch("/sky24/teams.json");
4848
const jsonData = await response.json();
4949
const teams = Object.values(jsonData); // Convert the object to an array
5050
const numTeams = teams.length;

src/components/wtfadmin/viewer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export default function Viewer() {
3333
useEffect(() => {
3434
const fetchDataFromJson = async () => {
3535
try {
36-
const response = await fetch("/teams.json");
36+
const response = await fetch("/sky24/teams.json");
3737
const jsonData = await response.json();
3838
const teams = Object.values(jsonData); // Convert the object to an array
3939
const numTeams = teams.length;

src/pages/404.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default function Custom404() {
1515
setLoading(false);
1616
}, 800);
1717
setTimeout(() => {
18-
window.location.replace("/");
18+
window.location.replace("/sky24/");
1919
}, 4000);
2020
}, []);
2121

src/pages/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ function Section3() {
171171
>
172172
<img
173173
className={styles.simg}
174-
src="/assets/sicons/facebook.webp"
174+
src="/sky24/assets/sicons/facebook.webp"
175175
width={100}
176176
height={100}
177177
alt="Facebook"
@@ -184,7 +184,7 @@ function Section3() {
184184
>
185185
<img
186186
className={styles.simg}
187-
src="/assets/sicons/instgram.webp"
187+
src="/sky24/assets/sicons/instgram.webp"
188188
width={100}
189189
height={100}
190190
alt="Instagram"
@@ -197,7 +197,7 @@ function Section3() {
197197
>
198198
<img
199199
className={styles.simg}
200-
src="/assets/sicons/youtube.webp"
200+
src="/sky24/assets/sicons/youtube.webp"
201201
width={100}
202202
height={100}
203203
alt="Youtube"

src/pages/round/[id].js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default function Round() {
1919
useEffect(() => {
2020
const fetchData = async () => {
2121
try {
22-
const response = await fetch("/teams.json");
22+
const response = await fetch("/sky24/teams.json");
2323
const jsonData = await response.json();
2424
if (id === "firstRound") {
2525
const selectedTeams = jsonData.filter((team) => team.selected === true);

0 commit comments

Comments
 (0)