ExcellentSportCentreindex.ts2 matches
18});
1920// API route for contact form (placeholder)
21app.post("/api/contact", async c => {
22const body = await c.req.json();
23
2728try {
29const response = await fetch('/api/contact', {
30method: 'POST',
31headers: {
CrimeMapCrimeMap.tsx8 matches
17export default function CrimeMap({ reports, selectedLocation, onLocationSelect }: CrimeMapProps) {
18const mapRef = useRef<HTMLDivElement>(null);
19const mapInstanceRef = useRef<any>(null);
20const markersRef = useRef<any[]>([]);
21const selectedMarkerRef = useRef<any>(null);
52});
5354mapInstanceRef.current = map;
5556return () => {
61// Update crime report markers
62useEffect(() => {
63if (!mapInstanceRef.current) return;
6465// Clear existing markers
66markersRef.current.forEach(marker => {
67mapInstanceRef.current.removeLayer(marker);
68});
69markersRef.current = [];
80const marker = window.L.marker([report.latitude, report.longitude], {
81icon: crimeIcon,
82}).addTo(mapInstanceRef.current);
8384// Add popup with crime details
102// Update selected location marker
103useEffect(() => {
104if (!mapInstanceRef.current) return;
105106// Remove existing selected marker
107if (selectedMarkerRef.current) {
108mapInstanceRef.current.removeLayer(selectedMarkerRef.current);
109selectedMarkerRef.current = null;
110}
121selectedMarkerRef.current = window.L.marker([selectedLocation.lat, selectedLocation.lng], {
122icon: selectedIcon,
123}).addTo(mapInstanceRef.current);
124125selectedMarkerRef.current.bindPopup("Selected location for crime report").openPopup();
15await runMigrations();
1617// API routes
18app.route("/api/transactions", transactions);
19app.route("/api/analytics", analytics);
2021// Serve static files
30const dataScript = `<script>
31window.__INITIAL_DATA__ = {
32apiBase: '/api',
33appName: 'Finance Manager'
34};
15โ โ โโโ queries.ts # Database query functions
16โ โโโ routes/
17โ โ โโโ habits.ts # Habit-related API routes
18โ โโโ index.ts # Main Hono server entry point
19โโโ frontend/
40## Tech Stack
4142- **Backend**: Hono (TypeScript API framework)
43- **Database**: SQLite
44- **Frontend**: React with TypeScript
F_managerTransactionList.tsx1 match
6061try {
62const response = await fetch(`/api/transactions/${id}`, {
63method: 'DELETE',
64});
F_managerTransactionForm.tsx2 matches
5556const url = editTransaction
57? `/api/transactions/${editTransaction.id}`
58: '/api/transactions';
59
60const method = editTransaction ? 'PUT' : 'POST';
WorkOutTrackingAppREADME.md1 match
20โ โโโ routes/
21โ โ โโโ workouts.ts # Workout CRUD operations
22โ โ โโโ quotes.ts # Motivational quotes API
23โ โโโ index.ts # Main Hono server
24โโโ frontend/
18const fetchTransactions = async () => {
19try {
20const response = await fetch('/api/transactions');
21const result = await response.json();
22
35const fetchAnalytics = async () => {
36try {
37const response = await fetch('/api/analytics/dashboard');
38const result = await response.json();
39