1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9542],{87705:function(e,t,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/notion-link-generator",function(){return l(90693)}])},90693:function(e,t,l){"use strict";l.r(t),l.d(t,{__N_SSG:function(){return m},default:function(){return NotionLinkGenerator}});var s=l(52322),n=l(49746),r=l(68100);l(16724);var i=l(22678),a=l(66870),o=l(63397),d=l(12177),u=l(95950),c=l(2784),x=l(56626);/** 2 * @license lucide-react v0.336.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */let f=(0,x.Z)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);var m=!0;function NotionLinkGenerator(e){let{}=e,[t,l]=(0,c.useState)(null),[x,m]=(0,c.useState)(null),[h,p]=(0,c.useState)(!1),[j,v]=(0,c.useState)("Click to Copy");return(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(r.a26,{children:(0,s.jsxs)("div",{className:"flex-grow px-4 lg:px-0 background h-full",children:[(0,s.jsx)(n.ZP,{}),(0,s.jsxs)(r.nYC,{removePadding:"true",children:[(0,s.jsx)(r.$7D,{title:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"text-[#5F5E5B]",children:"Notion \xa0"}),"Link Generator "]}),subtitle:"Create a short link for your desired Notion links"}),(0,s.jsx)("div",{className:"pb-28",children:(0,s.jsx)("div",{className:"mt-4 mb-6 mx-auto w-full",children:(0,s.jsx)("div",{className:"mx-auto md:w-[500px] text-center items-center ",children:(0,s.jsx)(o.J9,{initialValues:{destination_url:"",suffix:""},onSubmit:(e,t)=>{let{setSubmitting:s}=t;s(!0),m(null);let n={destination_url:e.destination_url,suffix:e.suffix};d.o.post("/api/v1/notion-link-generator",n).then(t=>{l(t.data),s(!1),e.destination_url="",e.suffix=""}).catch(e=>{var t,l;m((null==e?void 0:null===(t=e.response)||void 0===t?void 0:t.data)?null===(l=e.response)||void 0===l?void 0:l.data:"An error occurred. Please contact support."),s(!1)})},children:e=>{var l,n;let{values:i,isSubmitting:a,handleSubmit:d}=e;return(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(o.l0,{className:"flex flex-col sm:flex-row items-center justify-center",children:(0,s.jsxs)("div",{className:"flex flex-col items-center w-full",children:[(0,s.jsxs)("div",{className:"w-full mb-4 flex flex-col justify-start items-start",children:[(0,s.jsx)("p",{className:"mb-2 text-sm md:text-md font-medium",children:"Enter your Notion Link here"}),(0,s.jsx)(o.gN,{className:"w-full pr-5 text-sm rounded-lg pl-5 z-0 border-2 ".concat((null==x?void 0:x.field_key)==="destination_url"?"border-red-200":"border-gray-200"," px-3 py-3 placeholder-gray-500"),type:"text",name:"destination_url",placeholder:"e.g. https://www.notion.so/Plan-for-March-xxxx.",value:i.destination_url}),(0,s.jsx)(u.B,{errorMessage:x,name:"destination_url"})]}),(0,s.jsxs)("div",{className:"w-full mb-3 flex flex-col justify-start items-start",children:[(0,s.jsx)("p",{className:"text-sm md:text-md font-medium",children:"Enter a Suffix for you link"}),(0,s.jsxs)("p",{className:"md:text-xs text-[11px] text-gray-700 mb-2 ",children:["(Your link will look something like: ",(0,s.jsx)("b",{children:"https://y.gy/<suffix>"}),")"]}),(0,s.jsx)(o.gN,{className:"pr-5 w-full text-sm rounded-lg pl-5 z-0 border-2 ".concat((null==x?void 0:x.field_key)==="suffix"?"border-red-200":"border-gray-200"," px-3 py-3 placeholder-gray-500"),type:"text",name:"suffix",placeholder:"e.g. notion_site",value:i.suffix}),(0,s.jsx)(u.B,{errorMessage:x,name:"suffix"})]}),(0,s.jsx)(r.zxk,{isSubmit:!0,className:"py-4 mt-3 mb-4",disabled:(null==i?void 0:null===(l=i.destination_url)||void 0===l?void 0:l.length)===0||(null==i?void 0:null===(n=i.suffix)||void 0===n?void 0:n.length)===0,children:"Generate Notion Link"}),t&&(null==t?void 0:t.url)&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{className:"mb-2",children:"Here's your shortened link:"}),(0,s.jsxs)("div",{className:"flex flex-row items-center",children:[(0,s.jsx)("p",{className:"mr-4 text-gray-600",children:t.url}),(0,s.jsx)(r.pnl,{children:(0,s.jsxs)(r.ua7,{open:h,children:[(0,s.jsx)(r.aJU,{className:"cursor-pointer bg-gray-100 p-2 rounded-lg focus:ring-0 focus:outline-0",onClick:e=>{e.preventDefault(),p(!0),v("Copied!"),navigator.clipboard.writeText(t.url)},onMouseLeave:()=>{p(!1),v("Click to Copy")},onMouseOver:()=>{p(!0)},children:(0,s.jsx)(f,{className:"h-4 w-4 text-gray-600"})}),(0,s.jsx)(r._vU,{className:h?"flex":"hidden",children:(0,s.jsx)("p",{children:j})})]})})]})]})]})})})}})})})})]}),(0,s.jsx)(i.Z,{}),(0,s.jsx)(a.Z,{})]})})})}}},function(e){e.O(0,[50,8987,6724,9774,2888,179],function(){return e(e.s=87705)}),_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.