-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintcache
1 lines (1 loc) · 29.8 KB
/
.eslintcache
1
[{"/Users/johnabounassar/Bootcamp/WorkFolder/Challenges/module06-weatherApp/src/index.js":"1","/Users/johnabounassar/Bootcamp/WorkFolder/Challenges/module06-weatherApp/src/App.js":"2","/Users/johnabounassar/Bootcamp/WorkFolder/Challenges/module06-weatherApp/src/contexts/index.js":"3","/Users/johnabounassar/Bootcamp/WorkFolder/Challenges/module06-weatherApp/src/components/Today/index.js":"4","/Users/johnabounassar/Bootcamp/WorkFolder/Challenges/module06-weatherApp/src/components/Navbar/index.js":"5","/Users/johnabounassar/Bootcamp/WorkFolder/Challenges/module06-weatherApp/src/components/Forecast/index.js":"6","/Users/johnabounassar/Bootcamp/WorkFolder/Challenges/module06-weatherApp/src/components/Table/index.js":"7","/Users/johnabounassar/Bootcamp/WorkFolder/Challenges/module06-weatherApp/src/utils/actions.js":"8","/Users/johnabounassar/Bootcamp/WorkFolder/Challenges/module06-weatherApp/src/utils/reducers.js":"9","/Users/johnabounassar/Bootcamp/WorkFolder/Challenges/module06-weatherApp/src/utils/helpers.js":"10","/Users/johnabounassar/Bootcamp/WorkFolder/Challenges/module06-weatherApp/src/components/Icon/index.js":"11","/Users/johnabounassar/Bootcamp/WorkFolder/Challenges/module06-weatherApp/src/components/ForecastCard/index.js":"12"},{"size":215,"mtime":1680726231698,"results":"13","hashOfConfig":"14"},{"size":588,"mtime":1681440410438,"results":"15","hashOfConfig":"14"},{"size":693,"mtime":1681440410440,"results":"16","hashOfConfig":"14"},{"size":5265,"mtime":1681494493843,"results":"17","hashOfConfig":"14"},{"size":3909,"mtime":1683132107054,"results":"18","hashOfConfig":"14"},{"size":2682,"mtime":1681488436494,"results":"19","hashOfConfig":"14"},{"size":11718,"mtime":1681495545209,"results":"20","hashOfConfig":"14"},{"size":454,"mtime":1681440410440,"results":"21","hashOfConfig":"14"},{"size":1117,"mtime":1681440410440,"results":"22","hashOfConfig":"14"},{"size":644,"mtime":1681440410440,"results":"23","hashOfConfig":"14"},{"size":2492,"mtime":1681440410438,"results":"24","hashOfConfig":"14"},{"size":2285,"mtime":1681494953430,"results":"25","hashOfConfig":"14"},{"filePath":"26","messages":"27","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1xl656i",{"filePath":"28","messages":"29","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"30","messages":"31","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"32","messages":"33","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"34"},{"filePath":"35","messages":"36","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"37","messages":"38","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"39"},{"filePath":"40","messages":"41","errorCount":0,"fatalErrorCount":0,"warningCount":6,"fixableErrorCount":0,"fixableWarningCount":0,"source":"42"},{"filePath":"43","messages":"44","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"45","messages":"46","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"47","messages":"48","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"49","messages":"50","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"51"},{"filePath":"52","messages":"53","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/johnabounassar/Bootcamp/WorkFolder/Challenges/module06-weatherApp/src/index.js",[],"/Users/johnabounassar/Bootcamp/WorkFolder/Challenges/module06-weatherApp/src/App.js",[],"/Users/johnabounassar/Bootcamp/WorkFolder/Challenges/module06-weatherApp/src/contexts/index.js",[],"/Users/johnabounassar/Bootcamp/WorkFolder/Challenges/module06-weatherApp/src/components/Today/index.js",["54","55"],"import React, {useEffect} from 'react';\nimport {useWeatherContext} from '../../contexts';\nimport {TODAYS_WEATHER, SET_TIMEZONE} from '../../utils/actions';\nimport Icon from '../Icon';\nimport Card from '@mui/material/Card';\nimport CardContent from '@mui/material/CardContent';\nimport Typography from '@mui/material/Typography';\nimport { timezoneMap } from '../../utils/helpers';\nimport { useMediaQuery } from '@mui/material';\nimport './style.css';\n\nexport default function Today() {\n const [state, dispatch] = useWeatherContext();\n const { geoCoordinates, todaysWeather, currentCity, timezone } = state;\n\n const isMediumScreen = useMediaQuery('(max-height:895px)');\n\n const formatTimeData = ( data ) => {\n // Conver the unix UTC time to the local time of the city using the unix timezone offset\n const milliseconds = data.dt * 1000;\n const offset = data.timezone * 1000;\n const timezoneString = timezoneMap[data.timezone.toString()];\n const dateObject = new Date(milliseconds);\n\n // Format the time to be displayed as a timestamp in the format of 'Fri Apr 14 2023 02:00:00 GMT-0400 (Eastern Daylight Time)'\n const formattedTime = dateObject.toString().split(' ').slice(0, 5).join(' ') + ' ' + timezoneString;\n\n // Update the data.dt with the new formatted time\n data.dt = formattedTime;\n \n // Update the state with the current city's timezone\n dispatch({\n type: SET_TIMEZONE,\n timezone: timezoneString\n });\n\n return data;\n }\n\n const formatDate = () => {\n // Format the date to be displayed as a timestamp in the format of 'MM/DD'\n const formattedDate = todaysWeather.dt ? todaysWeather.dt.split(' ').slice(1, 3).join(' ') : '00/00';\n return formattedDate;\n }\n\n const getCityForecast = async () => {\n const queryString = 'https://api.openweathermap.org/data/2.5/weather?lat=' + geoCoordinates.lat + '&lon=' + geoCoordinates.lon + '&appid=5d82752b5eec77e02284baee59150776';\n const response = await fetch(queryString);\n if (response.ok) {\n let data = await response.json();\n data = formatTimeData(data);\n console.log('Todays Data:')\n console.log(data);\n\n // Update the state with the current city's forecast\n dispatch({\n type: TODAYS_WEATHER,\n todaysWeather: data\n });\n\n } else {\n console.log('Error: ' + response.statusText);\n }\n };\n\n useEffect(() => {\n if (geoCoordinates) {\n getCityForecast();\n }\n }, [geoCoordinates]);\n\n const formatTemp = (temp) => {\n return Math.floor(temp - 273.15) + '°C';\n }\n\n return (\n <div className='main-container'>\n <Card sx={{\n width: '90%',\n backgroundColor: 'rgba(40, 86, 163, 0.3)',\n borderRadius: '1em',\n color: 'white',\n }}>\n <CardContent\n sx={{\n component: 'img',\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n paddingBottom: '0',\n }}\n > \n <Typography \n sx={{\n fontSize: isMediumScreen ? '1em' : '1.2em', \n display: 'flex', \n flexDirection: 'column', \n lineHeight: isMediumScreen ? '1em' : '1.1em', \n alignItems: 'center'\n }}\n gutterBottom \n variant=\"h6\" \n component=\"div\">\n {formatDate()}\n </Typography>\n <Typography \n variant=\"body1\" \n sx={{\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n fontSize: isMediumScreen ? '3em' : '4em',\n lineHeight: isMediumScreen ? '1.1em' : '1.3em'\n }}\n >\n {(todaysWeather.main===undefined) ? Math.floor(273.15) + '°C' : formatTemp(todaysWeather?.main?.temp)}\n </Typography>\n <Typography\n variant=\"body1\"\n sx={{\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n fontSize: isMediumScreen ? '1em' : '1.2em',\n lineHeight: isMediumScreen ? '.9em' : '1.1em'\n }}\n >\n {todaysWeather.weather ? todaysWeather.weather[0].description : 'No Data'}\n </Typography>\n <div className='today-low-high'>\n <p>\n {(todaysWeather.main===undefined) ? Math.floor(273.15) + '°C' : 'Low: ' + formatTemp(todaysWeather?.main?.temp_min)}\n </p>\n <p>\n {(todaysWeather.main===undefined) ? Math.floor(273.15) + '°C' : 'High: ' + formatTemp(todaysWeather?.main?.temp_max)}\n </p>\n </div>\n </CardContent>\n <Icon icon={todaysWeather.weather ? todaysWeather.weather[0].icon : '01d'} height={isMediumScreen ? '125px' : '160px'} width={isMediumScreen ? '140px' : '175px'} />\n <CardContent sx={{paddingTop: '0'}}>\n <div className='title-container'>\n <p className='title'>{currentCity}</p>\n <p className='timezone'>{timezone}</p>\n </div>\n </CardContent>\n </Card> \n </div> \n );\n}","/Users/johnabounassar/Bootcamp/WorkFolder/Challenges/module06-weatherApp/src/components/Navbar/index.js",[],"/Users/johnabounassar/Bootcamp/WorkFolder/Challenges/module06-weatherApp/src/components/Forecast/index.js",["56"],"import React, { useEffect } from 'react';\nimport ForecastCard from '../ForecastCard';\nimport { useWeatherContext } from '../../contexts';\nimport { FIVE_DAY_FORECAST } from '../../utils/actions';\nimport { timezoneMap } from '../../utils/helpers';\nimport './style.css';\n\nexport default function Forecast() {\n const [state, dispatch] = useWeatherContext();\n const { geoCoordinates } = state;\n\n const formatTimeData = (data) => {\n // Conver the unix UTC time to the local time of the city using the unix timezone offset\n for (let i=0; i < data.list.length; i++) {\n console.log('data.city.timezone: ' + data.city.timezone);\n const time = data.list[i];\n const milliseconds = time.dt * 1000;\n // const offset = data.city.timezone * 1000;\n const timezoneString = timezoneMap[data.city.timezone.toString()];\n const dateObject = new Date(milliseconds);\n\n // Format the time to be displayed as a timestamp in the format of 'Fri Apr 14 2023 02:00:00 GMT-0400 (Eastern Daylight Time)'\n const formattedTime = dateObject.toString().split(' ').slice(0, 5).join(' ') + ' ' + timezoneString;\n\n // Update the data.dt with the new formatted time\n time.dt = formattedTime;\n }\n\n return data;\n }\n\n\n const getCityForecast = async () => {\n let queryString = \"https://api.openweathermap.org/data/2.5/forecast?lat=\" + geoCoordinates.lat + \"&lon=\" + geoCoordinates.lon + \"&appid=5d82752b5eec77e02284baee59150776\";\n const response = await fetch(queryString);\n if (response.ok) {\n let data = await response.json();\n // Convert the UTC time to EST time\n for (let i = 0; i < data.list.length; i++) {\n let date = new Date(data.list[i].dt_txt);\n date.setHours(date.getHours() - 4);\n data.list[i].dt_txt = date;\n }\n console.log('Forecast Data:')\n console.log(data);\n\n data = formatTimeData(data);\n\n // Update the state with the current city's forecast\n dispatch({\n type: FIVE_DAY_FORECAST,\n fiveDayForecast: data.list\n });\n\n } else {\n console.log('Error: ' + response.statusText);\n }\n };\n\n useEffect(() => {\n if (geoCoordinates) {\n getCityForecast();\n console.log(state);\n console.log(state.fiveDayForecast);\n\n }\n }, [geoCoordinates]);\n\n // const detailedForecast = state.fiveDayForecast.splice(0, 16);\n const twoDayForecast = state.fiveDayForecast.slice(0, 16);\n\n return (\n <div className='forecast-container'>\n {(state.fiveDayForecast !== []) ? \n twoDayForecast.map((day, index) => (\n <ForecastCard day={day} key={index} />\n ))\n :\n <h1>Loading...</h1>\n }\n </div>\n );\n}","/Users/johnabounassar/Bootcamp/WorkFolder/Challenges/module06-weatherApp/src/components/Table/index.js",["57","58","59","60","61","62"],"import React, {useEffect} from 'react';\nimport Table from '@mui/material/Table';\nimport TableBody from '@mui/material/TableBody';\nimport TableCell from '@mui/material/TableCell';\nimport TableHead from '@mui/material/TableHead';\nimport TableRow from '@mui/material/TableRow';\nimport { useWeatherContext } from '../../contexts';\nimport { useMediaQuery } from '@mui/material';\nimport Icon from '../Icon';\nimport './style.css';\n\n\nexport default function DenseTable() {\n const [state, dispatch] = useWeatherContext();\n const { fiveDayForecast, summarizedFiveDayForecast } = state;\n\n const isMediumScreen = useMediaQuery('(max-height:895px)');\n\n const summarizedData = [];\n\n // create a function to summarize the fiveDayForecast data and return an array of objects. One object for each day.\n // Each object should contain the date, the temperature at midday - 12PM and the min/max temperatures expecgted throughout the day, the humidity, and the wind speed.\n const summarizeForecast = () => {\n if (fiveDayForecast.length > 0) {\n // Create an array to store the summarized data and arrays to hold data for each day. \n const day1 = [];\n const day2 = [];\n const day3 = [];\n const day4 = [];\n const day5 = [];\n\n // Loop through the fiveDayForecast array and push each item into the appropriate day array.\n fiveDayForecast.forEach((item) => {\n const date = new Date(item.dt_txt);\n const today = new Date();\n // find the difference between the number of days of the current day and the day of the forecast\n const difference = date.getDate() - today.getDate();\n // Have a switch statement to specifify which array to push the item into based on the difference.\n switch (difference) {\n case 0:\n day1.push(item);\n break;\n case 1:\n day2.push(item);\n break;\n case 2:\n day3.push(item);\n break;\n case 3:\n day4.push(item);\n break;\n case 4:\n day5.push(item);\n break;\n default:\n break;\n }\n });\n\n // For each day, summarize the data. This should contain data from midday (b/w 1-3PM) for the temp, humidity, and wind speed. It should also contain the min/max temp for the day.\n const day1Summary = day1.filter((item) => {\n let dateText = item.dt_txt.toString();\n const currentTime = new Date().getHours();\n const endGoalTime = currentTime + 3;\n // if the current time is greater than 12, then we need to filter the data to only include the next 3 hours.\n if (currentTime >= 12) {\n switch (true) {\n case dateText.includes(`${endGoalTime}:00:00`):\n case dateText.includes(`${endGoalTime - 1}:00:00`):\n case dateText.includes(`${endGoalTime - 2}:00:00`):\n return item;\n default:\n break;\n }\n } else { // if the current time is less than 12, then we need to filter the data to only include mid-day data (1-3PM)\n switch (true) {\n case dateText.includes('13:00:00'):\n case dateText.includes('14:00:00'):\n case dateText.includes('15:00:00'):\n return item;\n default:\n break;\n }\n }\n })\n const day2Summary = day2.filter((item) => {\n let dateText = item.dt_txt.toString();\n if (dateText.includes('13:00:00') || dateText.includes('14:00:00') || dateText.includes('15:00:00')) {\n return item;\n }\n })\n const day3Summary = day3.filter((item) => {\n let dateText = item.dt_txt.toString();\n if (dateText.includes('13:00:00') || dateText.includes('14:00:00') || dateText.includes('15:00:00')) {\n return item;\n }\n })\n const day4Summary = day4.filter((item) => {\n let dateText = item.dt_txt.toString();\n if (dateText.includes('13:00:00') || dateText.includes('14:00:00') || dateText.includes('15:00:00')) {\n return item;\n }\n })\n const day5Summary = day5.filter((item) => {\n let dateText = item.dt_txt.toString();\n if (dateText.includes('13:00:00') || dateText.includes('14:00:00') || dateText.includes('15:00:00')) {\n return item;\n }\n })\n\n // Loop through each day array and find the min/max temp for each day.\n const day1Min = day1.reduce((min, item) => {\n return item.main.temp_min < min ? item.main.temp_min : min;\n }\n , day1[0].main.temp_min);\n const day1Max = day1.reduce((max, item) => {\n return item.main.temp_max > max ? item.main.temp_max : max;\n }\n , day1[0].main.temp_max);\n const day2Min = day2.reduce((min, item) => {\n return item.main.temp_min < min ? item.main.temp_min : min;\n }\n , day2[0].main.temp_min);\n const day2Max = day2.reduce((max, item) => {\n return item.main.temp_max > max ? item.main.temp_max : max;\n }\n , day2[0].main.temp_max);\n const day3Min = day3.reduce((min, item) => {\n return item.main.temp_min < min ? item.main.temp_min : min;\n }\n , day3[0].main.temp_min);\n const day3Max = day3.reduce((max, item) => {\n return item.main.temp_max > max ? item.main.temp_max : max;\n }\n , day3[0].main.temp_max);\n const day4Min = day4.reduce((min, item) => {\n return item.main.temp_min < min ? item.main.temp_min : min;\n }\n , day4[0].main.temp_min);\n\n const day4Max = day4.reduce((max, item) => {\n return item.main.temp_max > max ? item.main.temp_max : max;\n }\n , day4[0].main.temp_max);\n const day5Min = day5.reduce((min, item) => {\n return item.main.temp_min < min ? item.main.temp_min : min;\n }\n , day5[0].main.temp_min);\n const day5Max = day5.reduce((max, item) => {\n return item.main.temp_max > max ? item.main.temp_max : max;\n }\n , day5[0].main.temp_max);\n \n // Update the daily summaries with the min/max temp for that day.\n day1Summary[0].main.temp_min = day1Min;\n day1Summary[0].main.temp_max = day1Max;\n day2Summary[0].main.temp_min = day2Min;\n day2Summary[0].main.temp_max = day2Max;\n day3Summary[0].main.temp_min = day3Min;\n day3Summary[0].main.temp_max = day3Max;\n day4Summary[0].main.temp_min = day4Min;\n day4Summary[0].main.temp_max = day4Max;\n day5Summary[0].main.temp_min = day5Min;\n day5Summary[0].main.temp_max = day5Max;\n\n // Push the daily summaries to the summarizedData array.\n summarizedData.push(day1Summary);\n summarizedData.push(day2Summary);\n summarizedData.push(day3Summary);\n summarizedData.push(day4Summary);\n summarizedData.push(day5Summary);\n\n console.log('summarizedData: ')\n console.log(summarizedData);\n\n const test = summarizedData.map((item) => {\n return formatTemp(item[0].main.temp_min);\n })\n console.log('test: ', test);\n\n return summarizedData;\n }\n };\n\n const formatDate = (date) => {\n const currentDate = new Date();\n const currentDay = currentDate.getDay();\n // If the current date entered is today, return 'Today'\n if (date.getDay() === currentDay) {\n return 'Today';\n }\n else {\n const dateText = date.toString();\n const dateArray = dateText.split(' ');\n const day = dateArray[0];\n return day;\n }\n }\n\n const formatTemp = (temp) => {\n return Math.floor(temp -273) + '°C';\n }\n\n useEffect(() => {\n const summarizedForecast = summarizeForecast();\n console.log('summarizedForecast: ', summarizedForecast)\n console.log('summarizedFiveDayForecast: ', summarizedFiveDayForecast)\n dispatch({\n type: 'SET_SUMMARIZED_FORECAST',\n summarizedFiveDayForecast: summarizedForecast\n })\n console.log('summarizedFiveDayForecast', summarizedFiveDayForecast)\n }, [fiveDayForecast])\n \n if (fiveDayForecast[0]?.main === undefined || summarizedFiveDayForecast === undefined) {\n return (\n <div className='loading-container'>\n <h1>Loading...</h1>\n </div>\n )\n } else {\n return (\n <div className='table-forecast'>\n <div className='table-margin'>\n <Table sx={{\n backgroundColor: 'rgba(40, 86, 163, 0.3)', \n borderRadius: '1em',\n }} \n size=\"small\" \n aria-label=\"a dense table\">\n <TableHead>\n <TableRow>\n <TableCell sx={{color: 'white', borderBottom: 'none', fontSize: isMediumScreen ? '.85rem' :'1em', fontWeight: isMediumScreen ? '300' :'400'}}>Date</TableCell>\n <TableCell sx={{color: 'white', borderBottom: 'none'}}> </TableCell>\n <TableCell className=\"no-border\" sx={{color: 'white', borderBottom: 'none', fontSize: isMediumScreen ? '.85rem' :'1em', fontWeight: isMediumScreen ? '300' :'400'}} align=\"center\">Low °C</TableCell>\n <TableCell className=\"no-border\" sx={{color: 'white', borderBottom: 'none', fontSize: isMediumScreen ? '.85rem' :'1em', fontWeight: isMediumScreen ? '300' :'400'}} align=\"center\">High °C</TableCell>\n <TableCell className=\"no-border\" sx={{color: 'white', borderBottom: 'none', fontSize: isMediumScreen ? '.85rem' :'1em', fontWeight: isMediumScreen ? '300' :'400'}} align=\"center\">Wind (m/s)</TableCell>\n <TableCell className=\"no-border\" sx={{color: 'white', borderBottom: 'none', fontSize: isMediumScreen ? '.85rem' :'1em', fontWeight: isMediumScreen ? '300' :'400'}} align=\"center\">Humidity %</TableCell>\n </TableRow>\n </TableHead>\n <TableBody sx={{color: 'white', borderBottom: 'none'}}>\n {summarizedFiveDayForecast.map((row, index) => (\n <TableRow\n key={index}\n sx={{ '&:last-child td, &:last-child th': { border: 0 } }}\n >\n <TableCell sx={{color: 'white', borderBottom: 'none', fontSize: isMediumScreen ? '.75rem' :'.9em', fontWeight: isMediumScreen ? '200' :'300'}} component=\"th\" scope=\"row\">\n {formatDate(row[0].dt_txt)}\n </TableCell>\n <TableCell className=\"no-border\" sx={{color: 'white', borderBottom: 'none', fontSize: isMediumScreen ? '.75rem' :'.9em', fontWeight: isMediumScreen ? '200' :'300'}} align='center'><Icon icon={row[0].weather[0].icon} height={isMediumScreen ? '20px' : '25px'} width={isMediumScreen ? '25px' : '30px'}/></TableCell>\n <TableCell className=\"no-border\" sx={{color: 'white', borderBottom: 'none', fontSize: isMediumScreen ? '.75rem' :'.9em', fontWeight: isMediumScreen ? '200' :'300'}} align=\"center\">{formatTemp(row[0].main.temp_min)}</TableCell>\n <TableCell className=\"no-border\" sx={{color: 'white', borderBottom: 'none', fontSize: isMediumScreen ? '.75rem' :'.9em', fontWeight: isMediumScreen ? '200' :'300'}} align=\"center\">{formatTemp(row[0].main.temp_max)}</TableCell>\n <TableCell className=\"no-border\" sx={{color: 'white', borderBottom: 'none', fontSize: isMediumScreen ? '.75rem' :'.9em', fontWeight: isMediumScreen ? '200' :'300'}} align=\"center\">{row[0].wind.speed}</TableCell>\n <TableCell className=\"no-border\" sx={{color: 'white', borderBottom: 'none', fontSize: isMediumScreen ? '.75rem' :'.9em', fontWeight: isMediumScreen ? '200' :'300'}} align=\"center\">{row[0].main.humidity}</TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n </div>\n </div>\n );\n }\n}","/Users/johnabounassar/Bootcamp/WorkFolder/Challenges/module06-weatherApp/src/utils/actions.js",[],"/Users/johnabounassar/Bootcamp/WorkFolder/Challenges/module06-weatherApp/src/utils/reducers.js",[],"/Users/johnabounassar/Bootcamp/WorkFolder/Challenges/module06-weatherApp/src/utils/helpers.js",[],"/Users/johnabounassar/Bootcamp/WorkFolder/Challenges/module06-weatherApp/src/components/Icon/index.js",["63"],"import React from 'react';\nimport { CardMedia } from '@mui/material';\nimport sunny from '../../assets/images/icons/01d.png';\nimport night from '../../assets/images/icons/01n.png';\nimport sunCloudy from '../../assets/images/icons/02d.png';\nimport cloudSunny from '../../assets/images/icons/03d.png';\nimport cloudNight from '../../assets/images/icons/03n.png';\nimport cloudy from '../../assets/images/icons/04d.png';\nimport cloudy2 from '../../assets/images/icons/04n.png';\nimport rain from '../../assets/images/icons/09d.png';\nimport rain2 from '../../assets/images/icons/09n.png';\nimport rain3 from '../../assets/images/icons/10d.png';\nimport rain4 from '../../assets/images/icons/10n.png';\nimport storm from '../../assets/images/icons/11d.png';\nimport storm2 from '../../assets/images/icons/11n.png';\nimport snow from '../../assets/images/icons/13d.png';\nimport snow2 from '../../assets/images/icons/13n.png';\nimport windy from '../../assets/images/icons/50d.png';\nimport windy2 from '../../assets/images/icons/50n.png';\nimport { useWeatherContext } from '../../contexts';\nimport './style.css';\n\nexport default function Icon ( {icon, height, width} ) {\n const [state, dispatch] = useWeatherContext();\n const {fiveDayForecast, summarizedFiveDayForecast, todaysWeather} = state;\n\n const getIcon = () => {\n if (fiveDayForecast !== undefined || summarizedFiveDayForecast !== undefined || todaysWeather !== undefined) { \n switch (icon) {\n case '01d':\n return sunny;\n case '01n':\n return night;\n case '02d':\n return sunCloudy;\n case '02n':\n return sunCloudy;\n case '03d':\n return cloudSunny;\n case '03n':\n return cloudNight;\n case '04d':\n return cloudy;\n case '04n':\n return cloudy2;\n case '09d':\n return rain;\n case '09n':\n return rain2;\n case '10d':\n return rain3;\n case '10n':\n return rain4;\n case '11d':\n return storm;\n case '11n':\n return storm2;\n case '13d':\n return snow;\n case '13n':\n return snow2;\n case '50d':\n return windy;\n case '50n':\n return windy2;\n default:\n return sunny;\n }\n }\n };\n\n return (\n <div className='icon-container'>\n <CardMedia\n sx={{ width: width, margin: '0 auto'}}\n component=\"img\"\n height={height}\n image={getIcon()}\n alt=\"weather icon\"\n />\n </div>\n );\n}","/Users/johnabounassar/Bootcamp/WorkFolder/Challenges/module06-weatherApp/src/components/ForecastCard/index.js",[],{"ruleId":"64","severity":1,"message":"65","line":21,"column":11,"nodeType":"66","messageId":"67","endLine":21,"endColumn":17},{"ruleId":"68","severity":1,"message":"69","line":70,"column":6,"nodeType":"70","endLine":70,"endColumn":22,"suggestions":"71"},{"ruleId":"68","severity":1,"message":"72","line":67,"column":6,"nodeType":"70","endLine":67,"endColumn":22,"suggestions":"73"},{"ruleId":"74","severity":1,"message":"75","line":61,"column":46,"nodeType":"76","messageId":"77","endLine":61,"endColumn":48},{"ruleId":"74","severity":1,"message":"75","line":86,"column":46,"nodeType":"76","messageId":"77","endLine":86,"endColumn":48},{"ruleId":"74","severity":1,"message":"75","line":92,"column":46,"nodeType":"76","messageId":"77","endLine":92,"endColumn":48},{"ruleId":"74","severity":1,"message":"75","line":98,"column":46,"nodeType":"76","messageId":"77","endLine":98,"endColumn":48},{"ruleId":"74","severity":1,"message":"75","line":104,"column":46,"nodeType":"76","messageId":"77","endLine":104,"endColumn":48},{"ruleId":"68","severity":1,"message":"78","line":213,"column":6,"nodeType":"70","endLine":213,"endColumn":23,"suggestions":"79"},{"ruleId":"64","severity":1,"message":"80","line":24,"column":17,"nodeType":"66","messageId":"67","endLine":24,"endColumn":25},"no-unused-vars","'offset' is assigned a value but never used.","Identifier","unusedVar","react-hooks/exhaustive-deps","React Hook useEffect has a missing dependency: 'getCityForecast'. Either include it or remove the dependency array.","ArrayExpression",["81"],"React Hook useEffect has missing dependencies: 'getCityForecast' and 'state'. Either include them or remove the dependency array.",["82"],"array-callback-return","Array.prototype.filter() expects a value to be returned at the end of arrow function.","ArrowFunctionExpression","expectedAtEnd","React Hook useEffect has missing dependencies: 'dispatch', 'summarizeForecast', and 'summarizedFiveDayForecast'. Either include them or remove the dependency array.",["83"],"'dispatch' is assigned a value but never used.",{"desc":"84","fix":"85"},{"desc":"86","fix":"87"},{"desc":"88","fix":"89"},"Update the dependencies array to be: [geoCoordinates, getCityForecast]",{"range":"90","text":"91"},"Update the dependencies array to be: [geoCoordinates, getCityForecast, state]",{"range":"92","text":"93"},"Update the dependencies array to be: [dispatch, fiveDayForecast, summarizeForecast, summarizedFiveDayForecast]",{"range":"94","text":"95"},[2452,2468],"[geoCoordinates, getCityForecast]",[2278,2294],"[geoCoordinates, getCityForecast, state]",[8012,8029],"[dispatch, fiveDayForecast, summarizeForecast, summarizedFiveDayForecast]"]