Skip to content

Commit ed5d1e8

Browse files
committed
Fix favicon, logo, and product display issues for both localhost and GitHub Pages
1 parent af7cc70 commit ed5d1e8

6 files changed

Lines changed: 8 additions & 5 deletions

File tree

frontend/public/favicon.ico

70.6 KB
Binary file not shown.

frontend/public/logo192.png

69.2 KB
Loading

frontend/public/logo512.png

65 KB
Loading

frontend/public/manifest.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"short_name": "React App",
3-
"name": "Create React App Sample",
2+
"short_name": "MoreByPrinal",
3+
"name": "MoreByPrinal - Where Elegance Meets Tradition",
44
"icons": [
55
{
66
"src": "favicon.ico",
@@ -20,6 +20,6 @@
2020
],
2121
"start_url": ".",
2222
"display": "standalone",
23-
"theme_color": "#000000",
23+
"theme_color": "#008B8B",
2424
"background_color": "#ffffff"
2525
}

frontend/src/App.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,11 @@ import Terms from './pages/Terms';
2121
const AppContent = () => {
2222
const { toasts, removeToast } = useToast();
2323

24+
// Determine basename based on environment
25+
const basename = process.env.NODE_ENV === 'production' ? '/morebyprinal' : '/morebyprinal';
26+
2427
return (
25-
<Router basename="/morebyprinal">
28+
<Router basename={basename}>
2629
<div className="min-h-screen bg-light-cream">
2730
<Header />
2831
<main className="pt-20">

frontend/src/components/product/ProductCard.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const ProductCard = ({ product }) => {
1717
<div className="relative w-full h-80 overflow-hidden">
1818
{/* Main Image */}
1919
<img
20-
src={product.images[0] || '/images/placeholder-product.jpg'}
20+
src={product.images[0] || './images/placeholder-product.jpg'}
2121
alt={product.name}
2222
className={`w-full h-80 object-cover transition-all duration-700 transform group-hover:scale-110 ${
2323
isHovered && product.images[1] ? 'opacity-0' : 'opacity-100'

0 commit comments

Comments
 (0)