Skip to content

Commit

Permalink
Merge pull request #3 from TrevisfoX/dev
Browse files Browse the repository at this point in the history
init: deploy
  • Loading branch information
TrevisfoX authored Sep 19, 2022
2 parents 6d9f5ea + eddc37f commit b1b8658
Show file tree
Hide file tree
Showing 6 changed files with 145 additions and 93 deletions.
70 changes: 0 additions & 70 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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": [
Expand Down
32 changes: 20 additions & 12 deletions src/components/Cryptocurrencies/Cryptocurrencies.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) =>
Expand All @@ -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 <Loader />;

return (
Expand All @@ -51,10 +62,9 @@ const Cryptocurrencies = ({ simplified }) => {
)}

<Grid container spacing={5}>
{cryptos?.map((currency) => (
<Grid item md={4}>
{cryptos?.map((currency, index) => (
<Grid item md={4} key={index}>
<Card
key={currency.uuid}
sx={{
minHeight: 255,
}}
Expand Down Expand Up @@ -135,15 +145,13 @@ const Cryptocurrencies = ({ simplified }) => {
bgcolor: "#1976d2",
}}
>
<Link to={""}>
<IconButton
sx={{
color: "white",
}}
>
<AddIcon />
</IconButton>
</Link>
<IconButton
sx={{
color: "white",
}}
>
<AddIcon />
</IconButton>
<Link to={`/crypto/${currency.uuid}`}>
<IconButton
sx={{
Expand Down
3 changes: 2 additions & 1 deletion src/components/Favorites/Favorites.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from "react";

const Favorites = () => {
const Favorites = (props) => {
console.log(props);
return <div>Favorites</div>;
};

Expand Down
6 changes: 3 additions & 3 deletions src/components/News/News.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ const News = ({ simplified }) => {
pb: 6,
}}
>
{cryptoNews.value.map((news, i) => (
<Grid item md={12}>
<Card hoverable className="news-card">
{cryptoNews.value.map((news) => (
<Grid item md={12} key={news.name}>
<Card hoverable="true">
<CardContent>
<Typography
sx={{
Expand Down
Loading

2 comments on commit b1b8658

@vercel
Copy link

@vercel vercel bot commented on b1b8658 Sep 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

crypto – ./

crypto-neon-ten.vercel.app
crypto-trevisfox.vercel.app
crypto-git-main-trevisfox.vercel.app

@vercel
Copy link

@vercel vercel bot commented on b1b8658 Sep 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

crypto-app-v1 – ./

crypto-app-v1.vercel.app
crypto-app-v1-trevisfox.vercel.app
crypto-app-v1-git-main-trevisfox.vercel.app

Please sign in to comment.