- Hosted Link:- https://indie-foods.netlify.app/
- GitHub Org:- https://github.com/IndieFoods
- Presentation Link:- https://prezi.com/view/GKB7KVATwHWdA3UCNLsQ
- Video:- https://drive.google.com/file/d/18Jrg0y5JLSJkJY1Lnd9sUuiHNsdG00px/view?usp=sharing
This file contains 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
const Express = require("express"); | |
const bodyParser = require("body-parser"); | |
const admin = require("firebase-admin"); | |
const serviceAccount = require("./firebase.json"); | |
admin.initializeApp({ | |
credential: admin.credential.cert(serviceAccount), | |
}); |
This file contains 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 from "react"; | |
import { useRecoilValue } from "recoil"; | |
import { currentContactDetails } from "../../recoil/selectors"; | |
const Card = () => { | |
const contact = useRecoilValue(currentContactDetails); | |
return ( | |
<> |
This file contains 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, { Suspense } from "react"; | |
import Card from "../Card/Card"; | |
import styles from "./Details.module.css"; | |
const Details = () => { | |
return ( | |
<div className={styles.container}> | |
<div className={styles.card}> |
This file contains 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 from "react"; | |
import { useRecoilState, useRecoilValue } from "recoil"; | |
import styles from "./ContactList.module.css"; | |
import { currentContactState } from "../../recoil/atoms"; | |
import { contactsList } from "../../recoil/selectors"; | |
const ContactList = () => { | |
const [currentContact, setCurrentContact] = useRecoilState(currentContactState); |
This file contains 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 { selector } from "recoil"; | |
import { currentContactState } from "./atoms"; | |
import { getContacts, getDetails } from "../data"; | |
export const contactsList = selector({ | |
key: "contactsList", | |
get: async () => { | |
const response = await getContacts(); | |
return response; |
This file contains 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 { atom } from "recoil"; | |
export const currentContactState = atom({ | |
key: "currentContactState", | |
default: 1, | |
}); |
This file contains 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 from "react"; | |
import { RecoilRoot } from "recoil"; | |
import Details from "./components/Details/Details"; | |
import Sidebar from "./components/Sidebar/Sidebar"; | |
import "./App.css"; | |
function App() { | |
return ( |