PageSourceSearch

https://fim-drfrisch.lovable.app/assets/BlogPost-BSnT8F2Y.js

js fim-drfrisch.lovable.app collected 2026-10-03 03:31:43 UTC 6,075 bytes, 1 lines download raw bytes

1import{q as B,d as D,u as M,r as l,s as o,j as e,H as f,F as j,S as q,B as n,k as z,a as d,h as m}from"./index-DjW-rSIc.js";import{B as b}from"./badge-hz2vF8RT.js";import{I as _}from"./ImageWithPlaceholder-PslQleem.js";import{A}from"./arrow-left-l95oIIpe.js";import{C as F}from"./clock-FBv9ALX9.js";import{S as E}from"./share-2-D9ZBBccm.js";import{f as T}from"./format-BOBWS5Wu.js";function J(){const{slug:c}=B(),i=D(),{toast:N}=M(),[s,v]=l.useState(null),[h,y]=l.useState([]),[x,w]=l.useState([]),[C,p]=l.useState(!0);l.useEffect(()=>{c&&S(c)},[c]);const S=async t=>{p(!0);const{data:a,error:k}=await o.from("blog_posts").select("*, content_categories(name, slug)").eq("slug",t).eq("status","published").single();if(k||!a){i("/blog");return}v(a);const{data:u}=await o.from("blog_post_tags").select("tag_id, content_tags(id, name, slug)").eq("blog_post_id",a.id);if(u&&y(u.map(r=>r.content_tags).filter(Boolean)),await o.from("blog_posts").update({view_count:(a.view_count||0)+1}).eq("id",a.id),a.category_id){const{data:r}=await o.from("blog_posts").select("*, content_categories(name, slug)").eq("category_id",a.category_id).eq("status","published").neq("id",a.id).limit(3);r&&w(r)}p(!1)},P=async()=>{if(navigator.share)try{await navigator.share({title:s.title,text:s.excerpt||s.title,url:window.location.href})}catch{}else navigator.clipboard.writeText(window.location.href),N({title:"Link copied to clipboard!"})};if(C)return e.jsxs("div",{className:"min-h-screen flex flex-col",children:[e.jsx(f,{}),e.jsx("main",{className:"flex-1 flex items-center justify-center mt-20",children:e.jsx("div",{children:"Loading..."})}),e.jsx(j,{})]});if(!s)return null;const g=s?{"@context":"https://schema.org","@type":"Article",headline:s.title,description:s.excerpt||s.seo_description,image:s.featured_image_url?`https://fim.md${s.featured_image_url}`:"https://fim.md/social-preview.jpg",datePublished:s.published_at,dateModified:s.updated_at||s.published_at,author:{"@type":"Person",name:"Dr. Anna Frisch, MD, PhD",url:"https://fim.md",jobTitle:"Board-Certified Endocrinologist"},publisher:{"@type":"Organization",name:"Frisch Integrative Medicine",logo:{"@type":"ImageObject",url:"https://fim.md/favicon.png"}},mainEntityOfPage:{"@type":"WebPage","@id":`https://fim.md/blog/${s.slug}`}}:null;return e.jsxs("div",{className:"min-h-screen flex flex-col",children:[e.jsx(q,{title:s.seo_title||s.title,description:s.seo_description||s.excerpt,canonical:`/blog/${s.slug}`,ogImage:s.featured_image_url,ogType:"article"}),g&&e.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(g)}}),e.jsx(f,{}),e.jsx("main",{className:"flex-1 mt-20",children:e.jsx("article",{className:"py-12",children:e.jsxs("div",{className:"container mx-auto px-4 max-w-4xl",children:[e.jsxs(n,{variant:"ghost",onClick:()=>i("/blog"),className:"mb-6",children:[e.jsx(A,{className:"mr-2 h-4 w-4"}),"Back to Blog"]}),s.content_categories&&e.jsx(b,{variant:"secondary",className:"mb-4",children:s.content_categories.name}),h.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2 mb-4",children:h.map(t=>e.jsx(b,{variant:"outline",className:"text-xs",children:t.name},t.id))}),e.jsx("h1",{className:"text-4xl md:text-5xl font-bold mb-6",children:s.title}),s.excerpt&&e.jsx("p",{className:"text-xl text-muted-foreground mb-6",children:s.excerpt}),e.jsxs("div",{className:"flex items-center gap-6 mb-8 text-muted-foreground",children:[s.published_at&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(z,{className:"h-4 w-4"}),T(new Date(s.published_at),"MMMM d, yyyy")]}),s.reading_time&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(F,{className:"h-4 w-4"}),s.reading_time," min read"]}),e.jsxs(n,{variant:"ghost",size:"sm",onClick:P,children:[e.jsx(E,{className:"h-4 w-4 mr-2"}),"Share"]})]}),s.featured_image_url&&e.jsx(_,{src:s.featured_image_url,alt:s.title,className:"w-full rounded-lg mb-8"}),e.jsx("div",{className:"prose prose-lg max-w-none mb-12",style:{whiteSpace:"pre-wrap"},children:s.content}),e.jsx(d,{className:"bg-primary text-primary-foreground mb-12",children:e.jsxs(m,{className:"p-8 text-center",children:[e.jsx("h3",{className:"text-2xl font-bold mb-4",children:"Ready to Optimize Your Health?"}),e.jsx("p",{className:"mb-6 opacity-90",children:"Book a consultation with Dr. Frisch to discu
1ss your thyroid and hormone health"}),e.jsxs("div",{className:"flex gap-4 justify-center",children:[e.jsx(n,{variant:"secondary",size:"lg",onClick:()=>i("/#booking"),children:"Book Appointment"}),e.jsx(n,{variant:"outline",size:"lg",onClick:()=>i("/contact"),children:"Contact Us"})]})]})}),e.jsx(d,{className:"mb-12",children:e.jsx(m,{className:"p-6",children:e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("img",{src:"/images/dr-frisch-profile.avif",alt:"Dr. Anna Frisch",className:"w-20 h-20 rounded-full object-cover object-[center_20%]"}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-lg font-bold mb-2",children:"Dr. Anna Frisch, MD, PhD"}),e.jsx("p",{className:"text-muted-foreground",children:"Board-Certified Endocrinologist specializing in thyroid disorders, hormone optimization, and metabolic health. Dr. Frisch combines clinical expertise with academic research to provide personalized, evidence-based care that helps patients achieve optimal health."})]})]})})}),x.length>0&&e.jsxs("div",{children:[e.jsx("h3",{className:"text-2xl font-bold mb-6",children:"Related Articles"}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:x.map(t=>e.jsxs(d,{className:"cursor-pointer hover:shadow-lg transition-all",onClick:()=>i(`/blog/${t.slug}`),children:[t.featured_image_url&&e.jsx("div",{className:"aspect-video overflow-hidden",children:e.jsx(_,{src:t.featured_image_url,alt:t.title,className:"w-full h-full object-cover"})}),e.jsxs(m,{className:"p-4",children:[e.jsx("h4",{className:"font-bold mb-2 line-clamp-2",children:t.title}),e.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:t.excerpt})]})]},t.id))})]})]})})}),e.jsx(j,{})]})}export{J as default};

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.