PageSourceSearch

https://dumart.xyz/_next/static/chunks/pages/dashboard/settings/layout-1df2f9ad75b6496a.js

js dumart.xyz collected 2026-09-26 17:54:27 UTC 7,720 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4539],{81881:function(e,s,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dashboard/settings/layout",function(){return r(93290)}])},93290:function(e,s,r){"use strict";r.r(s);var l=r(85893),a=r(67294),t=r(25617),i=r(22920),n=r(59734),c=r(6674),o=r(18214),d=r(37449);let SettingsPageLayout=()=>{let{data:e,error:s}=(0,n.ZP)("/api/settings",d.gN),[r,u]=(0,a.useState)([]);(0,a.useEffect)(()=>{e&&e.settings&&u(e.settings)},[e]);let[m,p]=(0,a.useState)(""),{session:f}=(0,t.v9)(e=>e.localSession),[h,x]=(0,a.useState)({});(0,a.useEffect)(()=>{x((0,d.wn)(f,"settings"))},[f]);let N=(0,a.useRef)(),j=(0,a.useRef)(),b=(0,a.useRef)(),y=(0,a.useRef)(),v=(0,a.useRef)(),g=(0,a.useRef)(),F=(0,a.useRef)(),S=(0,a.useRef)(),w=(0,a.useRef)(),R=(0,a.useRef)(),V=(0,a.useRef)(),_=(0,a.useRef)(),A=(0,a.useRef)(),P=(0,a.useRef)(),k=(0,a.useRef)(),E=(0,a.useRef)(),B=(0,a.useRef)(),D=(0,a.useRef)(),handleForm=async e=>{e.preventDefault(),p("loading");try{let e={security:{title:A.current.value.trim(),description:P.current.value.trim()},support:{title:k.current.value.trim(),description:E.current.value.trim()},delivery:{title:B.current.value.trim(),description:D.current.value.trim()}},s={facebook:S.current.value.trim(),instagram:w.current.value.trim(),twitter:R.current.value.trim(),youtube:V.current.value.trim(),pinterest:_.current.value.trim()},r={phoneHeader:N.current.value.trim(),shortAddress:y.current.value.trim(),phoneFooter:j.current.value.trim(),email:b.current.value.trim(),address:v.current.value.trim(),description:g.current.value.trim(),copyright:F.current.value.trim(),social:JSON.stringify(s),footerBanner:JSON.stringify(e)},l=new FormData;for(let e in r)l.append(e,r[e]);let a=await (0,d.qC)("/api/settings?scope=layout",l);a.success?i.Am.success("Setting Updated Successfully"):i.Am.error("Something Went Wrong (500)")}catch(e){i.Am.error("Something Went Wrong (".concat(e.message,")"))}p("")};return(0,l.jsx)(l.Fragment,{children:s?(0,l.jsx)("div",{className:"text-center text-danger",children:"failed to load"}):r._id?(0,l.jsxs)("form",{onSubmit:handleForm,children:[(0,l.jsxs)("div",{className:"card mb-5 border-0 shadow",children:[(0,l.jsx)("div",{className:"card-header bg-white py-3 fw-bold",children:"Header Settings"}),(0,l.jsxs)("div",{className:"card-body",children:[(0,l.jsxs)("div",{className:"py-3",children:[(0,l.jsx)("label",{htmlFor:"inp-1",className:"form-label",children:"Phone Number*"}),(0,l.jsx)("input",{type:"text",ref:N,id:"inp-1",defaultValue:r.phoneHeader,className:"form-control",required:!0})]}),(0,l.jsxs)("div",{className:"py-3",children:[(0,l.jsx)("label",{htmlFor:"inp-2",className:"form-label",children:"Short Address*"}),(0,l.jsx)("input",{type:"text",ref:y,id:"inp-2",defaultValue:r.shortAddress,className:"form-control",required:!0})]})]})]}),(0,l.jsxs)("div",{className:"card mb-5 border-0 shadow",children:[(0,l.jsx)("div",{className:"card-header bg-white py-3 fw-bold",children:"Footer Settings"}),(0,l.jsxs)("div",{className:"card-body",children:[(0,l.jsxs)("div",{className:"py-3",children:[(0,l.jsx)("label",{htmlFor:"inp-3",className:"form-label",children:"Email Address"}),(0,l.jsx)("input",{type:"text",ref:b,id:"inp-3",defaultValue:r.email,className:"form-control"})]}),(0,l.jsxs)("div",{className:"py-3",children:[(0,l.jsx)("label",{htmlFor:"inp-4",className:"form-label",children:"Phone Number"}),(0,l.jsx)("input",{type:"text",ref:j,id:"inp-4",defaultValue:r.phoneFooter,className:"form-control"})]}),(0,l.jsxs)("div",{className:"py-3",children:[(0,l.jsx)("label",{htmlFor:"inp-5",className:"form-label",children:"Full Address*"}),(0,l.jsx)("textarea",{id:"inp-5",ref:v,defaultValue:r.address,className:"form-control",required:!0})]}),(0,l.jsxs)("div",{className:"py-3",children:[(0,l.jsx)("label",{htmlFor:"inp-15",className:"form-label",children:"About description*"}),(0,l.jsx)("textarea",{id:"inp-15",ref:g,defaultValue:r.description,className:"form-control",required:!0})]}),(0,l.jsxs)("div",{className:"py-3",children:[(0,l.jsx)("label",{htmlFor:"inp-4",className:"form-label",children:"Copyright"}),(0,l.jsx)("input",{type:"text",ref:F,id:"inp-4",defaultValue:r.copyright,className:"form-control"})]})]})]}),(0,l.jsxs)("div",{className:"card mb-5 border-0 shadow",children:[(0,l.jsx)("div",{className:"card-header bg-white py-3 fw-bold",children:"Footer Widget"}),(0,l.jsxs)("div",{className:"card-body",children:[(0,l.jsxs)("div",{className:"py-3",children:[(0,l.jsx)("label",{htmlFor:"inp-35",className:"form-label",children:"Delivery Section"}),(0,l.jsx)("input",{type:"text",ref:B,id:"inp-35",defaultValue:r.footerBanner.delivery.title,className:"form-control"})]}),(0,l.jsxs)("div",{className:"py-3",children:[(0,l.jsx)("label",{htmlFor:"inp-36",className:"form-label",children:"Delivery Short Description"}),(0,l.jsx)("input",{type:"text",ref:D,id:"inp-36",defaultValue:r.footerBanner.delivery.description,className:"form-control"})]}),(0,l.jsxs)("div",{className:"py-3",children:[(0,l.jsx)("label",{htmlFor:"inp-31",className:"form-label",children:"Return Section"}),(0,l.jsx)("input",{type:"text",ref:A,id:"inp-31",defaultValue:r.footerBanner.security.title,className:"form-control"})]}),(0,l.jsxs)("div",{className:"py-3",children:[(0,l.jsx)("label",{htmlFor:"inp-32",className:"form-label",children:"Return Short Description"}),(0,l.jsx)("input",{type:"text",ref:P,id:"inp-32",defaultValue:r.footerBanner.security.description,className:"form-control"})]}),(0,l.jsxs)("div",{className:"py-3",children:[(0,l.jsx)("label",{htmlFor:"inp-33",className:"form-label",children:"Shop Section"}),(0,l.jsx)("input",{type:"text",ref:k,id:"inp-33",defaultValue:r.footerBanner.support.title,className:"form-control"})]}),(0,l.jsxs)("div",{className:"py-3",children:[(0,l.jsx)("label",{htmlFor:"inp-34",className:"form-label",children:"Shop Short Description"}),(0,l.jsx)("input",{type:"text",ref:E,id:"inp-34",defaultValue:r.footerBanner.support.description,className:"form-control"})]})]})]}),(0,l.jsxs)("div",{className:"card mb-5 border-0 shadow",children:[(0,l.jsx)("div",{className:"card-header bg-white py-3 fw-bold",children:"Social Link Settings"}),(0,l.jsxs)("div",{className:"card-body",children:[(0,l.jsxs)("div",{className:"py-3",children:[(0,l.jsx)("label",{htmlFor:"inp-6",className:"form-label",children:"Facebook"}),(0,l.jsx)("input",{type:"url",ref:S,defaultValue:r.social.facebook,id:"inp-6",className:"form-control"})]}),(0,l.jsxs)("div",{className:"py-3",children:[(0,l.jsx)("label",{htmlFor:"inp-7",className:"form-label",children:"Instagram"}),(0,l.jsx)("input",{type:"url",ref:w,defaultValue:r.social.instagram,id:"inp-7",className:"form-control"})]}),(0,l.jsxs)("div",{className:"py-3",children:[(0,l.jsx)("label",{htmlFor:"inp-8",className:"form-label",children:"Twitter"}),(0,l.jsx)("input",{type:"url",ref:R,defaultValue:r.social.twitter,id:"inp-8",className:"form-control"})]}),(0,l.jsxs)("div",{className:"py-3",children:[(0,l.jsx)("label",{htmlFor:"inp-9",className:"form-label",children:"Youtube"}),(0,l.jsx)("input",{type:"url",ref:V,defaultValue:r.social.youtube,id:"inp-9",className:"form-control"})]}),(0,l.jsxs)("div",{className:"py-3",children:[(0,l.jsx)("label",{htmlFor:"inp-10",className:"form-label",children:"Pinterest"}),(0,l.jsx)("input",{type:"url",ref:_,defaultValue:r.social.pinterest,id:"inp-10",className:"form-control"})]})]})]}),h.edit&&(0,l.jsx)("div",{className:"py-3",children:(0,l.jsx)(c.default,{type:"submit",text:"Update",state:m})})]}):(0,l.jsx)(o.default,{})})};SettingsPageLayout.requireAuthAdmin=!0,SettingsPageLayout.dashboard=!0,s.default=SettingsPageLayout}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=81881)}),_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.