BILAHUJAN uses government organization logos in:
- ReportScreen → Department selector buttons (JPS, NADMA, APM)
- Government Dashboard → Header branding & authority icons
- Data Export → Report headers for official submissions
src/
assets/
logos/
jps.svg (Department of Irrigation & Drainage)
nadma.svg (National Disaster Management Agency)
apm.svg (Malaysia Civil Defence Force)
jps.png (fallback PNG version)
nadma.png (fallback PNG version)
apm.png (fallback PNG version)
Use these authoritative sources:
| Agency | Logo URL | Format |
|---|---|---|
| JPS | Wikimedia Commons | SVG or PNG |
| NADMA | Wikimedia Commons | SVG or PNG |
| APM (Civil Defence) | Wikimedia Commons | SVG or PNG |
Move downloaded files to:
src/assets/logos/
├── jps.svg
├── nadma.svg
└── apm.svg
The logos are currently used from URLs. To enable local logos, update line ~10:
// Current (URL-based):
import { officialLogos } from '../data/officialLogos';
// To use local files, add imports:
import jpsLogo from '../assets/logos/jps.svg';
import nadmaLogo from '../assets/logos/nadma.svg';
import apmLogo from '../assets/logos/apm.svg';Then in the selectedDepts render section (line ~550):
// Change from:
<img
src={officialLogos[dept].logo} // URL-based
alt={selectedDepts[dept].name}
/>
// To:
<img
src={dept === 'JPS' ? jpsLogo : dept === 'NADMA' ? nadmaLogo : apmLogo}
alt={dept}
/>File: src/data/officialLogos.ts
export const officialLogos = {
JPS: {
name: 'Department of Irrigation & Drainage',
logo: 'https://upload.wikimedia.org/wikipedia/commons/1/1a/...',
contact: '+60 3 2619-0000'
},
NADMA: {
name: 'National Disaster Management Agency',
logo: 'https://upload.wikimedia.org/wikipedia/commons/5/52/...',
contact: '+60 3 8064-2400'
},
APM: {
name: 'Malaysia Civil Defence Force',
logo: 'https://upload.wikimedia.org/wikipedia/commons/7/7b/...',
contact: '+60 3 2715-3000'
}
};{['JPS', 'NADMA', 'APM'].map(dept => (
<button
key={dept}
className={`flex items-center gap-2 px-4 py-3 rounded-lg border-2 transition-all ${
selectedDepts.includes(dept)
? 'border-[#ec5b13] bg-orange-50'
: 'border-slate-200 hover:border-[#ec5b13]'
}`}
onClick={() => toggleDept(dept)}
>
<img
src={officialLogos[dept].logo}
alt={dept}
className="w-6 h-6 object-contain"
/>
<span className="font-bold text-sm">{dept}</span>
</button>
))}<div className="flex items-center gap-2 mb-3">
<span className="text-blue-300 font-bold">JPS • NADMA • APM</span>
</div>- Start dev server:
npm run dev-
Navigate to ReportScreen (Camera tab → "Report a Flood")
-
Scroll to "Notify Authority" section
-
Verify logos appear for JPS, NADMA, APM buttons
-
Check Government Dashboard (Dashboard tab)
- Logos should appear in authority header
- SVG: < 50 KB per logo
- PNG: < 200 KB per logo (use 256x256 px)
If using PNGs, optimize with:
npx imagemin src/assets/logos/*.png --out-dir=src/assets/logosIf logos fail to load:
<img
src={officialLogo}
alt="Government Agency"
onError={(e) => {
e.currentTarget.src = 'data:image/svg+xml,...'; // fallback SVG
}}
/>import nadmaLogo from '../assets/logos/nadma.svg'; import apmLogo from '../assets/logos/apm.svg';
**Update the logo references** (around line 605-635):
```typescript
// Change from:
logo: 'https://upload.wikimedia.org/wikipedia/...'
// To:
logo: jpsLogo // for JPS
logo: nadmaLogo // for NADMA
logo: apmLogo // for APM
If you prefer automated download, run:
node src/download_logos.cjsThis will download and convert logos to base64, but you'll need to update the output path in the script.
The app supports:
- SVG (Recommended) - Scalable, small file size
- PNG - Good quality, transparent background
- JPG - Larger file size, no transparency
After adding your images:
✅ c:\Users\USER\Downloads\BILAHUJAN\src\assets\logos\jps.svg
✅ c:\Users\USER\Downloads\BILAHUJAN\src\assets\logos\nadma.svg
✅ c:\Users\USER\Downloads\BILAHUJAN\src\assets\logos\apm.svg
After adding images:
- Save the files in the logos folder
- Uncomment the imports in ReportScreen.tsx
- Update the logo properties to use imported variables
- Run:
npm run dev - Navigate to the Report screen
- You should see the logos displayed!
Import errors?
- Make sure file extensions match (.svg, .png, etc.)
- Check file names are lowercase
- Verify files are in the correct folder
Images not showing?
- Check browser console for errors
- Verify import paths are correct
- Make sure Vite can handle the image format
Want to use PNG instead of SVG? Just change the import extension:
import jpsLogo from '../assets/logos/jps.png';If you prefer to use the public folder:
- Create
public/logos/folder - Place images there
- Use in code as:
logo: '/logos/jps.svg'This method doesn't require imports but images won't be optimized by Vite.
Current Status: ✅ Folder created, code updated with comments
Next Step: Add your logo image files to src/assets/logos/