-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintcache
1 lines (1 loc) · 21.6 KB
/
.eslintcache
1
[{"/Users/jadekang/Desktop/interviews/ruggable/instagram/src/index.js":"1","/Users/jadekang/Desktop/interviews/ruggable/instagram/src/reportWebVitals.js":"2","/Users/jadekang/Desktop/interviews/ruggable/instagram/src/App.js":"3","/Users/jadekang/Desktop/interviews/ruggable/instagram/src/constants/routes.js":"4","/Users/jadekang/Desktop/interviews/ruggable/instagram/src/theme/index.js":"5","/Users/jadekang/Desktop/interviews/ruggable/instagram/src/components/SignIn/index.jsx":"6","/Users/jadekang/Desktop/interviews/ruggable/instagram/src/components/Register/index.jsx":"7","/Users/jadekang/Desktop/interviews/ruggable/instagram/src/components/Landing/index.jsx":"8","/Users/jadekang/Desktop/interviews/ruggable/instagram/src/components/Profile/index.jsx":"9","/Users/jadekang/Desktop/interviews/ruggable/instagram/src/components/Footer/index.jsx":"10","/Users/jadekang/Desktop/interviews/ruggable/instagram/src/theme/typography.js":"11","/Users/jadekang/Desktop/interviews/ruggable/instagram/src/theme/palette.js":"12","/Users/jadekang/Desktop/interviews/ruggable/instagram/src/api.js":"13","/Users/jadekang/Desktop/interviews/ruggable/instagram/src/components/Profile/Navbar.jsx":"14","/Users/jadekang/Desktop/interviews/ruggable/instagram/src/components/Profile/Posts.jsx":"15","/Users/jadekang/Desktop/interviews/ruggable/instagram/src/components/Redirect/index.jsx":"16","/Users/jadekang/Desktop/interviews/ruggable/instagram/src/components/CTA/index.jsx":"17","/Users/jadekang/Desktop/interviews/ruggable/instagram/src/components/Custom/CustomField/index.jsx":"18","/Users/jadekang/Desktop/interviews/ruggable/instagram/src/components/Custom/CustomButton/index.jsx":"19"},{"size":500,"mtime":1610575249182,"results":"20","hashOfConfig":"21"},{"size":362,"mtime":1610575249184,"results":"22","hashOfConfig":"21"},{"size":2764,"mtime":1610735818906,"results":"23","hashOfConfig":"21"},{"size":149,"mtime":1610735818991,"results":"24","hashOfConfig":"21"},{"size":327,"mtime":1610735819001,"results":"25","hashOfConfig":"21"},{"size":6065,"mtime":1610738917947,"results":"26","hashOfConfig":"21"},{"size":7202,"mtime":1610737135285,"results":"27","hashOfConfig":"21"},{"size":1266,"mtime":1610735818919,"results":"28","hashOfConfig":"21"},{"size":5108,"mtime":1610735818934,"results":"29","hashOfConfig":"21"},{"size":4113,"mtime":1610735818918,"results":"30","hashOfConfig":"21"},{"size":1247,"mtime":1610735819006,"results":"31","hashOfConfig":"21"},{"size":391,"mtime":1610735819003,"results":"32","hashOfConfig":"21"},{"size":199,"mtime":1610739081724,"results":"33","hashOfConfig":"21"},{"size":3803,"mtime":1610735818932,"results":"34","hashOfConfig":"21"},{"size":864,"mtime":1610735818933,"results":"35","hashOfConfig":"21"},{"size":1063,"mtime":1610735818986,"results":"36","hashOfConfig":"21"},{"size":1725,"mtime":1610735818912,"results":"37","hashOfConfig":"21"},{"size":1894,"mtime":1610737126937,"results":"38","hashOfConfig":"21"},{"size":1133,"mtime":1610735818914,"results":"39","hashOfConfig":"21"},{"filePath":"40","messages":"41","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"42"},"1vuocao",{"filePath":"43","messages":"44","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"42"},{"filePath":"45","messages":"46","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"47","messages":"48","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"42"},{"filePath":"49","messages":"50","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"42"},{"filePath":"51","messages":"52","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"53","messages":"54","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"42"},{"filePath":"55","messages":"56","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"42"},{"filePath":"57","messages":"58","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"59","usedDeprecatedRules":"42"},{"filePath":"60","messages":"61","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"62","usedDeprecatedRules":"42"},{"filePath":"63","messages":"64","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"42"},{"filePath":"65","messages":"66","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"42"},{"filePath":"67","messages":"68","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"69","messages":"70","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"71","usedDeprecatedRules":"42"},{"filePath":"72","messages":"73","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"42"},{"filePath":"74","messages":"75","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"42"},{"filePath":"76","messages":"77","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"42"},{"filePath":"78","messages":"79","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"80","messages":"81","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"42"},"/Users/jadekang/Desktop/interviews/ruggable/instagram/src/index.js",[],["82","83"],"/Users/jadekang/Desktop/interviews/ruggable/instagram/src/reportWebVitals.js",[],"/Users/jadekang/Desktop/interviews/ruggable/instagram/src/App.js",["84"],"/Users/jadekang/Desktop/interviews/ruggable/instagram/src/constants/routes.js",[],"/Users/jadekang/Desktop/interviews/ruggable/instagram/src/theme/index.js",[],"/Users/jadekang/Desktop/interviews/ruggable/instagram/src/components/SignIn/index.jsx",[],"/Users/jadekang/Desktop/interviews/ruggable/instagram/src/components/Register/index.jsx",[],"/Users/jadekang/Desktop/interviews/ruggable/instagram/src/components/Landing/index.jsx",[],"/Users/jadekang/Desktop/interviews/ruggable/instagram/src/components/Profile/index.jsx",["85"],"import React, { useState, useEffect } from 'react';\nimport { Grid, Typography } from '@material-ui/core';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Navbar from './Navbar';\nimport clsx from 'clsx';\nimport SettingsOutlinedIcon from '@material-ui/icons/SettingsOutlined';\nimport Posts from './Posts';\nimport Portrait from './portrait.png';\nimport API from '../../api';\nimport * as ROUTES from '../../constants/routes';\nimport { useHistory } from 'react-router-dom';\nimport Footer from '../Footer';\n\nconst useStyles = makeStyles((theme) => ({\n main: {\n padding: theme.spacing(4, 20),\n background: theme.palette.primary.main,\n [theme.breakpoints.down('sm')]: {\n padding: theme.spacing(2, 0),\n },\n },\n profileCard: {\n [theme.breakpoints.down('sm')]: {\n padding: theme.spacing(1, 1),\n },\n },\n col1: {\n display: 'flex',\n justifyContent: 'center',\n },\n profilePhoto: {\n width: '150px',\n borderRadius: '50%',\n [theme.breakpoints.down('sm')]: {\n width: '77px',\n height: '77px',\n },\n },\n col2: {\n [theme.breakpoints.down('sm')]: {\n padding: theme.spacing(1, 2),\n },\n },\n edit: {\n display: 'block',\n padding: '5px 9px',\n background: 'transparent',\n border: '1px solid #dbdbdb',\n borderRadius: '4px',\n fontSize: '10px',\n fontWeight: 600,\n marginLeft: '20px',\n cursor: 'pointer',\n '&:focus': {\n border: '1px solid #dbdbdb',\n outline: 0,\n },\n '&:active': {\n border: '1px solid #dbdbdb',\n outline: 0,\n color: '#9b9b9b',\n },\n },\n userNameSection: {\n display: 'block',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n },\n userName: {\n fontWeight: 300,\n fontSize: '20px',\n lineHeight: '32px',\n },\n icon: {\n marginLeft: '20px',\n fontSize: '20px',\n cursor: 'pointer',\n },\n row1: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n },\n row2: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n listStyle: 'none',\n padding: 0,\n },\n activitySection: {\n display: 'block',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n marginRight: '40px',\n fontSize: '13px',\n cursor: 'pointer',\n },\n number: {\n fontWeight: 600,\n color: '#262626',\n },\n email: {\n fontWeight: 500,\n display: 'inline',\n },\n line: {\n borderBottom: '1px solid #dbdbdb',\n height: '1px',\n margin: '40px 0px 52px 0',\n },\n spacing: {\n paddingTop: '40px',\n },\n}));\n\nconst Profile = (props) => {\n const classes = useStyles();\n\n const [name, setName] = useState('');\n const [email, setEmail] = useState('');\n\n \n const history = useHistory();\n useEffect(() => {\n if (typeof props.location.state === 'undefined') {\n history.push(ROUTES.LANDING);\n } else {\n setName(props.location.state.name);\n setEmail(props.location.state.email);\n }\n (async () => {\n const res = await API.get('profile');\n if (!res.data.loggedin) {\n history.push(ROUTES.LANDING);\n }\n })();\n }, []);\n\n return (\n <div className={classes.profileContainer}>\n <Navbar />\n <div className={classes.main}>\n <Grid container className={classes.profileCard}>\n <Grid item md={4} className={classes.col1}>\n <img\n src={Portrait}\n alt=\"Profile\"\n className={classes.profilePhoto}\n />\n </Grid>\n <Grid item md={8} className={classes.col2}>\n <div className={classes.row1}>\n <Typography\n className={clsx(classes.userNameSection, classes.userName)}\n >\n {name}\n </Typography>\n <button className={classes.edit}>Edit Profile</button>\n <SettingsOutlinedIcon className={classes.icon} />\n </div>\n <ul className={classes.row2}>\n <li>\n <Typography\n className={clsx(classes.activitySection, classes.activity)}\n >\n <span className={classes.number}>500</span> posts\n </Typography>\n </li>\n <li>\n <Typography\n className={clsx(classes.activitySection, classes.activity)}\n >\n <span className={classes.number}>2.5k</span> followers\n </Typography>\n </li>\n <li>\n <Typography\n className={clsx(classes.activitySection, classes.activity)}\n >\n <span className={classes.number}>500</span> following\n </Typography>\n </li>\n </ul>\n <div className={classes.row2}>\n <Typography className={classes.email}>{email}</Typography>\n </div>\n </Grid>\n </Grid>\n <div className={classes.line} />\n <Posts />\n <div className={classes.spacing} />\n <Footer />\n </div>\n </div>\n );\n};\n\nexport default Profile;\n","/Users/jadekang/Desktop/interviews/ruggable/instagram/src/components/Footer/index.jsx",["86"],"import React from 'react';\nimport { Typography } from '@material-ui/core';\nimport { makeStyles } from '@material-ui/styles';\nimport clsx from 'clsx';\n\nconst useStyles = makeStyles((theme) => ({\n main: {\n marginBottom: '52px',\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'center',\n },\n list: {\n display: 'block',\n },\n footerList1: {\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'space-around',\n flexWrap: 'wrap',\n },\n footerList2: {\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'space-around',\n flexWrap: 'wrap',\n },\n list2: {\n margin: '12px 0px',\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'center',\n },\n itemBox: {\n margin: '8px 0px 0px 8px',\n display: 'block',\n },\n itemBox2: {\n margin: '8px 0px 0px 8px',\n },\n item: {\n color: '#8e8e8e',\n display: 'block',\n fontWeight: 500,\n textTransform: 'capitalize',\n '&visited': {\n color: '#8e8e8e',\n textTransform: 'capitalize',\n textDecoration: 'none',\n },\n },\n copyright: {\n marginLeft: '16px',\n },\n dropdownBox: {},\n dropdown: {\n cursor: 'pointer',\n height: '100%',\n left: 0,\n opacity: 0,\n position: 'absolute',\n top: 0,\n width: '100%',\n },\n}));\n\nconst footerList = [\n {\n id: 1,\n name: 'about',\n },\n {\n id: 2,\n name: 'Blog',\n },\n {\n id: 3,\n name: 'Jobs',\n },\n {\n id: 4,\n name: 'Help',\n },\n {\n id: 5,\n name: 'API',\n },\n {\n id: 6,\n name: 'Privacy',\n },\n {\n id: 7,\n name: 'Terms',\n },\n {\n id: 8,\n name: 'Top Accounts',\n },\n {\n id: 9,\n name: 'Hashtags',\n },\n {\n id: 10,\n name: 'Locations',\n },\n];\n\nconst footerList2 = [\n {\n id: 11,\n name: 'Beauty',\n },\n {\n id: 12,\n name: 'Dance & Performance',\n },\n {\n id: 13,\n name: 'Fitness',\n },\n {\n id: 14,\n name: 'Food & Drink',\n },\n {\n id: 15,\n name: 'Home & Garden',\n },\n {\n id: 16,\n name: 'Music',\n },\n {\n id: 17,\n name: 'Visual Arts',\n },\n];\n\nconst languages = [\n 'Afrikaans',\n 'Chinese',\n 'Czech',\n 'Danish',\n 'Dutch',\n 'English',\n 'English (UK)',\n 'Suomi',\n 'Français',\n 'Deutsch',\n 'Ελληνικά',\n 'Bahasa',\n 'Italiano',\n '日本語',\n '한국어',\n 'Bahasa',\n 'Norsk',\n 'Polski',\n 'Português',\n 'Русский',\n 'Español',\n 'Svenska',\n 'Filipino',\n 'Thai',\n 'Türkçe',\n];\n\nconst LanguageOption = () => {\n const classes = useStyles();\n return (\n <select className={classes.dropdown} aria-label=\"Switch Display Language\">\n {languages.map((language, id) => {\n return (\n <option className={classes.content} key={id} value={language}>\n {language}\n </option>\n );\n })}\n </select>\n );\n};\n\nconst Footer = () => {\n const classes = useStyles();\n\n return (\n <div className={classes.main}>\n <div className={classes.list}>\n <div className={classes.footerList1}>\n {footerList.map((item) => {\n return (\n <div key={item.id} className={classes.itemBox}>\n <Typography variant=\"body2\" className={classes.item}>\n {item.name}\n </Typography>\n </div>\n );\n })}\n </div>\n <div className={classes.footerList2}>\n {footerList2.map((item) => {\n return (\n <div key={item.id} className={classes.itemBox2}>\n <Typography variant=\"body2\" className={classes.item}>\n {item.name}\n </Typography>\n </div>\n );\n })}\n </div>\n <div className={clsx(classes.list, classes.list2)}>\n <div className={classes.dropdownBox}>{/* <LanguageOption /> */}</div>\n <div className={classes.copyright}>\n <Typography variant=\"body2\" className={classes.item}>\n {'© '}\n {new Date().getFullYear()} Instagram from Facebook\n </Typography>\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nexport default Footer;\n","/Users/jadekang/Desktop/interviews/ruggable/instagram/src/theme/typography.js",[],"/Users/jadekang/Desktop/interviews/ruggable/instagram/src/theme/palette.js",[],"/Users/jadekang/Desktop/interviews/ruggable/instagram/src/api.js",[],"/Users/jadekang/Desktop/interviews/ruggable/instagram/src/components/Profile/Navbar.jsx",["87"],"import React, { useState } from 'react';\nimport { Grid, Typography, InputBase } from '@material-ui/core';\nimport { makeStyles } from '@material-ui/core/styles';\nimport HomeOutlinedIcon from '@material-ui/icons/HomeOutlined';\nimport NearMeOutlinedIcon from '@material-ui/icons/NearMeOutlined';\nimport FavoriteBorderOutlinedIcon from '@material-ui/icons/FavoriteBorderOutlined';\nimport ExploreOutlinedIcon from '@material-ui/icons/ExploreOutlined';\nimport ExitToAppOutlinedIcon from '@material-ui/icons/ExitToAppOutlined';\nimport SearchIcon from '@material-ui/icons/Search';\nimport * as ROUTES from '../../constants/routes';\nimport { useHistory } from 'react-router-dom';\nimport API from '../../api';\n\nconst useStyles = makeStyles((theme) => ({\n appBar: {\n borderBottom: '5px solid #dbdbdb',\n background: theme.palette.white,\n alignItems: 'center',\n padding: theme.spacing(1, 20),\n [theme.breakpoints.down('sm')]: {\n padding: theme.spacing(1, 2),\n justifyContent: 'space-between',\n },\n },\n top: {\n width: '975px',\n },\n searchBar: {\n position: 'relative',\n border: '1px solid #999999',\n borderRadius: '3px',\n backgroundColor: '#fafafa',\n marginLeft: 0,\n width: '200px',\n minWidth: '125px',\n height: '28px',\n [theme.breakpoints.down('sm')]: {\n display: 'none',\n },\n },\n\n searchIconBox: {\n padding: theme.spacing(0, 1),\n height: '100%',\n position: 'absolute',\n pointerEvents: 'none',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n },\n searchIcon: {\n fontSize: '14px',\n color: '#afb1b4',\n },\n inputRoot: {\n fontSize: '12px',\n },\n inputInput: {\n padding: theme.spacing(1, 1, 1, 0),\n // vertical padding + font size from searchIcon\n paddingLeft: `calc(1em + ${theme.spacing(2)}px)`,\n transition: theme.transitions.create('width'),\n width: '100%',\n },\n icons: {\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'flex-end',\n },\n appIcon: {\n fontSize: '22px',\n color: '#262626',\n margin: '0 4px',\n cursor: 'pointer',\n '&:active': {\n color: '#dbdbdb',\n },\n },\n name: {\n fontSize: '26px',\n },\n}));\n\nconst Navbar = () => {\n const classes = useStyles();\n const history = useHistory();\n\n const [error, setError] = useState('');\n\n const logoutHandler = (e) => {\n e.preventDefault();\n setError('');\n\n (async () => {\n try {\n await API.get('logout');\n setTimeout(() => {\n history.push({\n pathname: ROUTES.SIGNIN,\n });\n }, 1000);\n } catch (e) {\n console.log(e);\n }\n })();\n };\n\n return (\n <Grid container className={classes.appBar} justify=\"center\" spacing={1}>\n <Grid sm={4} item>\n <Typography variant=\"h1\" className={classes.name}>\n Instagram\n </Typography>\n </Grid>\n <Grid sm={4} item>\n <div className={classes.searchBar}>\n <div className={classes.searchIconBox}>\n <SearchIcon className={classes.searchIcon} />\n </div>\n <InputBase\n placeholder=\"Search...\"\n classes={{ root: classes.inputRoot, input: classes.inputInput }}\n inputProps={{ 'aria-label': 'search' }}\n />\n </div>\n </Grid>\n <Grid sm={4} item>\n <div className={classes.icons}>\n <HomeOutlinedIcon className={classes.appIcon} />\n <NearMeOutlinedIcon className={classes.appIcon} />\n <FavoriteBorderOutlinedIcon className={classes.appIcon} />\n <ExploreOutlinedIcon className={classes.appIcon} />\n <ExitToAppOutlinedIcon\n className={classes.appIcon}\n onClick={logoutHandler}\n />\n </div>\n </Grid>\n </Grid>\n );\n};\n\nexport default Navbar;\n","/Users/jadekang/Desktop/interviews/ruggable/instagram/src/components/Profile/Posts.jsx",[],"/Users/jadekang/Desktop/interviews/ruggable/instagram/src/components/Redirect/index.jsx",[],"/Users/jadekang/Desktop/interviews/ruggable/instagram/src/components/CTA/index.jsx",[],"/Users/jadekang/Desktop/interviews/ruggable/instagram/src/components/Custom/CustomField/index.jsx",[],"/Users/jadekang/Desktop/interviews/ruggable/instagram/src/components/Custom/CustomButton/index.jsx",[],{"ruleId":"88","replacedBy":"89"},{"ruleId":"90","replacedBy":"91"},{"ruleId":"92","severity":1,"message":"93","line":5,"column":42,"nodeType":"94","messageId":"95","endLine":5,"endColumn":46},{"ruleId":"96","severity":1,"message":"97","line":140,"column":6,"nodeType":"98","endLine":140,"endColumn":8,"suggestions":"99"},{"ruleId":"92","severity":1,"message":"100","line":169,"column":7,"nodeType":"94","messageId":"95","endLine":169,"endColumn":21},{"ruleId":"92","severity":1,"message":"101","line":88,"column":10,"nodeType":"94","messageId":"95","endLine":88,"endColumn":15},"no-native-reassign",["102"],"no-negated-in-lhs",["103"],"no-unused-vars","'Link' is defined but never used.","Identifier","unusedVar","react-hooks/exhaustive-deps","React Hook useEffect has missing dependencies: 'history' and 'props.location.state'. Either include them or remove the dependency array.","ArrayExpression",["104"],"'LanguageOption' is assigned a value but never used.","'error' is assigned a value but never used.","no-global-assign","no-unsafe-negation",{"desc":"105","fix":"106"},"Update the dependencies array to be: [history, props.location.state]",{"range":"107","text":"108"},[3107,3109],"[history, props.location.state]"]