@ssplib/react-components 0.0.47 → 0.0.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -56,7 +56,7 @@ function FileUpload({ name, tipoArquivo, title, required = false, multiple = fal
|
|
|
56
56
|
const fd = new FormData();
|
|
57
57
|
fd.append('files', file);
|
|
58
58
|
fd.append('tipoArquivo', tipoArquivo);
|
|
59
|
-
fetch(
|
|
59
|
+
fetch(apiURL, {
|
|
60
60
|
method: 'POST',
|
|
61
61
|
body: fd,
|
|
62
62
|
headers: {
|
package/components/page/Login.js
CHANGED
|
@@ -34,9 +34,8 @@ const Container_1 = __importDefault(require("@mui/material/Container"));
|
|
|
34
34
|
const Typography_1 = __importDefault(require("@mui/material/Typography"));
|
|
35
35
|
const React = __importStar(require("react"));
|
|
36
36
|
const react_1 = require("react");
|
|
37
|
-
const FormProvider_1 = __importDefault(require("../providers/FormProvider"));
|
|
38
37
|
const auth_1 = require("../../context/auth");
|
|
39
|
-
const
|
|
38
|
+
const FormProvider_1 = __importDefault(require("../providers/FormProvider"));
|
|
40
39
|
function Login({ imgURL = '', name = 'Login', children, loginURL }) {
|
|
41
40
|
const [loading, setLoading] = (0, react_1.useState)(false);
|
|
42
41
|
const [error, setError] = (0, react_1.useState)(false);
|
|
@@ -55,9 +54,7 @@ function Login({ imgURL = '', name = 'Login', children, loginURL }) {
|
|
|
55
54
|
imgURL && React.createElement("img", { src: imgURL, alt: '', height: 100, width: 100 }),
|
|
56
55
|
React.createElement(Typography_1.default, { component: 'h1', variant: 'h5', paddingY: 3 }, name),
|
|
57
56
|
React.createElement(material_1.Stack, { spacing: 3, width: 300 },
|
|
58
|
-
React.createElement(material_1.Stack, { spacing: 1 },
|
|
59
|
-
children,
|
|
60
|
-
React.createElement(Input_1.Input, { name: 'dsa', type: 'input' })),
|
|
57
|
+
React.createElement(material_1.Stack, { spacing: 1 }, children),
|
|
61
58
|
React.createElement(lab_1.LoadingButton, { type: 'submit', fullWidth: true, variant: 'contained', loading: loading }, "Login"),
|
|
62
59
|
error && (React.createElement(Box_1.default, { bgcolor: '#ce4257', padding: 2, borderRadius: 2, color: 'white' },
|
|
63
60
|
React.createElement(Typography_1.default, null, "Dados incorretos. Tente novamente!"))))))));
|