Pinned Loading
-
Handling onAuthStateChanged and disp...
Handling onAuthStateChanged and dispatching redux 1import firebase from '@firebase/app';
2import '@firebase/auth';
3import '@firebase/database';
4import { store } from '../store.js';
5import { setUser, setUserDetails } from '../actions/user.js';
-
cloud function with geoquery
cloud function with geoquery 1function FindNearbyTalents(jobowner, jobid, lat, lng, cat){
2return new Promise((resolve, reject) => {
3const geoQueryTalents = geoFireTalents.query({center: [lat, lng], radius: 5 });
4const promises = [];
5geoQueryTalents.on("key_entered", (key, location, distance) => {
-
React & Material design
React & Material design 1/* eslint-disable no-script-url */
23import React from 'react';
4import Link from '@material-ui/core/Link';
5import { makeStyles } from '@material-ui/core/styles';
-
Observe firebase node contracts
Observe firebase node contracts 1exports.ObserveContract = functions.database.ref("/contracts/{id}").onWrite((change, context) => {
2const sa = change.after.val();
3const id = context.params.id;
4const contractor = sa.contractor || change.before.val().contractor;
5const talent = sa.talent || change.before.val().talent;
-
Functional component with useEffect ...
Functional component with useEffect and useState hooks handling asynchronous task 1import React, { useEffect, useState } from 'react';
2import { getNotifications } from '../Notifications/data.js';
34const Dashboard = () => {
5const [open, setOpen] = useState(false);
-
AuthContext and React.createContext ...
AuthContext and React.createContext - Making authentication variables global 1import React from "react";
23export const AuthContext = React.createContext({
4isAuthenticated: false,
5webToken: null,
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.