diff --git a/README.md b/README.md index c0541f9..e69de29 100644 --- a/README.md +++ b/README.md @@ -1,70 +0,0 @@ -# Getting Started with Create React App - -This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). - -## Available Scripts - -In the project directory, you can run: - -### `yarn start` - -Runs the app in the development mode.\ -Open [http://localhost:3000](http://localhost:3000) to view it in your browser. - -The page will reload when you make changes.\ -You may also see any lint errors in the console. - -### `yarn test` - -Launches the test runner in the interactive watch mode.\ -See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. - -### `yarn build` - -Builds the app for production to the `build` folder.\ -It correctly bundles React in production mode and optimizes the build for the best performance. - -The build is minified and the filenames include the hashes.\ -Your app is ready to be deployed! - -See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. - -### `yarn eject` - -**Note: this is a one-way operation. Once you `eject`, you can't go back!** - -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. - -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. - -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. - -## Learn More - -You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). - -To learn React, check out the [React documentation](https://reactjs.org/). - -### Code Splitting - -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) - -### Analyzing the Bundle Size - -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) - -### Making a Progressive Web App - -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) - -### Advanced Configuration - -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) - -### Deployment - -This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) - -### `yarn build` fails to minify - -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) diff --git a/package.json b/package.json index a395916..c296152 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "crypto-app", "version": "0.1.0", "private": true, + "homepage": "https://trevisfox.github.io/Crypto/", "dependencies": { "@emotion/react": "^11.10.4", "@emotion/styled": "^11.10.4", @@ -15,6 +16,7 @@ "axios": "^0.27.2", "chart.js": "^3.9.1", "dotenv": "^16.0.2", + "gh-pages": "^4.0.0", "html-react-parser": "^3.0.4", "millify": "^5.0.0", "moment": "^2.29.4", @@ -32,7 +34,9 @@ "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test", - "eject": "react-scripts eject" + "eject": "react-scripts eject", + "deploy": "gh-pages -d build", + "predeploy": "yarn run build" }, "eslintConfig": { "extends": [ diff --git a/src/components/Cryptocurrencies/Cryptocurrencies.jsx b/src/components/Cryptocurrencies/Cryptocurrencies.jsx index 49fb432..f72d5bf 100644 --- a/src/components/Cryptocurrencies/Cryptocurrencies.jsx +++ b/src/components/Cryptocurrencies/Cryptocurrencies.jsx @@ -19,8 +19,14 @@ import ReadMoreIcon from "@mui/icons-material/ReadMore"; const Cryptocurrencies = ({ simplified }) => { const count = simplified ? 12 : 100; const { data: cryptosList, isFetching } = useGetCryptosQuery(count); + console.log(isFetching); const [cryptos, setCryptos] = useState([]); const [searchTerm, setSearchTerm] = useState(""); + // const [favorites, setFavorites] = useState( + // localStorage.getItem("favorites") + // ? JSON.parse(localStorage.getItem("favorites")) + // : [] + // ); useEffect(() => { const filteredData = cryptosList?.data?.coins.filter((coin) => @@ -29,6 +35,11 @@ const Cryptocurrencies = ({ simplified }) => { setCryptos(filteredData); }, [cryptosList, searchTerm]); + // const handleMarkToFavorite = (newTodos) => { + // setFavorites(newTodos); + // localStorage.setItem("favorites", JSON.stringify(newTodos)); + // }; + if (isFetching) return ; return ( @@ -51,10 +62,9 @@ const Cryptocurrencies = ({ simplified }) => { )} - {cryptos?.map((currency) => ( - + {cryptos?.map((currency, index) => ( + { bgcolor: "#1976d2", }} > - - - - - + + + { +const Favorites = (props) => { + console.log(props); return
Favorites
; }; diff --git a/src/components/News/News.jsx b/src/components/News/News.jsx index b4674d1..5d9be50 100644 --- a/src/components/News/News.jsx +++ b/src/components/News/News.jsx @@ -83,9 +83,9 @@ const News = ({ simplified }) => { pb: 6, }} > - {cryptoNews.value.map((news, i) => ( - - + {cryptoNews.value.map((news) => ( + +