[{"/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/index.tsx":"1","/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/reportWebVitals.ts":"2","/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/application.tsx":"3","/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/config/firebase.ts":"4","/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/config/logging.ts":"5","/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/config/routes.ts":"6","/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/config/config.ts":"7","/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/components/AuthRoute/index.tsx":"8","/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/pages/auth/change.tsx":"9","/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/pages/home.tsx":"10","/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/pages/auth/forgot.tsx":"11","/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/pages/auth/login.tsx":"12","/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/pages/auth/logout.tsx":"13","/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/pages/auth/register.tsx":"14","/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/pages/auth/reset.tsx":"15","/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/pages/auth/modules/index.ts":"16","/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/components/ErrorText/index.tsx":"17","/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/components/AuthContainer/index.tsx":"18","/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/pages/auth/Links.js":"19","/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/pages/auth/LinkForm.js":"20","/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/interfaces/page.ts":"21"},{"size":650,"mtime":1629456727455,"results":"22","hashOfConfig":"23"},{"size":425,"mtime":1611457232000,"results":"24","hashOfConfig":"23"},{"size":1823,"mtime":1628682999747,"results":"25","hashOfConfig":"23"},{"size":943,"mtime":1629458387054,"results":"26","hashOfConfig":"23"},{"size":1066,"mtime":1611457232000,"results":"27","hashOfConfig":"23"},{"size":1593,"mtime":1628680826193,"results":"28","hashOfConfig":"23"},{"size":376,"mtime":1628591301903,"results":"29","hashOfConfig":"23"},{"size":963,"mtime":1628682883714,"results":"30","hashOfConfig":"23"},{"size":3302,"mtime":1628754426858,"results":"31","hashOfConfig":"23"},{"size":1155,"mtime":1630916990800,"results":"32","hashOfConfig":"23"},{"size":2187,"mtime":1611457232000,"results":"33","hashOfConfig":"23"},{"size":4294,"mtime":1628681888281,"results":"34","hashOfConfig":"23"},{"size":1011,"mtime":1611457232000,"results":"35","hashOfConfig":"23"},{"size":5281,"mtime":1628680258658,"results":"36","hashOfConfig":"23"},{"size":4786,"mtime":1611457232000,"results":"37","hashOfConfig":"23"},{"size":359,"mtime":1611457232000,"results":"38","hashOfConfig":"23"},{"size":705,"mtime":1628680585271,"results":"39","hashOfConfig":"23"},{"size":1003,"mtime":1628596480309,"results":"40","hashOfConfig":"23"},{"size":3900,"mtime":1630917091697,"results":"41","hashOfConfig":"23"},{"size":3768,"mtime":1630916977752,"results":"42","hashOfConfig":"23"},{"size":57,"mtime":1629459788939,"results":"43","hashOfConfig":"23"},{"filePath":"44","messages":"45","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"46"},"74vu3w",{"filePath":"47","messages":"48","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"46"},{"filePath":"49","messages":"50","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"46"},{"filePath":"51","messages":"52","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"46"},{"filePath":"53","messages":"54","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"46"},{"filePath":"55","messages":"56","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"46"},{"filePath":"57","messages":"58","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"46"},{"filePath":"59","messages":"60","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"46"},{"filePath":"61","messages":"62","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"46"},{"filePath":"63","messages":"64","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"65","messages":"66","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"46"},{"filePath":"67","messages":"68","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"46"},{"filePath":"69","messages":"70","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"46"},{"filePath":"71","messages":"72","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"46"},{"filePath":"73","messages":"74","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"46"},{"filePath":"75","messages":"76","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"46"},{"filePath":"77","messages":"78","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"46"},{"filePath":"79","messages":"80","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"46"},{"filePath":"81","messages":"82","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"83","messages":"84","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"85","usedDeprecatedRules":"86"},{"filePath":"87","messages":"88","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"46"},"/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/index.tsx",[],["89","90"],"/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/reportWebVitals.ts",[],"/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/application.tsx",[],"/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/config/firebase.ts",[],"/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/config/logging.ts",[],"/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/config/routes.ts",[],"/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/config/config.ts",[],"/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/components/AuthRoute/index.tsx",[],"/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/pages/auth/change.tsx",[],"/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/pages/home.tsx",[],"/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/pages/auth/forgot.tsx",[],"/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/pages/auth/login.tsx",[],"/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/pages/auth/logout.tsx",[],"/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/pages/auth/register.tsx",[],"/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/pages/auth/reset.tsx",[],"/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/pages/auth/modules/index.ts",[],"/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/components/ErrorText/index.tsx",[],"/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/components/AuthContainer/index.tsx",[],"/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/pages/auth/Links.js",[],"/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/pages/auth/LinkForm.js",["91"],"import React, {useState, useEffect} from 'react';\nimport Firebase from \"../../config/firebase\";\n//import IPageProps from '../../interfaces/page';\n\n//Importamos toast para mensajes dinamicos (instalamos librería => npm install --save react-toastify)\nimport { toast } from \"react-toastify\";\n\nconst LinkForm = (props) =>{\n\n //Constantes iniciales \n const initialStateValues = {\n url:\"\",\n name:\"\",\n description:\"\",\n }\n //Creamos el useState con su estado inicial y su cambio posterior:\n const [values, setValues ] = useState(initialStateValues);\n\n //Funcion que maneja el cambio de cada input setea las initialStateValues: la propiedad e.target de cada onchange={} de los input\n const handleInputChange = e =>{\n const {name, value} = e.target;\n setValues({...values, [name]: value });\n } \n\n //Para validar la URL por ejemplo: Buscar en google => validate url regex javascript\n const validURL = (str) => {\n var pattern = new RegExp(\n \"^(https?:\\\\/\\\\/)?\" + // protocol\n \"((([a-z\\\\d]([a-z\\\\d-]*[a-z\\\\d])*)\\\\.)+[a-z]{2,}|\" + // domain name\n \"((\\\\d{1,3}\\\\.){3}\\\\d{1,3}))\" + // OR ip (v4) address\n \"(\\\\:\\\\d+)?(\\\\/[-a-z\\\\d%_.~+]*)*\" + // port and path\n \"(\\\\?[;&a-z\\\\d%_.~+=-]*)?\" + // query string\n \"(\\\\#[-a-z\\\\d_]*)?$\",\n \"i\"\n ); // fragment locator\n return !!pattern.test(str);\n};\n \n\n\n //Evento que escucha al enviar el formulario, simplemente para ver que en consola esta funcionando:\n const handleSubmit = e => {\n e.preventDefault();\n\n //Utilizamos el validador de de la URL para que la gente ponga bien la URL:\n if (!validURL(values.url)) {\n return toast(\"invalid url\", { \n type: \"warning\", // warning => Color amarillo\n autoClose: 1000 // Duración un segundo\n });\n \n }\n\n // Le pasamos las props al addOrEditLink que esta en el component Links y este lo guardara en la base de datos (FIN DEL ASUNTO....)\n props.addOrEditLink(values);\n\n //Una vez guardados los datos procedemos a setearlos y de esta manera dejamos limpios los intput:\n setValues({...initialStateValues})\n }\n\n const getLinkById = async (id) => {\n const doc = await Firebase.collection(\"links\").doc(id).get();\n setValues({ ...doc.data() });\n };\n \n\n useEffect(() => {\n if (props.currentId === \"\") {\n setValues({ ...initialStateValues });\n } else {\n getLinkById(props.currentId);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [props.currentId]);\n\n return(\n <form onSubmit={handleSubmit} className=\"card card-body border-primary\">\n <div className=\"form-group input-group\">\n <div className=\"input-group-text bg-light\">\n <i className=\"material-icons\">insert_link</i>\n </div>\n <input style={{ color: \"white\" }} type=\"text\" className=\"form-control\" placeholder=\"https://someurl.xyz\" value={values.url} name=\"url\" onChange={handleInputChange}/>\n </div>\n <br/>\n <div className=\"form-group input-group\">\n <div className=\"input-group-text bg-light\">\n <i className=\"material-icons\">create</i>\n </div>\n <input style={{ color: \"white\" }} type=\"text\" value={values.name} name=\"name\" placeholder=\"Website Name\" className=\"form-control\" onChange={handleInputChange}/>\n </div>\n <br/>\n <div className=\"form-group\">\n <textarea style={{ color: \"white\" }} rows=\"3\" className=\"form-control\" placeholder=\"Write a Description\" name=\"description\" value={values.description} onChange={handleInputChange}/>\n </div>\n <br/>\n <button className=\"btn btn-primary btn-block\">\n {props.currentId === \"\" ? \"Save\" : \"Update\"}\n </button>\n </form>\n )\n}\n\nexport default LinkForm;\n",["92","93"],"/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/interfaces/page.ts",[],{"ruleId":"94","replacedBy":"95"},{"ruleId":"96","replacedBy":"97"},{"ruleId":"98","severity":1,"message":"99","line":3,"column":8,"nodeType":"100","messageId":"101","endLine":3,"endColumn":18},{"ruleId":"94","replacedBy":"95"},{"ruleId":"96","replacedBy":"97"},"no-native-reassign",["102"],"no-negated-in-lhs",["103"],"no-unused-vars","'IPageProps' is defined but never used.","Identifier","unusedVar","no-global-assign","no-unsafe-negation"]
[{"/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/index.tsx":"1","/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/reportWebVitals.ts":"2","/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/application.tsx":"3","/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/config/firebase.ts":"4","/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/config/logging.ts":"5","/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/config/routes.ts":"6","/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/config/config.ts":"7","/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/components/AuthRoute/index.tsx":"8","/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/pages/auth/change.tsx":"9","/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/pages/home.tsx":"10","/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/pages/auth/forgot.tsx":"11","/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/pages/auth/login.tsx":"12","/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/pages/auth/logout.tsx":"13","/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/pages/auth/register.tsx":"14","/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/pages/auth/reset.tsx":"15","/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/pages/auth/modules/index.ts":"16","/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/components/ErrorText/index.tsx":"17","/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/components/AuthContainer/index.tsx":"18","/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/pages/auth/Links.js":"19","/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/pages/auth/LinkForm.js":"20","/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/interfaces/page.ts":"21"},{"size":650,"mtime":1629456727455,"results":"22","hashOfConfig":"23"},{"size":425,"mtime":1611457232000,"results":"24","hashOfConfig":"23"},{"size":1823,"mtime":1628682999747,"results":"25","hashOfConfig":"23"},{"size":948,"mtime":1630917358411,"results":"26","hashOfConfig":"23"},{"size":1066,"mtime":1611457232000,"results":"27","hashOfConfig":"23"},{"size":1593,"mtime":1628680826193,"results":"28","hashOfConfig":"23"},{"size":376,"mtime":1628591301903,"results":"29","hashOfConfig":"23"},{"size":963,"mtime":1628682883714,"results":"30","hashOfConfig":"23"},{"size":3302,"mtime":1628754426858,"results":"31","hashOfConfig":"23"},{"size":1155,"mtime":1630916990800,"results":"32","hashOfConfig":"23"},{"size":2187,"mtime":1611457232000,"results":"33","hashOfConfig":"23"},{"size":4294,"mtime":1628681888281,"results":"34","hashOfConfig":"23"},{"size":1011,"mtime":1611457232000,"results":"35","hashOfConfig":"23"},{"size":5281,"mtime":1628680258658,"results":"36","hashOfConfig":"23"},{"size":4786,"mtime":1611457232000,"results":"37","hashOfConfig":"23"},{"size":359,"mtime":1611457232000,"results":"38","hashOfConfig":"23"},{"size":705,"mtime":1628680585271,"results":"39","hashOfConfig":"23"},{"size":1003,"mtime":1628596480309,"results":"40","hashOfConfig":"23"},{"size":3900,"mtime":1630917091697,"results":"41","hashOfConfig":"23"},{"size":3768,"mtime":1630916977752,"results":"42","hashOfConfig":"23"},{"size":57,"mtime":1629459788939,"results":"43","hashOfConfig":"23"},{"filePath":"44","messages":"45","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"46"},"74vu3w",{"filePath":"47","messages":"48","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"46"},{"filePath":"49","messages":"50","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"46"},{"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":"46"},{"filePath":"55","messages":"56","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"46"},{"filePath":"57","messages":"58","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"46"},{"filePath":"59","messages":"60","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"46"},{"filePath":"61","messages":"62","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"46"},{"filePath":"63","messages":"64","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"65","messages":"66","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"46"},{"filePath":"67","messages":"68","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"46"},{"filePath":"69","messages":"70","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"46"},{"filePath":"71","messages":"72","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"46"},{"filePath":"73","messages":"74","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"46"},{"filePath":"75","messages":"76","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"46"},{"filePath":"77","messages":"78","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"46"},{"filePath":"79","messages":"80","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"46"},{"filePath":"81","messages":"82","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"83","messages":"84","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"85","usedDeprecatedRules":"86"},{"filePath":"87","messages":"88","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"46"},"/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/index.tsx",[],["89","90"],"/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/reportWebVitals.ts",[],"/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/application.tsx",[],"/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/config/firebase.ts",[],"/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/config/logging.ts",[],"/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/config/routes.ts",[],"/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/config/config.ts",[],"/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/components/AuthRoute/index.tsx",[],"/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/pages/auth/change.tsx",[],"/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/pages/home.tsx",[],"/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/pages/auth/forgot.tsx",[],"/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/pages/auth/login.tsx",[],"/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/pages/auth/logout.tsx",[],"/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/pages/auth/register.tsx",[],"/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/pages/auth/reset.tsx",[],"/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/pages/auth/modules/index.ts",[],"/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/components/ErrorText/index.tsx",[],"/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/components/AuthContainer/index.tsx",[],"/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/pages/auth/Links.js",[],"/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/pages/auth/LinkForm.js",["91"],"import React, {useState, useEffect} from 'react';\nimport Firebase from \"../../config/firebase\";\n//import IPageProps from '../../interfaces/page';\n\n//Importamos toast para mensajes dinamicos (instalamos librería => npm install --save react-toastify)\nimport { toast } from \"react-toastify\";\n\nconst LinkForm = (props) =>{\n\n //Constantes iniciales \n const initialStateValues = {\n url:\"\",\n name:\"\",\n description:\"\",\n }\n //Creamos el useState con su estado inicial y su cambio posterior:\n const [values, setValues ] = useState(initialStateValues);\n\n //Funcion que maneja el cambio de cada input setea las initialStateValues: la propiedad e.target de cada onchange={} de los input\n const handleInputChange = e =>{\n const {name, value} = e.target;\n setValues({...values, [name]: value });\n } \n\n //Para validar la URL por ejemplo: Buscar en google => validate url regex javascript\n const validURL = (str) => {\n var pattern = new RegExp(\n \"^(https?:\\\\/\\\\/)?\" + // protocol\n \"((([a-z\\\\d]([a-z\\\\d-]*[a-z\\\\d])*)\\\\.)+[a-z]{2,}|\" + // domain name\n \"((\\\\d{1,3}\\\\.){3}\\\\d{1,3}))\" + // OR ip (v4) address\n \"(\\\\:\\\\d+)?(\\\\/[-a-z\\\\d%_.~+]*)*\" + // port and path\n \"(\\\\?[;&a-z\\\\d%_.~+=-]*)?\" + // query string\n \"(\\\\#[-a-z\\\\d_]*)?$\",\n \"i\"\n ); // fragment locator\n return !!pattern.test(str);\n};\n \n\n\n //Evento que escucha al enviar el formulario, simplemente para ver que en consola esta funcionando:\n const handleSubmit = e => {\n e.preventDefault();\n\n //Utilizamos el validador de de la URL para que la gente ponga bien la URL:\n if (!validURL(values.url)) {\n return toast(\"invalid url\", { \n type: \"warning\", // warning => Color amarillo\n autoClose: 1000 // Duración un segundo\n });\n \n }\n\n // Le pasamos las props al addOrEditLink que esta en el component Links y este lo guardara en la base de datos (FIN DEL ASUNTO....)\n props.addOrEditLink(values);\n\n //Una vez guardados los datos procedemos a setearlos y de esta manera dejamos limpios los intput:\n setValues({...initialStateValues})\n }\n\n const getLinkById = async (id) => {\n const doc = await Firebase.collection(\"links\").doc(id).get();\n setValues({ ...doc.data() });\n };\n \n\n useEffect(() => {\n if (props.currentId === \"\") {\n setValues({ ...initialStateValues });\n } else {\n getLinkById(props.currentId);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [props.currentId]);\n\n return(\n <form onSubmit={handleSubmit} className=\"card card-body border-primary\">\n <div className=\"form-group input-group\">\n <div className=\"input-group-text bg-light\">\n <i className=\"material-icons\">insert_link</i>\n </div>\n <input style={{ color: \"white\" }} type=\"text\" className=\"form-control\" placeholder=\"https://someurl.xyz\" value={values.url} name=\"url\" onChange={handleInputChange}/>\n </div>\n <br/>\n <div className=\"form-group input-group\">\n <div className=\"input-group-text bg-light\">\n <i className=\"material-icons\">create</i>\n </div>\n <input style={{ color: \"white\" }} type=\"text\" value={values.name} name=\"name\" placeholder=\"Website Name\" className=\"form-control\" onChange={handleInputChange}/>\n </div>\n <br/>\n <div className=\"form-group\">\n <textarea style={{ color: \"white\" }} rows=\"3\" className=\"form-control\" placeholder=\"Write a Description\" name=\"description\" value={values.description} onChange={handleInputChange}/>\n </div>\n <br/>\n <button className=\"btn btn-primary btn-block\">\n {props.currentId === \"\" ? \"Save\" : \"Update\"}\n </button>\n </form>\n )\n}\n\nexport default LinkForm;\n",["92","93"],"/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/interfaces/page.ts",[],{"ruleId":"94","replacedBy":"95"},{"ruleId":"96","replacedBy":"97"},{"ruleId":"98","severity":1,"message":"99","line":3,"column":8,"nodeType":"100","messageId":"101","endLine":3,"endColumn":18},{"ruleId":"94","replacedBy":"95"},{"ruleId":"96","replacedBy":"97"},"no-native-reassign",["102"],"no-negated-in-lhs",["103"],"no-unused-vars","'IPageProps' is defined but never used.","Identifier","unusedVar","no-global-assign","no-unsafe-negation"]
{"ast":null,"code":"import firebase from \"firebase/app\";\nimport 'firebase/auth';\nimport 'firebase/firestore';\nimport config from \"./config\"; // Creamos el objeto Firebase y le pasamos a la configuracion inicial:\n\nconst Firebase = firebase.initializeApp(config.firebase); // Exportamos nuestros proveedores para cualquier inicio de sesión en las redes sociales:\n// - En este caso solo usaremos la de google \n\nexport const Providers = {\n //Clave y eso sera == A (firebase.auth) => El proveedor de Autentificación de Google y para otras redes sociales\n // se aria lo mismo pero en este caso solo estamos uilizando Google\n google: new firebase.auth.GoogleAuthProvider()\n}; // Por ultimo exportara obejeto de autotencicación que es igual a la funcion firebase off, vamos a usar esta variable en concreto,\n// en todos nuestros comandos de base de firebase.\n\nexport const auth = firebase.auth(); // Por ultimo exportamos el objeto:\n\nexport default Firebase;","map":{"version":3,"sources":["/home/sonia/VisualStudioCode/Poryecto-Propio/Proyecto-React-Firebase/src/config/firebase.ts"],"names":["firebase","config","Firebase","initializeApp","Providers","google","auth","GoogleAuthProvider"],"mappings":"AAAA,OAAOA,QAAP,MAAqB,cAArB;AACA,OAAO,eAAP;AACA,OAAO,oBAAP;AACA,OAAOC,MAAP,MAAmB,UAAnB,C,CAEA;;AACA,MAAMC,QAAQ,GAAGF,QAAQ,CAACG,aAAT,CAAuBF,MAAM,CAACD,QAA9B,CAAjB,C,CAEA;AACA;;AACA,OAAO,MAAMI,SAAS,GAAG;AACrB;AACA;AAEAC,EAAAA,MAAM,EAAE,IAAIL,QAAQ,CAACM,IAAT,CAAcC,kBAAlB;AAJa,CAAlB,C,CAOP;AACA;;AACA,OAAO,MAAMD,IAAI,GAAGN,QAAQ,CAACM,IAAT,EAAb,C,CAEP;;AACA,eAAeJ,QAAf","sourcesContent":["import firebase from \"firebase/app\";\nimport 'firebase/auth';\nimport 'firebase/firestore';\nimport config from \"./config\";\n\n// Creamos el objeto Firebase y le pasamos a la configuracion inicial:\nconst Firebase = firebase.initializeApp(config.firebase);\n\n// Exportamos nuestros proveedores para cualquier inicio de sesión en las redes sociales:\n// - En este caso solo usaremos la de google \nexport const Providers = {\n //Clave y eso sera == A (firebase.auth) => El proveedor de Autentificación de Google y para otras redes sociales\n // se aria lo mismo pero en este caso solo estamos uilizando Google\n\n google: new firebase.auth.GoogleAuthProvider()\n}\n\n// Por ultimo exportara obejeto de autotencicación que es igual a la funcion firebase off, vamos a usar esta variable en concreto,\n// en todos nuestros comandos de base de firebase.\nexport const auth = firebase.auth();\n\n// Por ultimo exportamos el objeto:\nexport default Firebase;\n\n"]},"metadata":{},"sourceType":"module"}