This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Find existing version | |
node --version | |
# Search available Node versions. | |
brew search node | |
# I neeeded a version between > 10.0 < 11. So I chose node@10. | |
brew install node@10 | |
# You can install multiple versions, but you cannot have them available all at once. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {useState, useEffect} from "react"; | |
import Facilities from "../facitilies/facilities"; | |
import PropTypes from "prop-types"; | |
import SendCommentForm from "../send-comment-form/send-comment-form"; | |
import withSendCommentForm from "../../hocs/with-sent-comment-form/with-sent-comment-form "; | |
import ReviewsList from "../reviews-list/reviews-list"; | |
import Map from "../map/map"; | |
import withOffersList from "../../hocs/with-offers-list/with-offers-list"; | |
import Loader from "react-loader-spinner"; | |
import Offers from "../offers-list/offers-list"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import renderer from "react-test-renderer"; | |
import {offers} from "../test-mocks/offers-mocks"; | |
import {CitiesList} from "../cities-list/cities-list"; | |
import {Provider} from "react-redux"; | |
import {Router} from "react-router-dom"; | |
import configureStore from "redux-mock-store"; | |
import browserHistory from "../../browser-history"; | |
const noop = () => {}; | |
const activeCard = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const favorites = offers.reduce((acc, offer) => { | |
if (acc[offer.city.name]) { | |
return Object.assign({}, acc, { | |
[offer.city.name]: acc[offer.city.name].concat([offer]), | |
}); | |
} else { | |
return Object.assign({}, acc, { | |
[offer.city.name]: [offer], | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {PureComponent} from "react"; | |
import PropTypes from "prop-types"; | |
import "leaflet/dist/leaflet.css"; | |
import leaflet from "leaflet"; | |
const icon = leaflet.icon({ //замени icon на ICON | |
iconUrl: `/img/pin.svg`, | |
iconSize: [30, 30], | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {PureComponent} from "react"; | |
import PropTypes from "prop-types"; | |
import "leaflet/dist/leaflet.css"; | |
import leaflet from "leaflet"; | |
const icon = leaflet.icon({ | |
iconUrl: `img/pin.svg`, | |
iconSize: [30, 30], | |
}); |