PageSourceSearch

https://near-helloworld-app.vercel.app/_next/static/chunks/pages/index-537234f09930608c.js

js near-helloworld-app.vercel.app collected 2026-10-03 07:22:03 UTC 4,849 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[405],{8581:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return n(6295)}])},6295:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return x}});var s=n(4051),a=n.n(s),r=n(5893),o=n(7294),l=n(9008),c=n(1146),i=function(e){var t=e.viewMesage;return(0,r.jsxs)("div",{className:"mt-20 border border-blue-300 shadow rounded-md p-4 max-w-sm w-full mx-auto",children:[(0,r.jsxs)("div",{className:"animate-pulse flex space-x-4",children:[(0,r.jsx)("div",{className:"rounded-full bg-slate-200 h-10 w-10"}),(0,r.jsxs)("div",{className:"flex-1 space-y-6 py-1",children:[(0,r.jsx)("div",{className:"h-2 bg-slate-200 rounded"}),(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,r.jsx)("div",{className:"h-2 bg-slate-200 rounded col-span-2"}),(0,r.jsx)("div",{className:"h-2 bg-slate-200 rounded col-span-1"})]}),(0,r.jsx)("div",{className:"h-2 bg-slate-200 rounded"})]})]})]}),(0,r.jsx)("button",{className:"block mx-auto mt-4 rounded-md py-2 px-4 border-transparent bg-pink-600 hover:bg-pink-700 text-slate-200 font-medium disabled:bg-indigo-200",onClick:t,children:"Show a message"})]})};function d(e,t,n,s,a,r,o){try{var l=e[r](o),c=l.value}catch(i){return void n(i)}l.done?t(c):Promise.resolve(c).then(s,a)}function u(e){return function(){var t=this,n=arguments;return new Promise((function(s,a){var r=e.apply(t,n);function o(e){d(r,s,a,o,l,"next",e)}function l(e){d(r,s,a,o,l,"throw",e)}o(void 0)}))}}function x(){var e=(0,o.useContext)(c.z),t=e.account,n=e.contract,s=e.signIn,d=(0,o.useState)(!1),x=d[0],m=d[1],h=(0,o.useState)(""),p=h[0],f=h[1],g=(0,o.useState)(""),v=g[0],b=g[1],j=function(){var e=u(a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return m(!0),e.next=3,n.hello({message:v});case 3:f(""),b(""),m(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),N=function(){var e=u(a().mark((function e(){var s;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return f(""),e.next=3,n.get_hello({account_id:null===t||void 0===t?void 0:t.accountId});case 3:s=e.sent,f(s);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),w=function(){var e=u(a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s();case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,r.jsxs)("div",{className:"max-w-2xl mx-auto",children:[(0,r.jsxs)(l.default,{children:[(0,r.jsx)("title",{children:"Hello World Rust | Challenge #2 - Hello World Smart Contract"}),(0,r.jsx)("meta",{name:"description",content:"Challenge #2 - Hello World Smart Contract | Generated by create next app"}),(0,r.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,r.jsxs)("main",{className:"mx-auto mt-24",children:[(0,r.jsxs)("h1",{className:"text-slate-900 font-extrabold text-4xl sm:text-5xl lg:text-6xl tracking-tight text-center",children:[(0,r.jsx)("span",{className:" inline-block animate-wiggle",children:"\ud83d\udc4b"})," Hello NEAR!"]}),t?(0,r.jsxs)("p",{className:"mt-4 mb-8 mx-auto text-center text-indigo-600",children:[(0,r.jsx)("strong",{children:"Hello, "})," ",t.accountId]}):(0,r.jsx)("div",{className:"inset-x-0 flex justify-center pt-8 mb-16",children:(0,r.jsx)("button",{className:"bg-slate-800 hover:bg-slate-600 text-white font-semibold h-12 px-6 rounded-lg w-full flex items-center justify-center sm:w-auto",onClick:w,children:"Connect Wallet"})}),(0,r.jsx)("hr",{className:"my-24 max-w-sm mx-auto"}),(0,r.jsxs)("div",{className:"max-w-sm mx-auto",children:[(0,r.jsx)("textarea",{rows:"1",onChange:function(e){var t=e.target.value;b(t)},value:v,placeholder:"Please leave your name or message :)",className:"p-4 shadow-sm focus:ring-indigo-500 focus:border-indigo-500 mt-1 block w-full sm:text-sm border border-gray-300 rounded-md"}),(0,r.jsx)("div",{className:"text-right mt-4 mb-24",children:(0,r.jsx)("button",{className:"rounded-md py-2 px-4 border-transparent bg-indigo-700 hover:bg-indigo-600 text-slate-200 font-medium disabled:bg-indigo-200",onClick:j,disabled:!t||x,children:"Send a message"})})]}),p?(0,r.jsx)("p",{className:"mt-4 mb-8 mx-auto text-center text-indigo-600",children:"You've said: ".concat(p)}):(0,r.jsx)(i,{viewMesage:N})]}),(0,r.jsx)("footer",{className:"pt-16 text-center leading-4 text-slate-700",children:(0,r.jsxs)("p",{children:["NEAR Hello World App with Rust + Next.js"," | ",(0,r.jsx)("a",{className:"text-teal-500",href:"https://github.com/Phonbopit/near-helloworld-app",children:"Source Code"})]})})]})}},9008:function(e,t,n){e.exports=n(3121)}},function(e){e.O(0,[774,888,179],(function(){return t=8581,e(e.s=t);var t}));var t=e.O();_N_E=t}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.