Skip to content

Commit eebbb9e

Browse files
authored
Merge pull request #25 from urlDev/main
Update dev branch, make it default and add branch protection
2 parents 761af78 + 1b5dfcc commit eebbb9e

File tree

9 files changed

+23517
-418
lines changed

9 files changed

+23517
-418
lines changed

package-lock.json

Lines changed: 23324 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

renovate.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": [
4+
"config:base"
5+
]
6+
}

src/components/market-components/MarketComponents.jsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,7 @@ import {
1717
} from './MarketComponents.styles';
1818

1919
// First, I made market types array, the ones that I want to show in home page
20-
export const marketTypes = [
21-
'Indexes',
22-
'Crypto',
23-
'Forex',
24-
'Stocks',
25-
'Commodities',
26-
];
20+
export const marketTypes = ['Stocks', 'Crypto', 'Forex', 'Commodities'];
2721

2822
const MarketComponents = () => {
2923
const { loadingChart, marketType, marketName } = useSelector(

src/redux/actions/favorite.js

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
1-
import axios from "axios";
2-
import toaster from "toasted-notes";
1+
import axios from 'axios';
2+
import toaster from 'toasted-notes';
33

4-
import NotificationComponent from "../../components/notification-component/NotificationComponent";
4+
import NotificationComponent from '../../components/notification-component/NotificationComponent';
55

6-
const url = "https://urldev-mern-react-times-api.herokuapp.com";
7-
// const url = `http://localhost:3000`;
6+
const url = process.env.REACT_APP_API_URL;
87

9-
export const GET_FAVORITE = "GET_FAVORITE";
10-
export const ADD_FAVORITE = "ADD_FAVORITE";
11-
export const DELETE_FAVORITE = "DELETE_FAVORITE";
12-
export const FETCH_FAVORITE_ERROR = "FETCH_FAVORITE_ERROR";
13-
export const CLEAN_FAVORITE_STATE = "CLEAN_FAVORITE_STATE";
8+
export const GET_FAVORITE = 'GET_FAVORITE';
9+
export const ADD_FAVORITE = 'ADD_FAVORITE';
10+
export const DELETE_FAVORITE = 'DELETE_FAVORITE';
11+
export const FETCH_FAVORITE_ERROR = 'FETCH_FAVORITE_ERROR';
12+
export const CLEAN_FAVORITE_STATE = 'CLEAN_FAVORITE_STATE';
1413

1514
export const getFavorite = (stock) => ({
1615
type: GET_FAVORITE,
@@ -37,7 +36,7 @@ export const cleanFavoriteState = () => ({
3736
});
3837

3938
export const fetchGetFavorites = () => async (dispatch) => {
40-
const token = JSON.parse(localStorage.getItem("token"));
39+
const token = JSON.parse(localStorage.getItem('token'));
4140

4241
const config = {
4342
headers: { Authorization: `Bearer ${token}` },
@@ -56,7 +55,7 @@ export const fetchAddFavorites = (stock) => async (dispatch) => {
5655
symbol: stock,
5756
};
5857

59-
const token = JSON.parse(localStorage.getItem("token"));
58+
const token = JSON.parse(localStorage.getItem('token'));
6059

6160
const config = {
6261
headers: { Authorization: `Bearer ${token}` },
@@ -72,8 +71,8 @@ export const fetchAddFavorites = (stock) => async (dispatch) => {
7271
<NotificationComponent
7372
success={true}
7473
text={`You added ${data.symbol[0].name
75-
.split("^")
76-
.join("")} to your favorites successfully.`}
74+
.split('^')
75+
.join('')} to your favorites successfully.`}
7776
/>
7877
),
7978
{ duration: 1500 }
@@ -96,7 +95,7 @@ export const fetchAddFavorites = (stock) => async (dispatch) => {
9695
};
9796

9897
export const fetchDeleteFavorite = (id) => async (dispatch) => {
99-
const token = JSON.parse(localStorage.getItem("token"));
98+
const token = JSON.parse(localStorage.getItem('token'));
10099

101100
const config = {
102101
headers: { Authorization: `Bearer ${token}` },
@@ -111,8 +110,8 @@ export const fetchDeleteFavorite = (id) => async (dispatch) => {
111110
<NotificationComponent
112111
success={true}
113112
text={`You deleted ${data.symbol[0].name
114-
.split("^")
115-
.join("")} from your favorites.`}
113+
.split('^')
114+
.join('')} from your favorites.`}
116115
/>
117116
),
118117
{ duration: 1500 }

0 commit comments

Comments
 (0)