{"ast":null,"code":"import { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\nvar _jsxFileName = \"/home/sonia/VisualStudioCode/Proyecto-React-Firebase/client/src/components/AuthRoute/index.tsx\";\nimport React from 'react';\nimport { Redirect } from 'react-router-dom';\nimport { auth } from '../../config/firebase';\nimport logging from '../../config/logging';\n\nconst AuthRoute = props => {\n  const {\n    children\n  } = props;\n\n  if (!auth.currentUser) {\n    logging.warn('No user detected, redirecting');\n    return /*#__PURE__*/_jsxDEV(Redirect, {\n      to: \"/login\"\n    }, void 0, false, {\n      fileName: _jsxFileName,\n      lineNumber: 14,\n      columnNumber: 16\n    }, this);\n  }\n\n  return /*#__PURE__*/_jsxDEV(\"div\", {\n    children: children\n  }, void 0, false, {\n    fileName: _jsxFileName,\n    lineNumber: 18,\n    columnNumber: 9\n  }, this);\n};\n\n_c = AuthRoute;\nexport default AuthRoute;\n\nvar _c;\n\n$RefreshReg$(_c, \"AuthRoute\");","map":{"version":3,"sources":["/home/sonia/VisualStudioCode/Proyecto-React-Firebase/client/src/components/AuthRoute/index.tsx"],"names":["React","Redirect","auth","logging","AuthRoute","props","children","currentUser","warn"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,QAAT,QAAyB,kBAAzB;AACA,SAASC,IAAT,QAAqB,uBAArB;AACA,OAAOC,OAAP,MAAoB,sBAApB;;AAIA,MAAMC,SAAmD,GAAGC,KAAK,IAAI;AACjE,QAAM;AAAEC,IAAAA;AAAF,MAAeD,KAArB;;AAEA,MAAI,CAACH,IAAI,CAACK,WAAV,EACA;AACIJ,IAAAA,OAAO,CAACK,IAAR,CAAa,+BAAb;AACA,wBAAO,QAAC,QAAD;AAAU,MAAA,EAAE,EAAC;AAAb;AAAA;AAAA;AAAA;AAAA,YAAP;AACH;;AAED,sBACI;AAAA,cAAMF;AAAN;AAAA;AAAA;AAAA;AAAA,UADJ;AAGH,CAZD;;KAAMF,S;AAcN,eAAeA,SAAf","sourcesContent":["import React from 'react';\nimport { Redirect } from 'react-router-dom';\nimport { auth } from '../../config/firebase';\nimport logging from '../../config/logging';\n\nexport interface IAuthRouteProps { }\n\nconst AuthRoute: React.FunctionComponent<IAuthRouteProps> = props => {\n    const { children } = props;\n\n    if (!auth.currentUser)\n    {\n        logging.warn('No user detected, redirecting');\n        return <Redirect to=\"/login\" />;\n    }\n\n    return (\n        <div>{children}</div>\n    );\n}\n\nexport default AuthRoute;"]},"metadata":{},"sourceType":"module"}