(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[219],{1068:function(e,l,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/[slug]",function(){return t(9703)}])},5514:function(e,l,t){"use strict";t.d(l,{Jx:function(){return ArticleContent},Um:function(){return ArticleHero},Se:function(){return ArticleImage},jO:function(){return ArticleSubscribe},U5:function(){return ArticleTileGrid}});var r=t(2322),a=t(1501),i=t(7280),s=t.n(i),n=t(204),d=t(2562);let EmbeddedEntry=e=>(null==e?void 0:e.__typename)==="ComponentRichImage"?(0,r.jsx)(ArticleImage,{image:e}):null,contentfulBaseRichTextOptions=e=>{let{links:l}=e;return{renderNode:{[d.BLOCKS.EMBEDDED_ENTRY]:e=>{var t,a;let i=null==l?void 0:null===(a=l.entries)||void 0===a?void 0:null===(t=a.block)||void 0===t?void 0:t.find(l=>{var t;return(null==l?void 0:null===(t=l.sys)||void 0===t?void 0:t.id)===e.data.target.sys.id});return i?(0,r.jsx)(EmbeddedEntry,{...i}):null}}}},CtfRichText=e=>{let{json:l,links:t}=e,a=contentfulBaseRichTextOptions({links:t,json:l});return(0,r.jsx)("article",{className:"mt-16 prose prose-lg ".concat(s().variable," font-prose max-w-none"),children:(0,n.h)(l,a)})};var o=t(6577),c=t.n(o),u=t(8174);let CtfImage=e=>{let{url:l,width:t,height:a,title:i,nextImageProps:s}=e;if(!l||!t||!a)return null;let n=new URL(l);return n.searchParams.set("w","10"),(0,r.jsx)(c(),{src:l,width:t,height:a,alt:i||"",sizes:"(max-width: 1200px) 100vw, 50vw",placeholder:"blur",blurDataURL:n.toString(),...s,className:(0,u.m)(null==s?void 0:s.className,"transition-all")})},ArticleAuthor=e=>{let{article:l}=e,{author:t}=l,i=(0,a.$Q)({entryId:null==t?void 0:t.sys.id});return(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("div",{className:"mr-2 overflow-hidden rounded-full border border-blue500",...i({fieldId:"avatar"}),children:(null==t?void 0:t.avatar)&&(0,r.jsx)(CtfImage,{nextImageProps:{width:36,height:36,sizes:void 0,placeholder:void 0},...t.avatar})}),(0,r.jsx)("span",{className:"text-base leading-none text-gray600",...i({fieldId:"name"}),children:null==t?void 0:t.name})]})},ArticleContent=e=>{let{article:l}=e,{content:t}=l,i=(0,a.$Q)({entryId:l.sys.id});return(0,r.jsx)("div",{...i({fieldId:"content"}),children:(0,r.jsx)(CtfRichText,{json:null==t?void 0:t.json,links:null==t?void 0:t.links})})};var m=t(7389);let ArticleLabel=e=>{let{children:l,className:t,...a}=e;return(0,r.jsx)("span",{className:(0,u.m)("rounded bg-purple200 px-2 py-1 text-xs font-semibold uppercase leading-none tracking-widest text-purple600",t),...a,children:l})};var x=t(5632);let formatDateFunc=e=>{let{date:l,locale:t}=e;return t&&l?new Intl.DateTimeFormat(t,{dateStyle:"long"}).format(new Date(l)):null},FormatDate=e=>{let{locale:l}=(0,x.useRouter)();return l?(0,r.jsx)(r.Fragment,{children:formatDateFunc({...e,locale:l})}):null},ArticleHero=e=>{let{article:l,isFeatured:t,isReversedLayout:i=!1}=e,{t:s}=(0,m.$G)(),n=(0,a.$Q)({entryId:l.sys.id}),{title:d,shortDescription:o,publishedDate:c}=l;return(0,r.jsxs)("div",{className:(0,u.m)("flex flex-col overflow-hidden rounded-2xl border border-gray300 shadow-lg",i?"lg:flex-row-reverse":"lg:flex-row"),children:[(0,r.jsx)("div",{className:"flex-1 basis-1/2",...n({fieldId:"featuredImage"}),children:l.featuredImage&&(0,r.jsx)(CtfImage,{nextImageProps:{className:"w-full",priority:!0,sizes:void 0},...l.featuredImage})}),(0,r.jsxs)("div",{className:"relative flex flex-1 basis-1/2 flex-col justify-center py-6 px-4 lg:px-16 lg:py-12 xl:px-24",children:[(0,r.jsxs)("div",{className:"mb-2 flex flex-wrap items-center",children:[(0,r.jsx)(ArticleAuthor,{article:l}),t&&(0,r.jsx)(ArticleLabel,{className:(0,u.m)("ml-auto pl-2 lg:absolute lg:top-8 xl:top-12",i?"lg:left-6 xl:left-12":"lg:right-6 xl:right-12"),children:s("article.featured")}),(0,r.jsx)("div",{className:(0,u.m)("ml-auto hidden pl-2 text-base text-gray600",i?"lg:block":""),...n({fieldId:"publishedDate"}),children:(0,r.jsx)(FormatDate,{date:c})})]}),(0,r.jsx)("h1",{...n({fieldId:"title"}),children:d}),o&&(0,r.jsx)("p",{className:"mt-2 text-xl",...n({fieldId:"shortDescription"}),children:o}),(0,r.jsx)("div",{className:(0,u.m)("mt-2 text-base text-gray600",i?"lg:hidden":""),...n({fieldId:"publishedDate"}),children:(0,r.jsx)(FormatDate,{date:c})})]})]})},ArticleImage=e=>{let{image:l}=e,t=(0,a.$Q)({entryId:l.sys.id});return l.image?(0,r.jsxs)("figure",{children:[(0,r.jsx)("div",{className:"flex justify-center",...t({fieldId:"image"}),children:(0,r.jsx)(CtfImage,{nextImageProps:{className:(0,u.m)("mt-0 mb-0 ",l.fullWidth?"md:w-screen md:max-w-[calc(100vw-40px)] md:shrink-0":"rounded-2xl border border-gray300 shadow-lg")},...l.image})}),l.caption&&(0,r.jsx)("figcaption",{className:"mt-4",...t({fieldId:"caption"}),children:l.caption})]}):null};var g=t(9097),f=t.n(g);let ArticleTile=e=>{let{article:l,className:t}=e,{title:i,publishedDate:s}=l,n=(0,a.$Q)({entryId:l.sys.id});return(0,r.jsx)(f(),{className:"flex flex-col",href:"/".concat(l.slug),children:(0,r.jsxs)("div",{className:(0,u.m)("flex flex-1 flex-col overflow-hidden rounded-2xl border border-gray300 shadow-lg",t),children:[l.featuredImage&&(0,r.jsx)("div",{...n({fieldId:"featuredImage"}),children:(0,r.jsx)(CtfImage,{nextImageProps:{className:"object-cover aspect-[16/10] w-full"},...l.featuredImage})}),(0,r.jsxs)("div",{className:"flex flex-1 flex-col py-3 px-4 md:px-5 md:py-4 lg:px-7 lg:py-5",children:[i&&(0,r.jsx)("p",{className:"h3 mb-2 text-gray800 md:mb-3",...n({fieldId:"title"}),children:i}),(0,r.jsxs)("div",{className:"mt-auto flex items-center",children:[(0,r.jsx)(ArticleAuthor,{article:l}),(0,r.jsx)("div",{className:(0,u.m)("ml-auto pl-2 text-base text-gray600"),...n({fieldId:"publishedDate"}),children:(0,r.jsx)(FormatDate,{date:s})})]})]})]})})},ArticleTileGrid=e=>{let{articles:l,className:t,...a}=e;return l&&l.length>0?(0,r.jsx)("div",{className:(0,u.m)("grid grid-cols-1 gap-y-4 gap-x-5 md:grid-cols-3 lg:gap-x-12 lg:gap-y-12",t),...a,children:l.map((e,l)=>e?(0,r.jsx)(ArticleTile,{article:e},l):null)}):null};var h=t(2784),p=t(5130);function ArticleSubscribe(){let e=(0,p.useSupabaseClient)(),[l,t]=(0,h.useState)(""),[a,i]=(0,h.useState)(!1),[s,n]=(0,h.useState)(!1);async function handleAddMe(r){if(r.preventDefault(),i(!0),/^[^@]+@[^@]+\.[^.]+$/.test(l)){let{error:t}=await e.from("mailing_list_temp").insert({email:l})}i(!1),n(!0),t("")}return(0,r.jsxs)("div",{className:"my-16 rounded-2xl border border-gray300 p-8 shadow-lg",children:[(0,r.jsx)("h2",{children:"Add yourself to our newsletter for more dating tips!"}),(0,r.jsx)("div",{className:"mt-4",children:(0,r.jsxs)("form",{onSubmit:handleAddMe,children:[(0,r.jsx)("input",{className:"mt-4 mr-4 border border-gray400 px-4 h-12 text-xl",type:"text",placeholder:"Email address",value:l,onChange:e=>t(e.target.value)}),(0,r.jsx)("button",{style:{backgroundColor:a||s?"gray":"black",color:"white",transition:"background-color 1s ease"},className:"mt-4 rounded-2xl px-6 h-12 text-lg",type:"submit",disabled:a||s,children:a?"Saving...":s?"✓ Saved":"Add Me"})]})})]})}},4802:function(e,l,t){"use strict";t.d(l,{L:function(){return SeoFields}});var r=t(2322),a=t(5153),i=t.n(a),s=t(5351),n=t(5632),d=t(3571);let generateUrl=(e,l)=>new URL(i().join("/blog",e,l),(0,d.S)()).toString(),SeoFields=e=>{let{pageTitle:l,pageDescription:t,noindex:a,nofollow:i,canonicalUrl:d,shareImagesCollection:o}=e,{locale:c,locales:u,asPath:m}=(0,n.useRouter)(),x=generateUrl(c||"",m),g=(null==u?void 0:u.map(e=>({hrefLang:e,href:generateUrl(e,m)})))||[];return(0,r.jsx)(s.PB,{title:l||void 0,description:t||void 0,canonical:d||x||"",nofollow:i||!1,noindex:a||!1,languageAlternates:g,openGraph:{type:"website",locale:c,url:x||"",title:l||void 0,description:t||void 0,images:null==o?void 0:o.items.map(e=>({url:(null==e?void 0:e.url)||"",width:(null==e?void 0:e.width)||0,height:(null==e?void 0:e.height)||0,alt:(null==e?void 0:e.description)||"",type:(null==e?void 0:e.contentType)||""}))},twitter:{site:x,cardType:"summary_large_image"}})}},9703:function(e,l,t){"use strict";t.r(l),t.d(l,{__N_SSG:function(){return o}});var r=t(2322),a=t(1501),i=t(7389),s=t(5514),n=t(4802),d=t(8984),o=!0;l.default=e=>{var l;let{t}=(0,i.$G)(),o=(0,a.pc)(e.blogPost),c=null==o?void 0:null===(l=o.relatedBlogPostsCollection)||void 0===l?void 0:l.items;if(o&&c)return(0,r.jsxs)(r.Fragment,{children:[o.seoFields&&(0,r.jsx)(n.L,{...o.seoFields}),(0,r.jsx)(d.W,{children:(0,r.jsx)(s.Um,{article:o,isFeatured:e.isFeatured,isReversedLayout:!0})}),(0,r.jsxs)(d.W,{className:"mt-8 max-w-4xl",children:[(0,r.jsx)(s.Jx,{article:o}),(0,r.jsx)(s.jO,{})]}),c&&c.length>0&&(0,r.jsxs)(d.W,{className:"mt-8 max-w-5xl",children:[(0,r.jsx)("h2",{className:"mb-4 md:mb-6",children:t("article.relatedArticles")}),(0,r.jsx)(s.U5,{className:"md:grid-cols-2",articles:c})]})]})}}},function(e){e.O(0,[103,774,888,179],function(){return e(e.s=1068)}),_N_E=e.O()}]);