├── .env ├── .firebase └── hosting.YnVpbGQ.cache ├── .firebaserc ├── .gitignore ├── README.md ├── firebase.json ├── package.json ├── postcss.config.js ├── public ├── favicon.ico ├── index.html ├── logo192.png ├── logo512.png ├── manifest.json └── robots.txt ├── src ├── App.js ├── components │ ├── CoinItem.jsx │ ├── CoinSearch.jsx │ ├── Footer.jsx │ ├── Navbar.jsx │ ├── SavedCoin.jsx │ ├── ThemeToggle.jsx │ └── Trending.jsx ├── context │ ├── AuthContext.jsx │ └── ThemeContext.jsx ├── firebase.js ├── index.css ├── index.js └── routes │ ├── Account.jsx │ ├── CoinPage.jsx │ ├── Home.jsx │ ├── Signin.jsx │ └── Signup.jsx ├── tailwind.config.js └── yarn.lock /.env: -------------------------------------------------------------------------------- 1 | REACT_APP_FIREBASE_API_KEY=YOUR REACT KEY 2 | REACT_APP_FIREBASE_AUTH_DOMAIN=YOUR FIREBASE AUTH DOMAIN 3 | REACT_APP_FIREBASE_PROJECT_ID=YOUR PROJECT ID 4 | REACT_APP_FIREBASE_STORAGE_BUCKET=YOUR STORAGE BUCKET 5 | REACT_APP_FIREBASE_MESSAGING_SENDER=YOUR MESSAGING SENDER 6 | REACT_APP_FIREBASE_APP_ID=YOUR APP ID -------------------------------------------------------------------------------- /.firebase/hosting.YnVpbGQ.cache: -------------------------------------------------------------------------------- 1 | asset-manifest.json,1654105834037,0ae684695f747d511f6d8cb611055a02b5090179fd90814b21eea876b266aba0 2 | index.html,1654105834036,f6a1f7afbeb8205ab7215e78227f83ff83ee60c3aeb6226e9dcc3c4b2aa20566 3 | favicon.ico,1654105814136,b72f7455f00e4e58792d2bca892abb068e2213838c0316d6b7a0d6d16acd1955 4 | logo192.png,1654105814137,caff018b7f1e8fd481eb1c50d75b0ef236bcd5078b1d15c8bb348453fee30293 5 | manifest.json,1654105814139,341d52628782f8ac9290bbfc43298afccb47b7cbfcee146ae30cf0f46bc30900 6 | robots.txt,1654105814140,391d14b3c2f8c9143a27a28c7399585142228d4d1bdbe2c87ac946de411fa9a2 7 | logo512.png,1654105814138,191fc21360b4ccfb1cda11a1efb97f489ed22672ca83f4064316802bbfdd750e 8 | static/css/main.1097ef92.css.map,1654105834057,4fb0f8ad942077cfe4322509684553fbbc93aabcdfc462a514e1947463239692 9 | static/css/main.1097ef92.css,1654105834057,04b20f9201c4224b77e31c43beffcd7b8631d4e0c0b9253b1a43c745ce45348a 10 | static/js/main.99b0cee0.js.LICENSE.txt,1654105834057,140fa5acd8ff7f2e15b05bcfc2c58e2b22355ba6f131e2f6d996e98711776ffb 11 | static/js/main.99b0cee0.js,1654105834057,0e83bbfe9b2b5880d8d2e51830d88b07feefeccff70ece8164fce30ba84cb790 12 | static/js/main.99b0cee0.js.map,1654105834058,b3fd5fbeafb1caf981d86aac79d6c7d1bf27fe6b44599b648c53839483475124 13 | -------------------------------------------------------------------------------- /.firebaserc: -------------------------------------------------------------------------------- 1 | { 2 | "projects": { 3 | "default": "cryptobase-7b9b5" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Getting Started with Create React App 2 | 3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). 4 | 5 | ## Available Scripts 6 | 7 | In the project directory, you can run: 8 | 9 | ### `yarn start` 10 | 11 | Runs the app in the development mode.\ 12 | Open [http://localhost:3000](http://localhost:3000) to view it in your browser. 13 | 14 | The page will reload when you make changes.\ 15 | You may also see any lint errors in the console. 16 | 17 | ### `yarn test` 18 | 19 | Launches the test runner in the interactive watch mode.\ 20 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. 21 | 22 | ### `yarn build` 23 | 24 | Builds the app for production to the `build` folder.\ 25 | It correctly bundles React in production mode and optimizes the build for the best performance. 26 | 27 | The build is minified and the filenames include the hashes.\ 28 | Your app is ready to be deployed! 29 | 30 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. 31 | 32 | ### `yarn eject` 33 | 34 | **Note: this is a one-way operation. Once you `eject`, you can't go back!** 35 | 36 | If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. 37 | 38 | Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own. 39 | 40 | You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it. 41 | 42 | ## Learn More 43 | 44 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). 45 | 46 | To learn React, check out the [React documentation](https://reactjs.org/). 47 | 48 | ### Code Splitting 49 | 50 | This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) 51 | 52 | ### Analyzing the Bundle Size 53 | 54 | This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) 55 | 56 | ### Making a Progressive Web App 57 | 58 | This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) 59 | 60 | ### Advanced Configuration 61 | 62 | This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) 63 | 64 | ### Deployment 65 | 66 | This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) 67 | 68 | ### `yarn build` fails to minify 69 | 70 | This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) 71 | -------------------------------------------------------------------------------- /firebase.json: -------------------------------------------------------------------------------- 1 | { 2 | "hosting": { 3 | "public": "build", 4 | "ignore": [ 5 | "firebase.json", 6 | "**/.*", 7 | "**/node_modules/**" 8 | ], 9 | "rewrites": [ 10 | { 11 | "source": "**", 12 | "destination": "/index.html" 13 | } 14 | ] 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "crypto-project", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@testing-library/jest-dom": "^5.14.1", 7 | "@testing-library/react": "^13.0.0", 8 | "@testing-library/user-event": "^13.2.1", 9 | "axios": "^0.27.2", 10 | "dompurify": "^2.3.8", 11 | "firebase": "^9.8.2", 12 | "react": "^18.1.0", 13 | "react-dom": "^18.1.0", 14 | "react-icons": "^4.3.1", 15 | "react-router-dom": "^6.3.0", 16 | "react-scripts": "5.0.1", 17 | "react-sparklines": "^1.7.0", 18 | "web-vitals": "^2.1.0" 19 | }, 20 | "scripts": { 21 | "start": "react-scripts start", 22 | "build": "react-scripts build", 23 | "test": "react-scripts test", 24 | "eject": "react-scripts eject" 25 | }, 26 | "eslintConfig": { 27 | "extends": [ 28 | "react-app", 29 | "react-app/jest" 30 | ] 31 | }, 32 | "browserslist": { 33 | "production": [ 34 | ">0.2%", 35 | "not dead", 36 | "not op_mini all" 37 | ], 38 | "development": [ 39 | "last 1 chrome version", 40 | "last 1 firefox version", 41 | "last 1 safari version" 42 | ] 43 | }, 44 | "devDependencies": { 45 | "autoprefixer": "^10.4.7", 46 | "postcss": "^8.4.14", 47 | "tailwindcss": "^3.0.24" 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fireclint/crypto-react-firebase/a60602687a2578477fca75a8dc9d606e152210a2/public/favicon.ico -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 17 | 18 | 27 | React App 28 | 29 | 30 | 31 |
32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fireclint/crypto-react-firebase/a60602687a2578477fca75a8dc9d606e152210a2/public/logo192.png -------------------------------------------------------------------------------- /public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fireclint/crypto-react-firebase/a60602687a2578477fca75a8dc9d606e152210a2/public/logo512.png -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /src/App.js: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useState } from 'react'; 2 | import { Route, Routes } from 'react-router-dom'; 3 | import Navbar from './components/Navbar'; 4 | import { ThemeProvider } from './context/ThemeContext'; 5 | import Home from './routes/Home'; 6 | import Signin from './routes/Signin'; 7 | import Signup from './routes/Signup'; 8 | import Account from './routes/Account'; 9 | import axios from 'axios'; 10 | import CoinPage from './routes/CoinPage'; 11 | import Footer from './components/Footer'; 12 | import { AuthContextProvider } from './context/AuthContext'; 13 | 14 | function App() { 15 | const [coins, setCoins] = useState([]); 16 | 17 | const url = 18 | 'https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&order=market_cap_desc&per_page=10&page=1&sparkline=true'; 19 | 20 | useEffect(() => { 21 | axios.get(url).then((response) => { 22 | setCoins(response.data); 23 | // console.log(response.data) 24 | }); 25 | }, [url]); 26 | 27 | return ( 28 | 29 | 30 | 31 | 32 | } /> 33 | } /> 34 | } /> 35 | } /> 36 | }> 37 | 38 | 39 | 40 |