1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[135],{3130:function(a,b,c){(window.__NEXT_P=window.__NEXT_P||[]).push(["/goals/[id]",function(){return c(4196)}])},4196:function(a,b,c){"use strict";c.r(b);var d=c(5893),e=c(5697),f=c.n(e),g=c(7294),h=c(1163),i=c(1664),j=c(6628),k=c(7484),l=c.n(k),m=c(2427),n=c(2001),o=c(3481),p=c(4018),q=c(7814),r=c(1436),s=c(5400),t=c(9008);function u(a){var b=a.goal,c=a.setGoal,e=a.user,f=a.completeGoal,j=(0,g.useState)(null),k=j[0],n=j[1],o=(0,h.useRouter)();(0,g.useEffect)(function(){var a=Array.isArray(o.query.id)?o.query.id[0]:o.query.id;a&&(c(a),n(a))},[e]);var u=function(a,b){a.stopPropagation(),f(b,a.target.checked)},v=function(a){a.stopPropagation()};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(t.default,{children:[(0,d.jsx)("title",{children:"Hero on a Mission â Goal"}),(0,d.jsx)("meta",{name:"description",content:"Hero on a Mission goal page"})]}),(0,d.jsx)(p.J,{children:(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"Page--title flex flex-col items-start justify-between lg:items-center lg:flex-row",children:[(0,d.jsxs)("div",{className:"flex items-center",children:[(0,d.jsx)(s.dF,{className:"Page--icon"}),(0,d.jsx)("h1",{children:b&&b.dynamic_fields&&b.dynamic_fields.goal_name?b.dynamic_fields.goal_name.content:"Goals"}),b&&(0,d.jsxs)("span",{className:"CreatedAt ml-2",children:["Created ",l()(b.created_at).format("MMM D")]})]}),(0,d.jsxs)("div",{className:"relative flex items-center p-1 mt-4 lg:mt-0",children:[(0,d.jsx)("input",{id:"goal"+(null==b?void 0:b.id),name:"goal"+(null==b?void 0:b.id),type:"checkbox",className:"Checkbox Checkbox--goal",checked:(null==b?void 0:b.completed_at)!=null,onChange:function(a){return u(a,null==b?void 0:b.id)},onClick:function(a){return v(a)},disabled:!(null==b?void 0:b.id)}),(0,d.jsxs)("label",{className:"flex items-center text-sm",htmlFor:"goal"+(null==b?void 0:b.id),children:[(0,d.jsx)("div",{className:"Checkbox--styled__guide ".concat((null==b?void 0:b.completed_at)!=null?"Checkbox--styled__guide-checked":""),children:(0,d.jsx)(q.G,{icon:r.LEp})}),(0,d.jsx)("span",{children:"Mark as completed"})]})]})]}),(0,d.jsx)("div",{className:"mb-4 -mt-2",children:(0,d.jsx)(i.default,{passHref:!0,href:"/goals",children:(0,d.jsxs)("a",{className:"Link--button inline-block font-medium",children:[(0,d.jsx)(q.G,{className:"mr-1 scale-90",icon:r.acZ}),"Back To Goals"]})})}),b&&b.id&&(0,d.jsx)(m.a,{},k)]})})]})}u.propTypes={goals:f().array,goal:f().object,dataTypes:f().array,loading:f().bool.isRequired,setGoal:f().func.isRequired},u.getLayout=function(a){return(0,d.jsx)(o.g1,{children:a})},b.default=(0,j.$j)(function(a){return{user:a.auth.user,goals:a.goals.goals,goal:a.goals.goal,loading:a.goals.loading,dataTypes:a.auth.user.data_types}},{clearGoal:n.xb,setGoal:n.gP,completeGoal:n.w3})(u)}},function(a){a.O(0,[662,672,65,481,698,540,427,774,888,179],function(){return a(a.s=3130)}),_N_E=a.O()}])
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.