Skip to content
Merged
23,351 changes: 23,324 additions & 27 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base"
]
}
8 changes: 1 addition & 7 deletions src/components/market-components/MarketComponents.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,7 @@ import {
} from './MarketComponents.styles';

// First, I made market types array, the ones that I want to show in home page
export const marketTypes = [
'Indexes',
'Crypto',
'Forex',
'Stocks',
'Commodities',
];
export const marketTypes = ['Stocks', 'Crypto', 'Forex', 'Commodities'];

const MarketComponents = () => {
const { loadingChart, marketType, marketName } = useSelector(
Expand Down
33 changes: 16 additions & 17 deletions src/redux/actions/favorite.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import axios from "axios";
import toaster from "toasted-notes";
import axios from 'axios';
import toaster from 'toasted-notes';

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

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

export const GET_FAVORITE = "GET_FAVORITE";
export const ADD_FAVORITE = "ADD_FAVORITE";
export const DELETE_FAVORITE = "DELETE_FAVORITE";
export const FETCH_FAVORITE_ERROR = "FETCH_FAVORITE_ERROR";
export const CLEAN_FAVORITE_STATE = "CLEAN_FAVORITE_STATE";
export const GET_FAVORITE = 'GET_FAVORITE';
export const ADD_FAVORITE = 'ADD_FAVORITE';
export const DELETE_FAVORITE = 'DELETE_FAVORITE';
export const FETCH_FAVORITE_ERROR = 'FETCH_FAVORITE_ERROR';
export const CLEAN_FAVORITE_STATE = 'CLEAN_FAVORITE_STATE';

export const getFavorite = (stock) => ({
type: GET_FAVORITE,
Expand All @@ -37,7 +36,7 @@ export const cleanFavoriteState = () => ({
});

export const fetchGetFavorites = () => async (dispatch) => {
const token = JSON.parse(localStorage.getItem("token"));
const token = JSON.parse(localStorage.getItem('token'));

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

const token = JSON.parse(localStorage.getItem("token"));
const token = JSON.parse(localStorage.getItem('token'));

const config = {
headers: { Authorization: `Bearer ${token}` },
Expand All @@ -72,8 +71,8 @@ export const fetchAddFavorites = (stock) => async (dispatch) => {
<NotificationComponent
success={true}
text={`You added ${data.symbol[0].name
.split("^")
.join("")} to your favorites successfully.`}
.split('^')
.join('')} to your favorites successfully.`}
/>
),
{ duration: 1500 }
Expand All @@ -96,7 +95,7 @@ export const fetchAddFavorites = (stock) => async (dispatch) => {
};

export const fetchDeleteFavorite = (id) => async (dispatch) => {
const token = JSON.parse(localStorage.getItem("token"));
const token = JSON.parse(localStorage.getItem('token'));

const config = {
headers: { Authorization: `Bearer ${token}` },
Expand All @@ -111,8 +110,8 @@ export const fetchDeleteFavorite = (id) => async (dispatch) => {
<NotificationComponent
success={true}
text={`You deleted ${data.symbol[0].name
.split("^")
.join("")} from your favorites.`}
.split('^')
.join('')} from your favorites.`}
/>
),
{ duration: 1500 }
Expand Down
Loading