This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // src/MainApp.js | |
| import React, { useState, useEffect, useRef, useMemo } from "react"; | |
| import { useLocation } from "react-router-dom"; | |
| import L from "leaflet"; | |
| import "leaflet.heat"; | |
| import { MapContainer, TileLayer, Circle, useMap, GeoJSON } from "react-leaflet"; | |
| import { io } from "socket.io-client"; | |
| import { supabase } from "./supabaseClient"; | |
| import "leaflet/dist/leaflet.css"; | |
| import "./App.css"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // src/MainApp.js | |
| import React, { useState, useEffect, useRef, useMemo } from "react"; | |
| import { useLocation } from "react-router-dom"; | |
| import L from "leaflet"; | |
| import "leaflet.heat"; | |
| import { MapContainer, TileLayer, Circle, useMap, GeoJSON } from "react-leaflet"; | |
| import { io } from "socket.io-client"; | |
| import { supabase } from "./supabaseClient"; | |
| import "leaflet/dist/leaflet.css"; | |
| import "./App.css"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // src/App.js | |
| import React from "react"; | |
| import { BrowserRouter as Router, Routes, Route } from "react-router-dom"; | |
| import MainApp from "./MainApp"; // Your current App component will become MainApp | |
| import AdminAds from "./AdminAds"; | |
| export default function App() { | |
| return ( | |
| <Router> | |
| <Routes> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { useState, useEffect } from 'react'; | |
| import './AdminAds.css'; | |
| const API_BASE = process.env.REACT_APP_API_BASE || "http://localhost:5000"; | |
| export default function AdminAds() { | |
| const [submissions, setSubmissions] = useState([]); | |
| const [filter, setFilter] = useState('pending_review'); | |
| const [loading, setLoading] = useState(true); | |
| const [isAuthorized, setIsAuthorized] = useState(false); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // server.js | |
| require("dotenv").config(); | |
| const express = require("express"); | |
| const cors = require("cors"); | |
| const http = require("http"); | |
| const { Server } = require("socket.io"); | |
| const multer = require("multer"); | |
| const path = require("path"); | |
| const pool = require("./db"); // your pg Pool instance from db.js | |
| const { createClient } = require('@supabase/supabase-js'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // src/App.js | |
| import React, { useState, useEffect, useRef, useMemo } from "react"; | |
| import { useLocation } from "react-router-dom"; | |
| import L from "leaflet"; | |
| import "leaflet.heat"; | |
| import { MapContainer, TileLayer, Circle, useMap, GeoJSON } from "react-leaflet"; | |
| import { io } from "socket.io-client"; | |
| import { supabase } from "./supabaseClient"; | |
| import "leaflet/dist/leaflet.css"; | |
| import "./App.css"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // src/App.js | |
| import React, { useState, useEffect, useRef, useMemo } from "react"; | |
| import { useLocation } from "react-router-dom"; | |
| import L from "leaflet"; | |
| import "leaflet.heat"; | |
| import { MapContainer, TileLayer, Circle, useMap, GeoJSON } from "react-leaflet"; | |
| import { io } from "socket.io-client"; | |
| import { supabase } from "./supabaseClient"; | |
| import "leaflet/dist/leaflet.css"; | |
| import "./App.css"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* App.css — full merged stylesheet | |
| - pure-flex layout so map and sidebar match heights | |
| - only sidebar scrolls internally | |
| - feed list fills the card | |
| - create accordion and topic spotlight view | |
| - feed descriptions truncated to a single-line preview | |
| - full-width Engage button in spotlight | |
| - topic list: no bullets and left padding matches right side | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // src/App.js | |
| import React, { useState, useEffect, useRef, useMemo } from "react"; | |
| import { useLocation } from "react-router-dom"; | |
| import L from "leaflet"; | |
| import "leaflet.heat"; | |
| import { MapContainer, TileLayer, Circle, useMap, GeoJSON } from "react-leaflet"; | |
| import { io } from "socket.io-client"; | |
| import { supabase } from "./supabaseClient"; | |
| import "leaflet/dist/leaflet.css"; | |
| import "./App.css"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // src/App.js | |
| import React, { useState, useEffect, useRef, useMemo } from "react"; | |
| import { useLocation } from "react-router-dom"; | |
| import L from "leaflet"; | |
| import "leaflet.heat"; | |
| import { MapContainer, TileLayer, Circle, useMap, GeoJSON } from "react-leaflet"; | |
| import { io } from "socket.io-client"; | |
| import { supabase } from "./supabaseClient"; | |
| import "leaflet/dist/leaflet.css"; | |
| import "./App.css"; |
NewerOlder