PageSourceSearch

https://golf-medley.com/_next/static/chunks/pages/golfers/me/edit-3b58e992d118173b.js

js golf-medley.com collected 2026-09-30 21:07:11 UTC 8,930 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3774],{71197:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/golfers/me/edit",function(){return a(42743)}])},53953:function(e,t,a){"use strict";var n=a(85893);t.Z=e=>{let{children:t}=e;return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{className:"max-w-5xl mx-auto pb-2 lg:py-0 my-0 lg:my-6 rounded-lg bg-white-custom3",children:t})})}},69580:function(e,t,a){"use strict";var n=a(85893),s=a(41664),r=a.n(s),i=a(9008),l=a.n(i),c=a(90297),o=a.n(c);t.Z=e=>{let{list:t}=e,a=e=>{let t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return e.replace(/[&<>"']/g,e=>t[e])};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l(),{children:(0,n.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:'\n          {\n            "@context": "http://schema.org",\n            "@type": "BreadcrumbList",\n            "itemListElement": ['.concat((()=>{let e=t.map((e,n)=>n===t.length-1?'{ "type": "ListItem", "position": '.concat(n+2,', "name": "').concat(e.display,'" }'):'{\n          "type": "ListItem",\n          "position": '.concat(n+2,',\n          "name": "').concat(a(e.display),'",\n          "item": "').concat("https://golf-medley.com").concat(e.href,'"\n        }'));return['{\n        "type": "ListItem",\n        "position": 1,\n        "name": "ゴルフメドレーTOP",\n        "item": "'.concat("https://golf-medley.com",'"\n      }')].concat(e)})(),"]\n          }")}})}),(0,n.jsx)("div",{className:o().Wrapper,children:(0,n.jsxs)("span",{className:o().NotCurrentLayer,children:[(0,n.jsx)(r(),{href:"/",prefetch:!1,children:"ゴルフメドレーTOP"})," "," > ",t.map((e,a)=>a===t.length-1?(0,n.jsx)("span",{className:o().CurrentLayer,children:e.display},e.display):(0,n.jsxs)("span",{className:o().NotCurrentLayer,children:[(0,n.jsx)(r(),{href:e.href,"aria-label":e.display,prefetch:!1,children:e.display})," > "]},e.display))]})})]})}},42743:function(e,t,a){"use strict";a.r(t),a.d(t,{__N_SSP:function(){return g},default:function(){return f}});var n=a(85893),s=a(67294),r=a(9008),i=a.n(r),l=a(11163),c=a(85611),o=a(47858),d=a.n(o),m=a(49992),p=a(69580),u=a(82237),h=a.n(u),x=()=>{let e=(0,l.useRouter)(),{addToast:t}=(0,c.e1)(),a=async()=>{if(confirm("本当に退会しますか。退会すると元に戻すことはできません。")){if(204!==(await fetch("/api/me/withdraw",{method:"DELETE"})).status){t("退会処理に失敗しました。お手数おかけし恐縮ですが、お問い合わせフォームより退会希望の旨ご連絡お願いします。",{appearance:"error",autoDismiss:!0,autoDismissTimeout:1e4});return}t("退会処理が完了しました。ご利用ありがとうございました。",{appearance:"success",autoDismiss:!0,autoDismissTimeout:4e3}),await new Promise(e=>setTimeout(e,4e3)),e.push("/api/logout")}};return(0,n.jsx)("div",{className:h().Wrapper,children:(0,n.jsx)("div",{onClick:()=>a(),className:h().Withdraw,children:"退会する"})})},j=e=>{let{golfer:t}=e,[a,r]=(0,s.useState)(t.nickname),[i,o]=(0,s.useState)(t.gender),[u,h]=(0,s.useState)(t.birthday),[j,_]=(0,s.useState)(t.prefecture),[g,f]=(0,s.useState)(t.golfHistory),[y,N]=(0,s.useState)(t.golferType),[v,b]=(0,s.useState)(t.favoriteBrand),[I,T]=(0,s.useState)(t.link),[w,L]=(0,s.useState)(t.image),[E,C]=(0,s.useState)(""),W=(0,l.useRouter)(),{addToast:S}=(0,c.e1)(),k=async e=>{e.preventDefault();let t=await fetch("/api/me/edit",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({nickname:a,gender:i||"",birthday:u||"",prefecture:j||"",golfHistory:Number(g),golferType:y||"",favoriteBrand:v||"",link:I||"",imageFile:E})}),n=await t.json();S("プロフィールを更新しました!",{appearance:"success",autoDismiss:!0,autoDismissTimeout:3e3}),W.push("/golfers/[id]","/golfers/".concat(n.updateUser.golferId))},F=E||w||"/default_icon.png",R=[{display:"".concat(t.nickname,"さんのページ"),href:"/golfers/".concat(t.id)},{display:"編集"}];return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:d().Wrapper,children:[(0,n.jsx)("form",{onSubmit:k,children:(0,n.jsxs)("div",{className:d().Profile,children:[(0,n.jsxs)("div",{className:d().WrapImage,children:[(0,n.jsx)("img",{className:d().Image,src:F}),(0,n.jsxs)("label",{htmlFor:"image",className:d().ImageLabel,children:["アイコン変更",(0,n.jsx)("input",{type:"file",accept:"image/*",id:"image",className:d().ImageInput,onChange:e=>{e.preventDefault();let t=document.getElementById("canvas"),a=t.getContext("2d"),n=new Image;n.onload=()=>{let e=n.width,s=n.height,r=Math.min(100/e,100/s),i=e*r,l=s*r;
1t.width=i,t.height=l,a.drawImage(n,0,0,i,l),C(t.toDataURL("image/jpeg",.5))},n.src=URL.createObjectURL(e.target.files[0])}})]}),(0,n.jsx)("canvas",{id:"canvas",style:{display:"none"},width:"64",height:"64"})]}),(0,n.jsxs)("div",{className:d().Content,children:[(0,n.jsx)("table",{className:d().Table,children:(0,n.jsxs)("tbody",{children:[(0,n.jsx)("tr",{children:(0,n.jsx)("td",{colSpan:2,children:(0,n.jsx)("input",{className:"".concat(d().Nickname," ").concat(d().InputForm),type:"text",placeholder:"ユーザー名",value:a,onChange:e=>r(e.target.value)})})}),(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{children:"性別(非表示)"}),(0,n.jsxs)("td",{children:[(0,n.jsx)("input",{type:"radio",name:"gender",value:"man",id:"man",className:d().Radio,checked:"man"===i,onChange:()=>o("man")}),(0,n.jsx)("label",{htmlFor:"man",className:d().RadioLabel,children:"男性"}),(0,n.jsx)("input",{type:"radio",name:"gender",value:"woman",id:"woman",className:d().Radio,checked:"woman"===i,onChange:()=>o("woman")}),(0,n.jsx)("label",{htmlFor:"woman",className:d().RadioLabel,children:"女性"})]})]}),(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{children:"生年月日(非表示)"}),(0,n.jsx)("td",{children:(0,n.jsx)("input",{className:d().InputForm,type:"date",value:u,onChange:e=>h(e.target.value)})})]}),(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{children:"居住都道府県"}),(0,n.jsx)("td",{children:(0,n.jsxs)("select",{value:j,className:d().InputForm,onChange:e=>_(e.target.value),children:[(0,n.jsx)("option",{value:""}),Object.values(m.Z).map(e=>(0,n.jsx)("option",{value:e,children:e},e))]})})]}),(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{children:"ゴルフ歴"}),(0,n.jsxs)("td",{children:[(0,n.jsx)("input",{className:"".concat(d().InputForm," ").concat(d().GolfHistoryInput),type:"number",min:"0",max:"100",placeholder:"例:3",value:g,onChange:e=>{let t=e.target.value;""===t?f(null):f(Number(t))}}),"年"]})]}),(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{children:"ゴルファータイプ"}),(0,n.jsx)("td",{children:(0,n.jsxs)("select",{value:y,className:d().InputForm,onChange:e=>N(e.target.value),children:[(0,n.jsx)("option",{value:""}),(0,n.jsx)("option",{value:"ビギナー",children:"ビギナー"}),(0,n.jsx)("option",{value:"カジュアル",children:"カジュアル"}),(0,n.jsx)("option",{value:"アスリート",children:"アスリート"})]})})]}),(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{children:"好きなメーカー"}),(0,n.jsx)("td",{children:(0,n.jsx)("input",{className:d().InputForm,type:"text",placeholder:"例:キャロウェイ",value:v,onChange:e=>b(e.target.value)})})]}),(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{children:"個人ブログ、SNSアカウントのリンク"}),(0,n.jsx)("td",{children:(0,n.jsx)("input",{className:d().InputForm,type:"url",placeholder:"例:https://twitter.com/golf_medley",value:I,onChange:e=>T(e.target.value)})})]})]})}),(0,n.jsx)("div",{className:d().WrapButton,children:(0,n.jsx)("button",{className:d().Button,children:"登録"})})]})]})}),(0,n.jsx)(x,{})]}),(0,n.jsx)(p.Z,{list:R})]})},_=a(53953),g=!0,f=e=>{let{golfer:t}=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i(),{children:(0,n.jsxs)("title",{children:[t.nickname,"さんのページ - ゴルフメドレー"]})}),(0,n.jsx)(_.Z,{children:(0,n.jsx)(j,{golfer:t})})]})}},90297:function(e){e.exports={Wrapper:"Breadcrumbs_Wrapper___sjqf",CurrentLayer:"Breadcrumbs_CurrentLayer__bHw_B",NotCurrentLayer:"Breadcrumbs_NotCurrentLayer__x1_sr"}},82237:function(e){e.exports={Wrapper:"WithdrawUser_Wrapper__LkhWH",Withdraw:"WithdrawUser_Withdraw__Sa1W8"}},47858:function(e){e.exports={Wrapper:"EditTemplate_Wrapper__ytf8L",Profile:"EditTemplate_Profile__FjOkb",WrapImage:"EditTemplate_WrapImage__SK67J",Image:"EditTemplate_Image__Vtcc_",ImageLabel:"EditTemplate_ImageLabel__7t5A7",ImageInput:"EditTemplate_ImageInput__pT8zO",Nickname:"EditTemplate_Nickname__xY8iK",InputForm:"EditTemplate_InputForm__gDxrY",GolfHistoryInput:"EditTemplate_GolfHistoryInput__R99Ev",Table:"EditTemplate_Table__q_pLt",Radio:"EditTemplate_Radio__a13Rg",RadioLabel:"EditTemplate_RadioLabel__0eeAs",WrapButton:"EditTemplate_WrapButton__Cb09N",Button:"EditTemplate_Button__VbTM_"}}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=71197)}),_N_E=e.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.