-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcomponent---src-pages-reset-js-87a9853b4c59942c37f4.js.map
1 lines (1 loc) · 5.06 KB
/
component---src-pages-reset-js-87a9853b4c59942c37f4.js.map
1
{"version":3,"sources":["webpack:///./src/components/Box/index.js","webpack:///./src/pages/reset.js","webpack:///./src/components/Button/index.js","webpack:///./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js"],"names":["Home","children","props","size","React","useContext","ResponsiveContext","margin","left","right","top","bottom","width","max","includes","gap","Component","useState","model","setModel","message","setMessage","level","value","onChange","event","username","target","email","placeholder","direction","label","primary","onClick","resetPassword","then","e","disabled","loadingState","setLoadingState","returnValue","justify","_objectWithoutPropertiesLoose","source","excluded","key","i","sourceKeys","Object","keys","length","indexOf"],"mappings":"yJAqBeA,IAlBF,SAAC,GAA4B,IAA1BC,EAAyB,EAAzBA,SAAaC,EAAY,4BACjCC,EAAOC,IAAMC,WAAWC,KAc9B,OAbAJ,EAAK,eACHK,OAAQ,CACNC,KAAM,IACNC,MAAO,IACPC,IAAK,QACLC,OAAQ,KAEVC,MAAO,CACLC,IAAK,CAAC,UAAW,SAAU,SAASC,SAASX,GAAQ,OAAS,OAEhEY,IAAK,SACFb,GAEE,kBAAC,IAAQA,EAAQD,K,kCClB1B,4FA6Cee,UAvCG,WAAO,IAAD,EACIC,mBAAS,IAA5BC,EADe,KACRC,EADQ,OAEQF,mBAAS,IAAhCG,EAFe,KAENC,EAFM,KAGtB,OACE,kBAAC,IAAD,KACE,kBAAC,IAAD,CAASC,MAAO,GAAhB,kBACA,kBAAC,IAAD,cAEE,kBAAC,IAAD,CACEC,MAAOL,EAAK,MACZM,SAAU,SAACC,GACTN,EAAS,OAAD,UACHD,EADG,CAENQ,SAAUD,EAAME,OAAOJ,MACvBK,MAAOH,EAAME,OAAOJ,UAGxBM,YAAY,WAGhB,kBAAC,IAAD,CAAKC,UAAU,OACb,kBAAC,IAAD,CACEC,MAAM,iBACNX,QAASA,EACTY,SAAO,EACPC,QAAS,WACP,GAAIf,EAAMU,MACR,OAAOM,YAAchB,EAAMU,OAAOO,MAAK,SAACC,GAAD,OACrCf,EAAW,4BAGbA,EAAW,wC,+FCTVrB,IAxBF,SAAC,GAA8C,IAA5CiC,EAA2C,EAA3CA,QAASI,EAAkC,EAAlCA,SAAUjB,EAAwB,EAAxBA,QAAYlB,EAAY,kDACjBe,oBAAS,GAA1CqB,EADkD,KACpCC,EADoC,KAGzD,OACE,kBAAC,IAAD,KACE,kBAAC,IAAD,iBACMrC,EADN,CAEE8B,SAAO,EACPC,QAAS,WACP,IAAMO,EAAcP,GAAWA,IAC3BO,GAAeA,EAAYL,OAC7BI,GAAgB,GAChBC,EAAYL,MAAK,SAACC,GAAD,OAAOG,GAAgB,QAG5CF,SAAUA,GAAYC,KAExB,kBAAC,IAAD,CAAK/B,OAAO,IAAIkC,QAAQ,UACrBrB,M,kCCtBM,SAASsB,EAA8BC,EAAQC,GAC5D,GAAc,MAAVD,EAAgB,MAAO,GAC3B,IAEIE,EAAKC,EAFLnB,EAAS,GACToB,EAAaC,OAAOC,KAAKN,GAG7B,IAAKG,EAAI,EAAGA,EAAIC,EAAWG,OAAQJ,IACjCD,EAAME,EAAWD,GACbF,EAASO,QAAQN,IAAQ,IAC7BlB,EAAOkB,GAAOF,EAAOE,IAGvB,OAAOlB,EAZT","file":"component---src-pages-reset-js-87a9853b4c59942c37f4.js","sourcesContent":["import React from \"react\";\nimport { Box, ResponsiveContext } from \"grommet\";\n\nconst Home = ({ children, ...props }) => {\n const size = React.useContext(ResponsiveContext);\n props = {\n margin: {\n left: \"0\",\n right: \"0\",\n top: \"small\",\n bottom: \"0\",\n },\n width: {\n max: [\"xxsmall\", \"xsmall\", \"small\"].includes(size) ? \"100%\" : \"80%\",\n },\n gap: \"small\",\n ...props,\n };\n return <Box {...props}>{children}</Box>;\n};\n\nexport default Home;\n","import React, { useState } from \"react\";\nimport { Heading, TextInput } from \"grommet\";\nimport { resetPassword } from \"../library/parse\";\nimport Box from \"../components/Box\";\nimport Button from \"../components/Button\";\n\nconst Component = () => {\n const [model, setModel] = useState({});\n const [message, setMessage] = useState(\"\");\n return (\n <Box>\n <Heading level={3}>Reset Password</Heading>\n <Box>\n Email:\n <TextInput\n value={model[\"email\"]}\n onChange={(event) => {\n setModel({\n ...model,\n username: event.target.value,\n email: event.target.value,\n });\n }}\n placeholder=\"email\"\n />\n </Box>\n <Box direction=\"row\">\n <Button\n label=\"Reset Password\"\n message={message}\n primary\n onClick={() => {\n if (model.email) {\n return resetPassword(model.email).then((e) =>\n setMessage(\"A reset email is sent\")\n );\n } else {\n setMessage(\"Please enter an email address\");\n }\n }}\n />\n </Box>\n </Box>\n );\n};\nexport default Component;\n","import React, { useState } from \"react\";\nimport { Button } from \"grommet\";\nimport Box from \"../Box\";\n\nconst Home = ({ onClick, disabled, message, ...props }) => {\n const [loadingState, setLoadingState] = useState(false);\n\n return (\n <Box>\n <Button\n {...props}\n primary\n onClick={() => {\n const returnValue = onClick && onClick();\n if (returnValue && returnValue.then) {\n setLoadingState(true);\n returnValue.then((e) => setLoadingState(false));\n }\n }}\n disabled={disabled || loadingState}\n />\n <Box margin=\"0\" justify=\"center\">\n {message}\n </Box>\n </Box>\n );\n};\n\nexport default Home;\n","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}"],"sourceRoot":""}