Skip to content

Commit

Permalink
trying to fix some errors aft running npm run build
Browse files Browse the repository at this point in the history
  • Loading branch information
wongwh2002 committed Jul 28, 2024
1 parent 4846091 commit 8eaa270
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 30 deletions.
12 changes: 6 additions & 6 deletions .firebase/hosting.cHVibGlj.cache
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
404.html,1717825658751,05cbc6f94d7a69ce2e29646eab13be2c884e61ba93e3094df5028866876d18b3
index.html,1719681420879,589a147d732c4869e90d2c2cbe612d7d968b94c0fa468df4a1bdfb87f6e66e06
vite.svg,1717825658752,d3bbbc44b3ea71906a72bf2ec1a4716903e2e3d9f85a5007205a65d1f12e2923
pictures/google-logo.png,1719684810003,e86dea39acce8801c60ad0e6658437d88ae507dff8192c904335d3c54df54c94
pictures/food-saviour-logo.png,1719684810001,8f079a074d0b13323981b87d813fd1207924d311a50f14a7f7bc03451af97f43
pictures/food-saviour-logo.jpeg,1719684810000,e53f608224c14169c25cf0f6b23aa044b07d0acd974e25ea00bb56d8c46e8200
pictures/background.jpg,1719684809998,551818180d82d1ede8c39c7bcb3f153b7bd4f408f81c4db000286afbd83cc11d
index.html,1722180553718,589a147d732c4869e90d2c2cbe612d7d968b94c0fa468df4a1bdfb87f6e66e06
404.html,1722163309532,05cbc6f94d7a69ce2e29646eab13be2c884e61ba93e3094df5028866876d18b3
pictures/google-logo.png,1719686491459,e86dea39acce8801c60ad0e6658437d88ae507dff8192c904335d3c54df54c94
pictures/food-saviour-logo.png,1719686491457,8f079a074d0b13323981b87d813fd1207924d311a50f14a7f7bc03451af97f43
pictures/food-saviour-logo.jpeg,1719686491456,e53f608224c14169c25cf0f6b23aa044b07d0acd974e25ea00bb56d8c46e8200
pictures/background.jpg,1719686491454,551818180d82d1ede8c39c7bcb3f153b7bd4f408f81c4db000286afbd83cc11d
7 changes: 7 additions & 0 deletions database.rules.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
/* Visit https://firebase.google.com/docs/database/security to learn more about security rules. */
"rules": {
".read": false,
".write": false
}
}
2 changes: 1 addition & 1 deletion firebase.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"hosting": {
"public": "dist",
"public": "public",
"site": "foodsaviour",
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
"rewrites": [
Expand Down
1 change: 0 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { Dashboard } from "./pages/Dashboard";
import { FavoritePage } from "./pages/Favorites";
import { AuthContextProvider } from "./context/Auth";
import { LocationContextProvider } from "./context/Location";
import MapComponent from "./components/MapComponent";

function App() {
return (
Expand Down
1 change: 0 additions & 1 deletion src/components/ConCards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { timestampToString } from "../functions/Date";
import { HeartSwitch } from "@anatoliygatt/heart-switch";
import { FoodItem } from "../interface/FoodItem";
import { useLocationContext } from "../context/Location";
import { useAuth } from "../context/Auth";

// ConCards component to display a grid of food cards
export const ConCards = ({
Expand Down
4 changes: 2 additions & 2 deletions src/components/MapComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ const MapComponent: React.FC = () => {
const [cusPos, setCusPos] = useState<{ lat: number; lng: number } | null>(
null
);
const [currentPosition, setCurrentPosition] = useState<{
const [setCurrentPosition] = useState<{
lat: number;
lng: number;
} | null>(null);
const [activeMarker, setActiveMarker] = useState<number | null>(null);
// State for locations from context
const { locations, setLocations } = useLocationContext();
const { locations } = useLocationContext();
// Load the Google Maps script
const { isLoaded, loadError } = useJsApiLoader({ googleMapsApiKey: gMapKey });
const { calculateDistances } = useUpdateLocations();
Expand Down
2 changes: 1 addition & 1 deletion src/components/NavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function NavBar() {
let navigate = useNavigate();
const { user, isConsumer } = useAuth();
const { updateLocation } = useGetCurLoc();
const { handleLocationContext, isLoading, locList } = useUpdateLocations();
const { handleLocationContext } = useUpdateLocations();
const { locations } = useLocationContext();
const [isLocationUpdated, setIsLocationUpdated] = useState(false);

Expand Down
2 changes: 1 addition & 1 deletion src/functions/LocationHandlers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
singaporeLoc,
Location,
} from "../context/Location";
import { useEffect, useState } from "react";
import { useState } from "react";
import { collection, GeoPoint, getDocs } from "firebase/firestore";
import { db } from "../config/firebase";
var local = [singaporeLoc.lat, singaporeLoc.lng];
Expand Down
16 changes: 0 additions & 16 deletions src/notApp.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion src/pages/Register.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState, useRef, useEffect } from "react";
import { useState, useRef, useEffect } from "react";
import { Link, useNavigate } from "react-router-dom";
import ErrorText from "../components/ErrorText";
import { auth, db, googleProvider } from "../config/firebase";
Expand Down

0 comments on commit 8eaa270

Please sign in to comment.