Unverified Commit 037b78a5 authored by Florent Chehab's avatar Florent Chehab
Browse files

fix(front - univ info provider)

parent 963aa367
...@@ -10,18 +10,18 @@ import CountryService from "../../services/data/CountryService"; ...@@ -10,18 +10,18 @@ import CountryService from "../../services/data/CountryService";
function UnivInfoProvider({ univId, children }) { function UnivInfoProvider({ univId, children }) {
const univIdParsed = parseInt(univId, 10); const univIdParsed = parseInt(univId, 10);
const univ = UniversityService.getUniversityById(univIdParsed); const univ = UniversityService.getUniversityById(univIdParsed);
const country = CountryService.getCountryForCountryId(univ.country) const country = CountryService.getCountryForCountryId(univ.country);
const {city} = univ.city const { city } = univ;
const countryId = country.id; const countryId = country.id;
return ( return (
<UnivContext.Provider <UnivContext.Provider
value={{ value={{
univId: univIdParsed, univId: univIdParsed,
countryId, countryId,
univ, univ,
city, city,
country country
}} }}
> >
{children} {children}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment