PageSourceSearch

https://www.techshotsapp.com/_next/static/chunks/pages/cms/viewEditors-d2817250ea6e8091.js

js techshotsapp.com collected 2026-10-04 13:25:23 UTC 8,252 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9246],{47882:function(e,a,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/cms/viewEditors",function(){return s(22236)}])},40287:function(e,a){"use strict";a.Z={src:"/_next/static/media/logo.d4ee6930.svg",height:1e3,width:4e3,blurWidth:0,blurHeight:0}},5681:function(e,a,s){"use strict";s.d(a,{R:function(){return CmsNavbar}});var n=s(85893),r=s(67294),l=s(41664),i=s.n(l),c=s(40287),t=s(10840),d=s.n(t),o=s(25675),m=s.n(o),h=s(19451),v=s(11163),x=s(24169);let CmsNavbar=()=>{let e=(0,h.v0)(),a=(0,r.useContext)(x.S),s=null==a?void 0:a.user,l=(0,v.useRouter)(),signOut=async()=>{await e.signOut(),await l.push("/")};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("header",{className:"navbar sticky-top flex-md-nowrap p-0 shadow ","data-bs-theme":"dark",children:[(0,n.jsx)(i(),{className:"navbar-brand ".concat(d().brand," col-md-3 col-lg-2 me-0 px-3 "),href:"/cms",children:(0,n.jsx)(m(),{className:d().logo,src:c.Z,alt:"TechShots Logo",height:50,width:230})}),(0,n.jsx)("ul",{className:"navbar-nav flex-row d-lg-none",children:(0,n.jsx)("li",{className:"nav-item text-nowrap",children:(0,n.jsx)("button",{className:"nav-link px-3 btn btn-light",type:"button","data-bs-toggle":"offcanvas","data-bs-target":"#sidebarMenu","aria-controls":"sidebarMenu","aria-expanded":"false","aria-label":"Toggle navigation",children:(0,n.jsx)("span",{className:"navbar-toggler-icon"})})})}),(0,n.jsx)("div",{id:"navbarSearch",className:"navbar-search w-100 collapse",children:(0,n.jsx)("input",{className:"form-control w-100 rounded-0 border-0",type:"text",placeholder:"Search","aria-label":"Search"})})]}),(0,n.jsx)("div",{className:"sidebar border border-right col-lg-2 p-0 bg-body-tertiary",children:(0,n.jsxs)("div",{className:"offcanvas-lg offcanvas-end bg-body-tertiary",tabIndex:-1,id:"sidebarMenu","aria-labelledby":"sidebarMenuLabel",children:[(0,n.jsxs)("div",{className:"offcanvas-header",children:[(0,n.jsx)("h5",{className:"offcanvas-title w-100",id:"offcanvasNavbarLabel",children:s?(0,n.jsx)("div",{className:"border-bottom  ",children:(0,n.jsxs)("h4",{children:["Hello, ",s.name]})}):(0,n.jsx)(i(),{className:"navbar-brand ".concat(d().brand," m-0 "),href:"/",children:(0,n.jsx)(m(),{className:d().logo,src:c.Z,alt:"TechShots Logo",height:60,width:250})})}),(0,n.jsx)("button",{type:"button",className:"btn-close","data-bs-dismiss":"offcanvas","data-bs-target":"#sidebarMenu","aria-label":"Close"})]}),(0,n.jsxs)("div",{className:"offcanvas-body d-md-flex flex-column p-0 pt-lg-3 overflow-y-auto",children:[(0,n.jsxs)("ul",{className:"nav flex-column",children:[(0,n.jsx)("li",{className:"nav-item",children:(0,n.jsx)(i(),{className:"nav-link d-flex align-items-center gap-2 active","aria-current":"page",href:"/cms",children:"CMS Home"})}),(0,n.jsx)("li",{className:"nav-item",children:(0,n.jsx)(i(),{className:"nav-link d-flex align-items-center gap-2",href:"/cms/newsHistory",children:"News History"})}),(0,n.jsx)("li",{className:"nav-item",children:(0,n.jsx)(i(),{className:"nav-link d-flex align-items-center gap-2 active","aria-current":"page",href:"/cms/createNews",children:"Create News"})}),(0,n.jsx)("li",{className:"nav-item",children:(0,n.jsx)(i(),{className:"nav-link d-flex align-items-center gap-2",href:"/cms/createEditor",children:"Create Editor"})}),(0,n.jsx)("li",{className:"nav-item",children:(0,n.jsx)(i(),{className:"nav-link d-flex align-items-center gap-2",href:"/cms/viewEditors",children:"View Editors/Admins"})}),(0,n.jsx)("li",{className:"nav-item",children:(0,n.jsx)(i(),{className:"nav-link d-flex align-items-center gap-2 active","aria-current":"page",href:"/cms/category",children:"Category"})}),(0,n.jsx)("li",{className:"nav-item",children:(0,n.jsx)(i(),{className:"nav-link d-flex align-items-center gap-2 active","aria-current":"page",href:"/cms/newsletter",children:"Newsletter"})}),(0,n.jsx)("li",{className:"nav-item",children:(0,n.jsx)(i(),{className:"nav-link d-flex align-items-center gap-2 active","aria-current":"page",href:"/cms/archives",children:"Newsletter Archives"})}),(0,n.jsx)("li",{className:"nav-item",children:(0,n.jsx)(i(),{className:"nav-link d-flex align-items-center gap-2 active","aria-current":"page",href:" /cms/ugcApproval",children:"UGC Creator Approval"})}),(0,n.jsx)("li",{children:(0,n.jsx)(i(),{className:"nav-link d-flex align-items-center gap-2 active","aria-current":"page",href:" /cms/UGCArticleApproval",children:"UGC Article Approval"})})]}),(0,n.jsx)("hr",{className:"my-3"}),(0,n.jsx)("ul",{className:"nav flex-column mb-auto",children:(0,n.jsx)("li",{className:"nav-item",children:(0,n.jsx)("button",{className:"btn btn-link text-center ",onClick:signOut,children:"Sign Out"})})})]})]})})]})}},22236:function(e,a,s){"use strict";s.r(a),s.d(a,{__N_SSP:function(){return c}});var n=s(85893),r=s(5681),l=s(19451),i=s(67294);let Table=e=>{let{data:a,roleLabel:s,removingUid:r,onRemove:l}=e;return(0,n.jsxs)("table",{className:"table",children:[(0,n.jsx)("thead",{children:(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{scope:"col",children:"Name"}),(0,n.jsx)("th",{scope:"col",children:"Email"}),(0,n.jsx)("th",{scope:"col",children:"Action"})]})}),(0,n.jsx)("tbody",{children:a.map(e=>{let a=r===e.uid;return(0,n.jsxs)("tr",{children:[(0,n.jsx)("td",{children:e.name}),(0,n.jsx)("td",{children:e.email}),(0,n.jsx)("td",{children:(0,n.jsx)("button",{className:"btn btn-sm btn-outline-danger",disabled:a,onClick:()=>{l(e.uid,s)},children:a?"Removing...":"Remove"})})]},e.uid)})})]})};var c=!0;a.default=e=>{let{admins:a,editors:s}=e,[c,t]=(0,i.useState)(a),[d,o]=(0,i.useState)(s),[m,h]=(0,i.useState)(null),[v,x]=(0,i.useState)(""),b=(0,i.useMemo)(()=>c.length>0||d.length>0,[c.length,d.length]),handleRemove=async(e,a)=>{let s=window.confirm("Remove this ".concat(a.toLowerCase()," account? This will delete their CMS access."));if(s)try{x(""),h(e);let s=(0,l.v0)(),n=s.currentUser;if(!n)throw Error("Please login again.");let r=await n.getIdToken(),i=await fetch("/api/cms/createEditor",{method:"DELETE",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(r)},body:JSON.stringify({uid:e})}),c=await i.json().catch(()=>null);if(!i.ok)throw Error((null==c?void 0:c.Message)||"Failed to remove user");"Admin"===a?t(a=>a.filter(a=>a.uid!==e)):o(a=>a.filter(a=>a.uid!==e))}catch(a){let e=a instanceof Error?a.message:"Failed to remove user";x(e)}finally{h(null)}};return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{className:"container-fluid",children:(0,n.jsxs)("div",{className:"row",children:[(0,n.jsx)(r.R,{}),(0,n.jsxs)("div",{className:"col-md-9 col-lg-10",children:[(0,n.jsx)("div",{className:"row mt-4",children:(0,n.jsxs)("div",{className:"col-12",children:[v?(0,n.jsx)("div",{className:"alert alert-danger",role:"alert",children:v}):null,b?null:(0,n.jsx)("p",{children:"No admins or editors found."}),(0,n.jsx)("div",{className:"row",children:(0,n.jsxs)("div",{className:"col-12",children:[(0,n.jsx)("h4",{children:"Admins"}),(0,n.jsx)("hr",{})]})}),(0,n.jsx)(Table,{data:c,roleLabel:"Admin",removingUid:m,onRemove:handleRemove})]})}),(0,n.jsx)("div",{className:"row",children:(0,n.jsxs)("div",{className:"col-12",children:[(0,n.jsx)("div",{className:"row mt-2",children:(0,n.jsxs)("div",{className:"col-12",children:[(0,n.jsx)("h4",{children:"Editors"}),(0,n.jsx)("hr",{})]})}),(0,n.jsx)(Table,{data:d,roleLabel:"Editor",removingUid:m,onRemove:handleRemove})]})})]})]})})})}},10840:function(e){e.exports={navbar:"cmsnavbar_navbar__XTb0t",brand:"cmsnavbar_brand__gK64P",logo:"cmsnavbar_logo__IJLqu","navbar-search":"cmsnavbar_navbar-search__56qkO","form-control":"cmsnavbar_form-control___c70X",sidebar:"cmsnavbar_sidebar__7KHM6","nav-link":"cmsnavbar_nav-link__aaBgj",active:"cmsnavbar_active__BBZNW","offcanvas-lg":"cmsnavbar_offcanvas-lg__wIEL0",show:"cmsnavbar_show__TfSDF","offcanvas-header":"cmsnavbar_offcanvas-header__RxWpN","offcanvas-title":"cmsnavbar_offcanvas-title__5nu2A","btn-link":"cmsnavbar_bt
1n-link__7KFzX","navbar-brand":"cmsnavbar_navbar-brand__gDZCu","navbar-nav":"cmsnavbar_navbar-nav__Dnga1","flex-row":"cmsnavbar_flex-row__iK_x7","d-lg-none":"cmsnavbar_d-lg-none__HSvqa"}}},function(e){e.O(0,[1664,5675,9774,2888,179],function(){return e(e.s=47882)}),_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.