@ -80048,9 +80048,9 @@ var DashboardContainer = /*#__PURE__*/function (_Component) {
var counter = this . state . counter ;
return /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_0___default . a . createElement ( "div" , {
className : "my-dashboard"
} , /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_0___default . a . createElement ( "div", {
} , /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_0___default . a . createElement ( _TabelaPessoas_index_jsx__WEBPACK_IMPORTED_MODULE_2__ [ "default" ] , null ) , /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_0___default . a . createElement ( "div", {
className : "my-dashboard__button"
} , /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_0___default . a . createElement ( _TabelaPessoas_index_jsx__WEBPACK_IMPORTED_MODULE_2__ [ "default" ] , null ) , /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_0___default . a . createElement ( _ components_MyButton_index_jsx__WEBPACK_IMPORTED_MODULE_1__ [ "default" ] , {
} , /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_0___default . a . createElement ( _components_MyButton_index_jsx__WEBPACK_IMPORTED_MODULE_1__ [ "default" ] , {
mainRef : this . button ,
text : "ReactJS \u26A1 Ant.Design \uD83D\uDC49 Click me! " . concat ( counter ) ,
click : this . click
@ -80111,6 +80111,8 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var antd_lib_table__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/ __webpack_require__ . n ( antd_lib_table__WEBPACK_IMPORTED_MODULE_2__ ) ;
/* harmony import */ var antd_lib_tag__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__ ( /*! antd/lib/tag */ "./node_modules/antd/lib/tag/index.js" ) ;
/* harmony import */ var antd_lib_tag__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/ __webpack_require__ . n ( antd_lib_tag__WEBPACK_IMPORTED_MODULE_3__ ) ;
/* harmony import */ var antd_lib_notification__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__ ( /*! antd/lib/notification */ "./node_modules/antd/lib/notification/index.js" ) ;
/* harmony import */ var antd_lib_notification__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/ __webpack_require__ . n ( antd_lib_notification__WEBPACK_IMPORTED_MODULE_4__ ) ;
function _slicedToArray ( arr , i ) { return _arrayWithHoles ( arr ) || _iterableToArrayLimit ( arr , i ) || _unsupportedIterableToArray ( arr , i ) || _nonIterableRest ( ) ; }
function _nonIterableRest ( ) { throw new TypeError ( "Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." ) ; }
@ -80128,6 +80130,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
var TabelaPessoas = function TabelaPessoas ( _ref ) {
var buttonRef = _ref . buttonRef ,
text = _ref . text ,
@ -80144,6 +80147,19 @@ var TabelaPessoas = function TabelaPessoas(_ref) {
setCarregando = _useState4 [ 1 ] ;
Object ( react__WEBPACK_IMPORTED_MODULE_0__ [ "useEffect" ] ) ( function ( ) {
setCarregando ( true ) ;
var _fail = function fail ( ) {
setCarregando ( false ) ;
antd_lib_notification__WEBPACK_IMPORTED_MODULE_4___default . a [ "error" ] ( {
message : 'Tabela de Pessoas' ,
description : 'Houve uma falha ao carregar a tabela das pessoas..' ,
style : {
marginTop : 100
}
} ) ;
} ;
netuno . service ( {
method : "GET" ,
url : "/services/pessoas" ,
@ -80151,10 +80167,15 @@ var TabelaPessoas = function TabelaPessoas(_ref) {
sucess : function sucess ( response ) {
if ( response . json ) {
setTabelaDados ( response . json ) ;
setCarregando ( false ) ;
} else {
_fail ( ) ;
}
} ,
fail : function fail ( e ) {
console . log ( "Erro ao carregar dados" ) ;
_fail ( ) ;
}
} ) ;
} , [ ] ) ;
@ -80186,7 +80207,7 @@ var TabelaPessoas = function TabelaPessoas(_ref) {
} ;
TabelaPessoas . propTypes = { } ;
/* harmony default export */ __webpack_exports__ [ "default" ] = ( MyButton ) ;
/* harmony default export */ __webpack_exports__ [ "default" ] = ( TabelaPessoas ) ;
/***/ } ) ,