Skip to content

Commit

Permalink
Merge branch 'main' into ridzi
Browse files Browse the repository at this point in the history
  • Loading branch information
rishicds authored May 16, 2024
2 parents e29302e + 24ffd78 commit 0684da3
Show file tree
Hide file tree
Showing 11 changed files with 485 additions and 235 deletions.
6 changes: 3 additions & 3 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
//do_not_put_quptes_around_values
//do_not_put_quotes_around_values
REACT_APP_BACKEND_URL= https://paws-backend.azurewebsites.net

//vapid
REACT_APP_VAPID_KEY= your vapid key
REACT_APP_VAPID_KEY= your vapid key


//google maps
REACT_APP_GOOGLE_MAPS_API_KEY= your google maps api key

//cloudinary(image upload)
REACT_APP_CLOUDINARY_UPLOAD_URL= your cloudinary url
REACT_APP_CLOUDINARY_UPLOAD_PRESET= your cloudinary preset
REACT_APP_CLOUDINARY_UPLOAD_PRESET= your cloudinary preset
16 changes: 16 additions & 0 deletions .github/workflows/greetings.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Greetings

on: [pull_request_target, issues]

jobs:
greeting:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: "Hi there! Thanks for opening this issue. We appreciate your contribution to this open-source project. We aim to respond or assign your issue as soon as possible."
pr-message: "Welcome to Our repository.🎊 Thank you so much for taking the time to point this out."
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,5 @@
- to understand how its working please take a look at [Paws System Design](https://excalidraw.com/#json=GMHuRPYEPAvFAn5xM4ok8,8w53-nnoWQeDL0hPE86s9A)
For setting up backend please refer to [Paws Backend](https://github.com/Innovateninjas/Paws-Backend) for any kind of help regarding backend please create a [discussion](https://github.com/Innovateninjas/Paws-Backend/discussions) their mention our backend dev [@anirbanmajumder0](https://github.com/anirbanmajumder0)

# Gssoc'24
issues under gssoc24 time alloted is 5 days . if a issue needed more time we will mention it while assigning after alloted time is passed if no update is given issue will be assigned to other contributor
Binary file added favicon (2).ico
Binary file not shown.
40 changes: 22 additions & 18 deletions public/firebase-messaging-sw.js
Original file line number Diff line number Diff line change
@@ -1,31 +1,35 @@
/* eslint-disable no-undef */
importScripts('https://www.gstatic.com/firebasejs/8.10.1/firebase-app.js');
importScripts('https://www.gstatic.com/firebasejs/8.10.1/firebase-messaging.js');
importScripts("https://www.gstatic.com/firebasejs/8.10.1/firebase-app.js");
importScripts(
"https://www.gstatic.com/firebasejs/8.10.1/firebase-messaging.js"
);

const firebaseConfig = {
apiKey: "AIzaSyBgRI7QrEqlrtj94hZ-MKtYc77XunOc_9w",
authDomain: "paws-b9b64.firebaseapp.com",
projectId: "paws-b9b64",
storageBucket: "paws-b9b64.appspot.com",
messagingSenderId: "610215952536",
appId: "1:610215952536:web:4f832813ef5d58acb010ed",
measurementId: "G-3TBQ0B47KK"
apiKey: "AIzaSyBgRI7QrEqlrtj94hZ-MKtYc77XunOc_9w",
authDomain: "paws-b9b64.firebaseapp.com",
projectId: "paws-b9b64",
storageBucket: "paws-b9b64.appspot.com",
messagingSenderId: "610215952536",
appId: "1:610215952536:web:4f832813ef5d58acb010ed",
measurementId: "G-3TBQ0B47KK",
};

firebase.initializeApp(firebaseConfig);

const messaging = firebase.messaging();

messaging.onBackgroundMessage((payload) => {
console.log('[firebase-messaging-sw.js] Received background message ', payload);
console.log(
"[firebase-messaging-sw.js] Received background message ",
payload
);

const notificationTitle = payload.notification.title;
const notificationOptions = {
body: payload.notification.body,
icon: './notification_icon.ico'
};
const notificationTitle = payload.notification.title;
const notificationOptions = {
body: payload.notification.body,
icon: "./notification_icon.ico",
};

// eslint-disable-next-line no-restricted-globals
self.registration.showNotification(notificationTitle,
notificationOptions);
// eslint-disable-next-line no-restricted-globals
self.registration.showNotification(notificationTitle, notificationOptions);
});
Binary file added public/images/search.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
<link href="https://fonts.googleapis.com/css?family=Nunito+Sans:400,400i,700,900&display=swap" rel="stylesheet">

<meta name="description" content="Paws">
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png"/>

<!-- Manifest file -->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />

<!-- Title for the app -->
<title>Paws</title>
</head>
Expand Down
20 changes: 11 additions & 9 deletions src/firebase.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
// Import the functions you need from the SDKs you need
import { initializeApp } from "firebase/app";
import { getMessaging } from "firebase/messaging";
import { getMessaging } from "firebase/messaging";
import { getAuth } from "firebase/auth";

const firebaseConfig = {
apiKey: "AIzaSyBgRI7QrEqlrtj94hZ-MKtYc77XunOc_9w",
authDomain: "paws-b9b64.firebaseapp.com",
projectId: "paws-b9b64",
storageBucket: "paws-b9b64.appspot.com",
messagingSenderId: "610215952536",
appId: "1:610215952536:web:4f832813ef5d58acb010ed",
measurementId: "G-3TBQ0B47KK"
apiKey: "AIzaSyBgRI7QrEqlrtj94hZ-MKtYc77XunOc_9w",
authDomain: "paws-b9b64.firebaseapp.com",
projectId: "paws-b9b64",
storageBucket: "paws-b9b64.appspot.com",
messagingSenderId: "610215952536",
appId: "1:610215952536:web:4f832813ef5d58acb010ed",
measurementId: "G-3TBQ0B47KK",
};

// Initialize Firebase
const app = initializeApp(firebaseConfig);
export const messaging = getMessaging(app);
export const messaging = getMessaging(app);
export const auth = getAuth(app);
23 changes: 22 additions & 1 deletion src/pages/user/ReportIncidentPages/SuccessPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ function SuccessPage() {

// console.log(csrftoken)

//backend endpoint required to fetch 3 closest NGO info
const nearNGO = [
["name1: ", "number1"],
["name2: ", "number2"],
["name3: ", "number3"]
]

return (
<div className="z-[-2] mb-10 min-h-screen max-h-fit bg-custom-gradient top-0 w-full flex items-center">
<div className="pt-7 w-full text-center mb-10 flex flex-col items-center gap-5 justify-center">
Expand Down Expand Up @@ -46,9 +53,23 @@ function SuccessPage() {
)
}
</div>
<div className="w-[92%] mt-12 bg-red-50 rounded-xl bg-opacity-75 ">
<div className=" flex flex-row items-center w-full justify-start">
<h1 className="pl-5 mt-1 mb-1 text-2xl text-bold tracking-wider text-red-900 font-breeSerif ">Contact the nearest NGO if you can!</h1>
</div>
<div>
<h3 className="pl-5 mb-2 text-left">These are the closest NGOs. Let them know a streetie needs help!</h3>
<ol className="pl-20 mb-5 font-bold text-lg font-sans text-left list-decimal">
<li>{nearNGO[0]}</li>
<li>{nearNGO[1]}</li>
<li>{nearNGO[2]}</li>
</ol>
<p className="pl-5 mb-2 text-left">Doing this can let the animal receive help quicker.</p>
</div>
</div>
<div className="w-[92%] mt-12 ">
<div className=" flex flex-row items-center w-full justify-start">
<h1 className="pl-2 mb-1 text-2xl text-bold tracking-wider font-breeSerif ">Here Is what you can do </h1>
<h1 className="pl-2 mb-1 text-2xl text-bold tracking-wider font-breeSerif ">Here's what you can do in the meantime</h1>
</div>
<CustomizedAccordions />
</div>
Expand Down
Loading

0 comments on commit 0684da3

Please sign in to comment.