Skip to content

Commit 910e331

Browse files
committed
works
1 parent 8f044e8 commit 910e331

File tree

4 files changed

+38
-199
lines changed

4 files changed

+38
-199
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Our platform revolutionizes local service booking by leveraging ICP's unique cap
3737
- **Booking System**: Seamless appointment scheduling with calendar integration
3838
- **Ratings & Reviews**: Community-driven feedback system with AI verification
3939
- **COD Payments**: Secure cash-on-delivery payment options
40-
- **Account Reputation**
40+
- **Account Reputation**: View your reputation as a user
4141

4242
---
4343

src/frontend/src/services/reputationCanisterService.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,14 @@ class ReputationCanisterService {
7575

7676
if ("ok" in result) {
7777
} else {
78-
console.error(
79-
"❌ Failed to set reputation canister references:",
80-
result.err,
81-
);
78+
// console.error(
79+
// "❌ Failed to set reputation canister references:",
80+
// result.err,
81+
// );
8282
throw new Error(`Failed to set canister references: ${result.err}`);
8383
}
8484
} catch (error) {
85-
console.error("❌ Error setting reputation canister references:", error);
85+
// console.error("❌ Error setting reputation canister references:", error);
8686
throw error;
8787
}
8888
}

src/frontend/src/utils/icpClient.ts

Lines changed: 0 additions & 192 deletions
This file was deleted.

src/frontend/vite.config.ts

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,25 @@ dotenv.config({ path: "../../.env" });
1010

1111
export default defineConfig({
1212
root: __dirname,
13+
base: "./",
1314
build: {
1415
outDir: "dist/",
1516
emptyOutDir: true,
17+
assetsDir: "assets",
18+
rollupOptions: {
19+
output: {
20+
assetFileNames: (assetInfo) => {
21+
// Keep original structure for images and fonts
22+
if (assetInfo.name?.match(/\.(png|jpe?g|svg|gif|webp)$/)) {
23+
return "images/[name][extname]";
24+
}
25+
if (assetInfo.name?.match(/\.(woff2?|eot|ttf|otf)$/)) {
26+
return "fonts/[name][extname]";
27+
}
28+
return "assets/[name]-[hash][extname]";
29+
},
30+
},
31+
},
1632
},
1733
optimizeDeps: {
1834
esbuildOptions: {
@@ -27,9 +43,24 @@ export default defineConfig({
2743
"/api": {
2844
target: "http://127.0.0.1:4943",
2945
changeOrigin: true,
46+
configure: (proxy) => {
47+
proxy.on("error", (err) => {
48+
console.log("proxy error", err);
49+
});
50+
proxy.on("proxyReq", (_proxyReq, req) => {
51+
console.log("Sending Request to the Target:", req.method, req.url);
52+
});
53+
proxy.on("proxyRes", (proxyRes, req) => {
54+
console.log(
55+
"Received Response from the Target:",
56+
proxyRes.statusCode,
57+
req.url,
58+
);
59+
});
60+
},
3061
},
3162
},
32-
allowedHosts: [],
63+
allowedHosts: true,
3364
},
3465
plugins: [
3566
react(),

0 commit comments

Comments
 (0)