code handover
This commit is contained in:
16
public/favicon.svg
Normal file
16
public/favicon.svg
Normal file
@@ -0,0 +1,16 @@
|
||||
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M1.63954 13.3644L3.95187 11.052L3.95428 11.0496H8.30453L6.5736 12.7806L6.12669 13.2275L4.35415 15L4.57368 15.2201L14.5039 25.1498L24.6537 15L22.8805 13.2275L22.7557 13.102L20.7033 11.0496H25.0535L25.0559 11.052L26.8683 12.8644L29.0039 15L14.5039 29.5L0.00390625 15L1.63954 13.3644ZM14.5039 0.5L22.8823 8.87842H18.5321L14.5039 4.85024L10.4757 8.87842H6.12548L14.5039 0.5Z" fill="#096DD9"/>
|
||||
<path d="M4.35477 15.0002L6.12731 13.2276L6.57422 12.7807L4.84389 11.0498H3.9549L3.95249 11.0522L1.64016 13.3645L3.85961 15.5731L4.35477 15.0002Z" fill="url(#paint0_linear_112102_1824)"/>
|
||||
<path d="M22.8814 13.2276L24.6545 15.0002L24.479 15.1757L24.4796 15.1763L26.8691 12.8646L25.0568 11.0522L25.0544 11.0498H24.8783L22.7565 13.1022L22.8814 13.2276Z" fill="url(#paint1_linear_112102_1824)"/>
|
||||
<path d="M3.9497 11.0498L3.95211 11.0522L6.12693 13.2276L14.5041 21.6043L25.0586 11.0498H3.9497Z" fill="#1890FF"/>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear_112102_1824" x1="5.62978" y1="11.5889" x2="2.57161" y2="14.6471" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#023B95"/>
|
||||
<stop offset="0.9637" stop-color="#096CD9" stop-opacity="0"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint1_linear_112102_1824" x1="23.2722" y1="11.6281" x2="25.7451" y2="14.4382" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#023B95"/>
|
||||
<stop offset="1" stop-color="#096DD9" stop-opacity="0"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
57
public/firebase-messaging-sw.js
Normal file
57
public/firebase-messaging-sw.js
Normal file
@@ -0,0 +1,57 @@
|
||||
// Give the service worker access to Firebase Messaging.
|
||||
// Note that you can only use Firebase Messaging here. Other Firebase libraries
|
||||
// are not available in the service worker.
|
||||
// Replace 10.13.2 with latest version of the Firebase JS SDK.
|
||||
// eslint-disable-next-line no-undef
|
||||
importScripts(
|
||||
"https://www.gstatic.com/firebasejs/10.13.2/firebase-app-compat.js"
|
||||
);
|
||||
// eslint-disable-next-line no-undef
|
||||
importScripts(
|
||||
"https://www.gstatic.com/firebasejs/10.13.2/firebase-messaging-compat.js"
|
||||
);
|
||||
|
||||
// Initialize the Firebase app in the service worker by passing in
|
||||
// your app's Firebase config object.
|
||||
// https://firebase.google.com/docs/web/setup#config-object
|
||||
// eslint-disable-next-line no-undef
|
||||
firebase.initializeApp({
|
||||
apiKey: " AIzaSyACBg8oyAR2DWMu4xW85gx5thpRgxnvI_0",
|
||||
authDomain: "nearle-gear.firebaseapp.com",
|
||||
databaseURL: "https://nearle-gear-default-rtdb.firebaseio.com",
|
||||
projectId: "nearle-gear",
|
||||
storageBucket: "nearle-gear.appspot.com",
|
||||
messagingSenderId: "140444764229",
|
||||
appId: "1:140444764229:web:e5ed6259a92d0532283b2c",
|
||||
measurementId: "G-3YQ4DNMXE5",
|
||||
});
|
||||
|
||||
// Retrieve an instance of Firebase Messaging so that it can handle background
|
||||
// messages.
|
||||
// eslint-disable-next-line no-undef
|
||||
const messaging = firebase.messaging();
|
||||
|
||||
// why here
|
||||
|
||||
// When your web app is in the background or closed, the browser shuts down your React app’s JS context (like your firebase.js, App.js, etc.). At this point:
|
||||
// Only a Service Worker (like firebase-messaging-sw.js) is allowed to run.
|
||||
// It listens for messages even when your app is not active.
|
||||
// Firebase automatically routes background messages to that service worker.
|
||||
// So you must use onBackgroundMessage() in the service worker.
|
||||
// 🔁 Think of the service worker like a "headless background listener" running outside your React app.
|
||||
|
||||
messaging.onBackgroundMessage((payload) => {
|
||||
console.log(
|
||||
"[firebase-messaging-sw.js] Received background message ",
|
||||
payload
|
||||
);
|
||||
// Customize notification here
|
||||
const notificationTitle = payload.notification.title;
|
||||
const notificationOptions = {
|
||||
body: payload.notification.body,
|
||||
icon: payload.notification.image,
|
||||
};
|
||||
|
||||
// eslint-disable-next-line no-restricted-globals
|
||||
self.registration.showNotification(notificationTitle, notificationOptions);
|
||||
});
|
||||
50
public/index.html
Normal file
50
public/index.html
Normal file
@@ -0,0 +1,50 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="icon" href="/nearleFavicon1.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="theme-color" content="#000000" />
|
||||
<meta name="description" content="Nearle Neighbourhood commerce" />
|
||||
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
|
||||
|
||||
<!--
|
||||
Notice the use of %PUBLIC_URL% in the tags above.
|
||||
It will be replaced with the URL of the `public` folder during the build.
|
||||
Only files inside the `public` folder can be referenced from the HTML.
|
||||
|
||||
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
||||
work correctly both with client-side routing and a non-root public URL.
|
||||
Learn how to configure a non-root public URL by running `npm run build`.
|
||||
-->
|
||||
<title>Nearlexpress Admin</title>
|
||||
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" />
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@400;500;600;700&family=Roboto:wght@400;500;700&display=swap&family=Public+Sans:wght@400;500;600;700"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
|
||||
<!-- this is to resolve issue in old safari browser in tablet -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/resize-observer-polyfill@1.5.1/dist/ResizeObserver.min.js"></script>
|
||||
<style>
|
||||
.datedialog > div > div > .MuiPaper-root {
|
||||
box-shadow: none !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
<div id="root"></div>
|
||||
<!--
|
||||
This HTML file is a template.
|
||||
If you open it directly in the browser, you will see an empty page.
|
||||
|
||||
You can add webfonts, meta tags, or analytics to this file.
|
||||
The build step will place the bundled scripts into the <body> tag.
|
||||
|
||||
To begin the development, run `npm start` or `yarn start`.
|
||||
To create a production bundle, use `npm run build` or `yarn build`.
|
||||
-->
|
||||
</body>
|
||||
</html>
|
||||
BIN
public/nearleFavicon1.png
Normal file
BIN
public/nearleFavicon1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
Reference in New Issue
Block a user