-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into validate-company-application-Page
Showing
80 changed files
with
1,647 additions
and
852 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
coverage: | ||
status: | ||
project: | ||
default: | ||
target: 80% | ||
threshold: 5% |
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
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
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
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
64 changes: 64 additions & 0 deletions
64
src/components/Company/Offers/Manage/CompanyOffersTitle.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import React, { useEffect, useState } from "react"; | ||
import PropTypes from "prop-types"; | ||
import { Chip, makeStyles } from "@material-ui/core"; | ||
|
||
const useStyles = makeStyles((theme) => ({ | ||
hiddenChip: { | ||
backgroundColor: "#90A4AE", | ||
marginRight: theme.spacing(.5), | ||
}, | ||
blockedChip: { | ||
backgroundColor: "#DC4338", | ||
marginRight: theme.spacing(.5), | ||
}, | ||
archivedChip: { | ||
backgroundColor: "#56A8D6", | ||
marginRight: theme.spacing(.5), | ||
}, | ||
chips: { | ||
position: "absolute", | ||
}, | ||
})); | ||
|
||
const OfferTitle = ({ title, getOfferVisibility, offerId }) => { | ||
const [chips, setChips] = useState([]); | ||
const isHidden = getOfferVisibility(offerId)?.isHidden; | ||
const isBlocked = getOfferVisibility(offerId)?.isDisabled; | ||
const isArchived = getOfferVisibility(offerId)?.isArchived; | ||
|
||
const classes = useStyles(); | ||
|
||
useEffect(() => { | ||
const statusChips = { | ||
hidden: <Chip size="small" label="Hidden" data-testid="HiddenChip" className={classes.hiddenChip} />, | ||
blocked: <Chip size="small" label="Blocked" data-testid="BlockedChip" className={classes.blockedChip} />, | ||
archived: <Chip size="small" label="Archived" data-testid="ArchivedChip" className={classes.archivedChip} />, | ||
}; | ||
|
||
const tempChips = []; | ||
if (isHidden) | ||
tempChips.push(statusChips.hidden); | ||
if (isBlocked) | ||
tempChips.push(statusChips.blocked); | ||
if (isArchived) | ||
tempChips.push(statusChips.archived); | ||
setChips(tempChips); | ||
}, [classes, isArchived, isBlocked, isHidden]); | ||
|
||
return ( | ||
<> | ||
{title} | ||
<div className={classes.chips}> | ||
{chips} | ||
</div> | ||
</> | ||
); | ||
}; | ||
|
||
OfferTitle.propTypes = { | ||
title: PropTypes.string.isRequired, | ||
getOfferVisibility: PropTypes.func.isRequired, | ||
offerId: PropTypes.number.isRequired, | ||
}; | ||
|
||
export default OfferTitle; |
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
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
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
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
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
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
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
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
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
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
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
160 changes: 160 additions & 0 deletions
160
src/components/HomePage/SearchResultsArea/Offer/useChipFieldSearchOffer.spec.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,160 @@ | ||
import { createTheme } from "@material-ui/core"; | ||
import React from "react"; | ||
import { MemoryRouter } from "react-router-dom"; | ||
import { renderWithStoreAndTheme, fireEvent } from "../../../../test-utils"; | ||
import Offer from "./Offer"; | ||
import OfferWidget from "./OfferWidget"; | ||
import useChipsFieldSearch from "./useChipsFieldSearch"; | ||
|
||
jest.mock("./useChipsFieldSearch"); | ||
const mockHistoryPush = jest.fn(); | ||
|
||
jest.mock("react-router-dom", () => ({ | ||
...jest.requireActual("react-router-dom"), | ||
useHistory: () => ({ | ||
push: mockHistoryPush, | ||
}), | ||
})); | ||
|
||
describe("useChipsFieldSearch", () => { | ||
const theme = createTheme({}); | ||
|
||
|
||
const offer = new Offer({ | ||
_id: "id1", | ||
title: "position1", | ||
owner: "company_id", | ||
ownerName: "company1", | ||
ownerLogo: "", | ||
location: "location1", | ||
fields: ["BACKEND"], | ||
technologies: ["Cassandra"], | ||
jobMinDuration: 1, | ||
jobMaxDuration: 12, | ||
jobStartDate: (new Date()).toISOString(), | ||
publishDate: "2021-04-22T22:35:57.177Z", | ||
publishEndDate: "2021-09-19T23:00:00.000Z", | ||
isPaid: false, | ||
vacancies: 2, | ||
description: "description1", | ||
}); | ||
|
||
|
||
it("should redirect and update field filter state if in page", async () => { | ||
const addFieldMock = jest.fn(); | ||
useChipsFieldSearch.mockImplementation(() => ({ | ||
addField: addFieldMock, | ||
setLoadUrlFromFilters: jest.fn(), | ||
})); | ||
|
||
const initialState = { | ||
offerSearch: { | ||
searchValue: "searchValue", | ||
jobDuration: [1, 2], | ||
fields: [], | ||
technologies: [], | ||
}, | ||
}; | ||
|
||
|
||
const wrapper = renderWithStoreAndTheme( | ||
<MemoryRouter initialEntries={["/"]}> | ||
<OfferWidget offer={offer} isPage={true} /> | ||
</MemoryRouter>, | ||
{ initialState, theme } | ||
); | ||
|
||
await fireEvent.click(wrapper.getByText("Back-End")); | ||
|
||
expect(mockHistoryPush).toHaveBeenCalledWith("/"); | ||
expect(addFieldMock).toHaveBeenCalledWith("BACKEND"); | ||
}); | ||
|
||
it("should update field filter and url if in search page", async () => { | ||
const addFieldWithUrlMock = jest.fn(); | ||
|
||
useChipsFieldSearch.mockImplementation(() => ({ | ||
addFieldWithUrl: addFieldWithUrlMock, | ||
})); | ||
|
||
const initialState = { | ||
offerSearch: { | ||
searchValue: "searchValue", | ||
jobDuration: [1, 2], | ||
fields: [], | ||
technologies: [], | ||
}, | ||
}; | ||
|
||
|
||
const wrapper = renderWithStoreAndTheme( | ||
<MemoryRouter initialEntries={["/"]}> | ||
<OfferWidget offer={offer} isPage={false} /> | ||
</MemoryRouter>, | ||
{ initialState, theme } | ||
); | ||
|
||
await fireEvent.click(wrapper.getByText("Back-End")); | ||
|
||
expect(addFieldWithUrlMock).toHaveBeenCalledWith("BACKEND"); | ||
}); | ||
|
||
it("should redirect and update techs filter state if in page", async () => { | ||
const addTechMock = jest.fn(); | ||
useChipsFieldSearch.mockImplementation(() => ({ | ||
addTech: addTechMock, | ||
setLoadUrlFromFilters: jest.fn(), | ||
})); | ||
|
||
const initialState = { | ||
offerSearch: { | ||
searchValue: "searchValue", | ||
jobDuration: [1, 2], | ||
fields: [], | ||
technologies: [], | ||
}, | ||
}; | ||
|
||
|
||
const wrapper = renderWithStoreAndTheme( | ||
<MemoryRouter initialEntries={["/"]}> | ||
<OfferWidget offer={offer} isPage={true} /> | ||
</MemoryRouter>, | ||
{ initialState, theme } | ||
); | ||
|
||
await fireEvent.click(wrapper.getByText("Cassandra")); | ||
|
||
expect(mockHistoryPush).toHaveBeenCalledWith("/"); | ||
expect(addTechMock).toHaveBeenCalledWith("Cassandra"); | ||
}); | ||
|
||
it("should update techs filter and url if in search page", async () => { | ||
const addTechWithUrlMock = jest.fn(); | ||
|
||
useChipsFieldSearch.mockImplementation(() => ({ | ||
addTechWithUrl: addTechWithUrlMock, | ||
})); | ||
|
||
const initialState = { | ||
offerSearch: { | ||
searchValue: "searchValue", | ||
jobDuration: [1, 2], | ||
fields: [], | ||
technologies: [], | ||
}, | ||
}; | ||
|
||
|
||
const wrapper = renderWithStoreAndTheme( | ||
<MemoryRouter initialEntries={["/"]}> | ||
<OfferWidget offer={offer} isPage={false} /> | ||
</MemoryRouter>, | ||
{ initialState, theme } | ||
); | ||
|
||
await fireEvent.click(wrapper.getByText("Cassandra")); | ||
|
||
expect(addTechWithUrlMock).toHaveBeenCalledWith("Cassandra"); | ||
}); | ||
}); |
71 changes: 71 additions & 0 deletions
71
src/components/HomePage/SearchResultsArea/Offer/useChipsFieldSearch.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
import { useCallback, useEffect, useState } from "react"; | ||
import { useDispatch, useSelector } from "react-redux"; | ||
import { setFields, setTechs, setLoadUrlFromFilters } from "../../../../actions/searchOffersActions"; | ||
|
||
import useSearchParams from "../../SearchArea/useUrlSearchParams"; | ||
import { SearchResultsConstants } from "../SearchResultsWidget/SearchResultsUtils"; | ||
import useOffersSearcher from "../SearchResultsWidget/useOffersSearcher"; | ||
|
||
export default () => { | ||
const dispatch = useDispatch(); | ||
const fields = useSelector((state) => state.offerSearch.fields); | ||
const techs = useSelector((state) => state.offerSearch.technologies); | ||
const jobMaxDuration = useSelector((state) => state.offerSearch.jobMaxDuration); | ||
const jobMinDuration = useSelector((state) => state.offerSearch.jobMinDuration); | ||
const jobType = useSelector((state) => state.offerSearch.jobType); | ||
const searchValue = useSelector((state) => state.offerSearch.searchValue); | ||
|
||
const [search, setSearch] = useState(false); | ||
|
||
const { search: searchOffers } = useOffersSearcher({ | ||
value: searchValue, | ||
jobMinDuration, | ||
jobMaxDuration, | ||
jobType, | ||
fields, | ||
technologies: techs, | ||
}); | ||
|
||
const addField = useCallback((value) => dispatch(setFields([...fields, value])), [dispatch, fields]); | ||
const addTech = useCallback((value) => dispatch(setTechs([...techs, value])), [dispatch, techs]); | ||
|
||
const { | ||
setFields: urlSetFields, | ||
setTechs: urlSetTechs, | ||
} = useSearchParams({ | ||
setFields: (value) => dispatch(setFields(value)), | ||
setTechs: (value) => dispatch(setTechs(value)), | ||
}); | ||
|
||
const addFieldWithUrl = useCallback((value) => { | ||
/* istanbul ignore else */ | ||
if (!fields.includes(value)) { | ||
urlSetFields([...fields, value]); | ||
setSearch(true); | ||
} | ||
}, [fields, urlSetFields]); | ||
|
||
const addTechWithUrl = useCallback((value) => { | ||
/* istanbul ignore else */ | ||
if (!techs.includes(value)) { | ||
urlSetTechs([...techs, value]); | ||
setSearch(true); | ||
} | ||
}, [techs, urlSetTechs]); | ||
|
||
useEffect(() => { | ||
/* istanbul ignore else */ | ||
if (search) { | ||
searchOffers(SearchResultsConstants.INITIAL_LIMIT); | ||
setSearch(false); | ||
} | ||
}, [searchOffers, fields, techs, search]); | ||
|
||
return { | ||
addField, | ||
addTech, | ||
addFieldWithUrl, | ||
addTechWithUrl, | ||
setLoadUrlFromFilters: (value) => dispatch(setLoadUrlFromFilters(value)), | ||
}; | ||
}; |
104 changes: 104 additions & 0 deletions
104
src/components/HomePage/SearchResultsArea/Offer/useChipsFieldSearch.spec.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
/* eslint-disable react-hooks/rules-of-hooks */ | ||
import { MemoryRouter, useLocation } from "react-router-dom"; | ||
import qs from "qs"; | ||
|
||
import { testHookWithStoreAndTheme } from "../../../../test-utils"; | ||
import { act } from "react-dom/test-utils"; | ||
import useChipsFieldSearch from "./useChipsFieldSearch"; | ||
import { createTheme } from "@material-ui/core"; | ||
|
||
describe("useChipsFieldSearch", () => { | ||
const theme = createTheme({}); | ||
|
||
it("should change fields's search param when adding fields", async () => { | ||
let addFieldWithUrl, location; | ||
const initialState = { | ||
offerSearch: { | ||
searchValue: "searchValue", | ||
jobDuration: [1, 2], | ||
fields: [], | ||
technologies: [], | ||
}, | ||
}; | ||
|
||
const callback = () => { | ||
addFieldWithUrl = useChipsFieldSearch().addFieldWithUrl; | ||
|
||
location = useLocation(); | ||
}; | ||
|
||
testHookWithStoreAndTheme(callback, initialState, theme, MemoryRouter); | ||
|
||
expect(location).toHaveProperty("search", ""); | ||
|
||
await act(() => { | ||
addFieldWithUrl("TEST-FIELD"); | ||
}); | ||
|
||
let expectedLocationSearch = `?${qs.stringify({ | ||
fields: ["TEST-FIELD"], | ||
}, { skipNulls: true, arrayFormat: "brackets" })}`; | ||
|
||
expect(location).toHaveProperty("search", expectedLocationSearch); | ||
|
||
// Wait for state update | ||
await new Promise((r) => setTimeout(r, 500)); | ||
|
||
await act(() => { | ||
addFieldWithUrl("TEST-FIELD-2"); | ||
}); | ||
|
||
expectedLocationSearch = `?${qs.stringify({ | ||
fields: ["TEST-FIELD", "TEST-FIELD-2"], | ||
}, { skipNulls: true, arrayFormat: "brackets" })}`; | ||
|
||
expect(location).toHaveProperty("search", expectedLocationSearch); | ||
}); | ||
|
||
it("should change technologies's search param when adding fields", async () => { | ||
let addTechWithUrl, location; | ||
const initialState = { | ||
offerSearch: { | ||
searchValue: "searchValue", | ||
jobDuration: [1, 2], | ||
fields: [], | ||
technologies: [], | ||
}, | ||
}; | ||
|
||
const callback = () => { | ||
addTechWithUrl = useChipsFieldSearch().addTechWithUrl; | ||
|
||
location = useLocation(); | ||
}; | ||
|
||
testHookWithStoreAndTheme(callback, initialState, theme, MemoryRouter, { initialEntries: ["/"] }); | ||
|
||
|
||
expect(location).toHaveProperty("search", ""); | ||
|
||
await act(() => { | ||
addTechWithUrl("TEST-TECH"); | ||
}); | ||
|
||
let expectedLocationSearch = `?${qs.stringify({ | ||
technologies: ["TEST-TECH"], | ||
}, { skipNulls: true, arrayFormat: "brackets" })}`; | ||
|
||
expect(location).toHaveProperty("search", expectedLocationSearch); | ||
|
||
// Wait for state update | ||
await new Promise((r) => setTimeout(r, 500)); | ||
|
||
await act(() => { | ||
addTechWithUrl("TEST-TECH-2"); | ||
}); | ||
|
||
expectedLocationSearch = `?${qs.stringify({ | ||
technologies: ["TEST-TECH", "TEST-TECH-2"], | ||
}, { skipNulls: true, arrayFormat: "brackets" })}`; | ||
|
||
expect(location).toHaveProperty("search", expectedLocationSearch); | ||
}); | ||
|
||
}); |
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
export const INITIAL_API_HOSTNAME = process.env.REACT_APP_API_HOSTNAME || "http://localhost:8087"; | ||
export const INITIAL_LOCATION_SERVICE_HOSTNAME = process.env.REACT_APP_LOCATION_SERVICE_HOSTNAME || "https://ni.fe.up.pt/nijobs/locations"; | ||
|
||
const locallyStoredAPIHostname = localStorage.getItem("devTools.API_HOSTNAME"); | ||
const locallyStoredLocationServiceHostname = localStorage.getItem("devTools.LOCATION_SERVICE_HOSTNAME"); | ||
|
||
export default { | ||
API_HOSTNAME: locallyStoredAPIHostname || INITIAL_API_HOSTNAME, | ||
LOCATION_SERVICE_HOSTNAME: locallyStoredLocationServiceHostname || INITIAL_LOCATION_SERVICE_HOSTNAME, | ||
}; |
Oops, something went wrong.