text: (this.webpackJsonpfrontend=this.webpackJsonpfrontend||[]).push([[0],{156:function(e,a,t){e.exports=t(331)},161:function(e,a,t){},179:function(e,a,t){},331:function(e,a,t){"use strict";t.r(a);var n=t(0),o=t.n(n),l=t(6),r=t.n(l),c=(t(161),t(99)),u=t(154),i=t(334),s=t(335),d=t(333),m=t(36),f=t(75),v=t.n(f),k=(t(178),t(179),[{title:"Key",dataIndex:"key",key:"key"},{title:"Value",dataIndex:"value",key:"value"}]),y=[{key:"",value:""}];var p=function(){var e=Object(n.useState)(y),a=Object(u.a)(e,2),t=a[0],l=a[1];return o.a.createElement("div",{className:"App"},o.a.createElement(i.a,null,o.a.createElement(s.a,{span:12},o.a.createElement(i.a,null,o.a.createElement(d.a,{columns:k,dataSource:t}))),o.a.createElement(s.a,{span:8},o.a.createElement(i.a,null,o.a.createElement(m.a,{onClick:function(e){e.preventDefault();var a=prompt("Input Key and Value Comma Separated");if(a){var n=a.split(",");v.a.post("/set",{key:n[0],value:n[1]}).then((function(e){console.log(e.data),alert("Message: "+e.data.message);for(var a=Array.from(t),n=!1,o=0;o<a.length;o++)if(a[o].key===e.data.key){a[o]={key:e.data.key,value:e.data.value},console.log(a),l(a),n=!0;break}n||l([].concat(Object(c.a)(a),[{key:e.data.key,value:e.data.value}]))}),(function(e){console.log(e)}))}}},"Set")),o.a.createElement(i.a,null,o.a.createElement(m.a,{onClick:function(e){e.preventDefault();var a=prompt("Input Key");if(a){var n=a.trim();v.a.post("/get",{key:n}).then((function(e){console.log(e.data),alert("Key: "+e.data.key+" Value: "+e.data.value);for(var a=Array.from(t),n=!1,o=0;o<a.length;o++)if(a[o].key===e.data.key){a[o]={key:e.data.key,value:e.data.value},console.log(a),l(a),n=!0;break}n||l([].concat(Object(c.a)(a),[{key:e.data.key,value:e.data.value}]))}),(function(e){console.log(e)}))}}},"Get")),o.a.createElement(i.a,null,o.a.createElement(m.a,{onClick:function(e){e.preventDefault();var a=prompt("Input Key");if(a){var n=a.trim();v.a.post("/delete",{key:n}).then((function(e){console.log(e.data),alert("Message: "+e.data.message);for(var a=Array.from(t),o=0;o<a.length;o++)if(a[o].key===n){a.splice(o,1),console.log(a),l(a);break}}),(function(e){console.log(e)}))}}},"Delete")))))};Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));r.a.render(o.a.createElement(o.a.StrictMode,null,o.a.createElement(p,null)),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()})).catch((function(e){console.error(e.message)}))}},[[156,1,2]]]);
  //# sourceMappingURL=main.1b5a5580.chunk.js.map