{s.h}
{s.p}
// pns-case-page.jsx — case study detail page + structured data
const { useState: useCaseState, useEffect: useCaseEffect } = React;
const CT = window.PNST;
const CASES_DB = window.PNS_CASES || {};
const CASE_ORDER = window.PNS_CASE_ORDER || Object.keys(CASES_DB);
const C_SITE = (window.pnsWP && window.pnsWP.siteUrl) || '';
const cImg = (id, w) => (window.pnsWP?.images?.[id]) || `https://images.unsplash.com/photo-${id}?w=${w}&auto=format&fit=crop&q=80`;
const cUrl = (slug) => C_SITE ? `${C_SITE}case-studies/${slug}/` : `case-study.html?id=${slug}`;
const cPage = (slug) => C_SITE ? `${C_SITE}${slug}/` : ({services:'Services.html',portfolio:'Portfolio.html',contact:'Contact.html',pricing:'Pricing.html'})[slug];
const cService = (id) => (window.pnsWP?.serviceUrls?.[id]) || ((window.pnsWP?.serviceUrl || 'service.html') + '?id=' + id);
const CASE_SLUG = (() => {
if (window.PNS_CASE_SLUG && CASES_DB[window.PNS_CASE_SLUG]) return window.PNS_CASE_SLUG;
const q = new URLSearchParams(window.location.search).get('id');
if (q && CASES_DB[q]) return q;
const seg = window.location.pathname.split('/').filter(Boolean).pop();
if (seg && CASES_DB[seg]) return seg;
return CASE_ORDER[0];
})();
/* ── Structured data: Article + FAQPage + BreadcrumbList ────────── */
function injectCaseSchema(slug, cs) {
const url = cUrl(slug);
const base = C_SITE || '';
const graph = [
{ '@type':'Article', headline: cs.title, description: cs.metaDesc,
image: cImg(cs.heroImg, 1600), mainEntityOfPage: url, inLanguage:'en-US',
keywords: cs.keywords, articleSection: cs.cat,
author:{ '@type':'Organization', name:'Premier Network Solutions' },
publisher:{ '@type':'Organization', name:'Premier Network Solutions', url: base || undefined } },
{ '@type':'BreadcrumbList', itemListElement:[
{ '@type':'ListItem', position:1, name:'Home', item: base || '/' },
{ '@type':'ListItem', position:2, name:'Case Studies', item: cPage('portfolio') },
{ '@type':'ListItem', position:3, name: cs.title, item: url },
]},
{ '@type':'FAQPage', mainEntity: cs.faqs.map(f => ({
'@type':'Question', name: f.q,
acceptedAnswer:{ '@type':'Answer', text: f.a } })) },
];
const prev = document.getElementById('pns-case-schema');
if (prev) prev.remove();
const el = document.createElement('script');
el.type = 'application/ld+json';
el.id = 'pns-case-schema';
el.textContent = JSON.stringify({ '@context':'https://schema.org', '@graph': graph });
document.head.appendChild(el);
}
function setMeta(name, content, attr) {
if (!content) return;
let el = document.head.querySelector(`meta[${attr||'name'}="${name}"]`);
if (!el) { el = document.createElement('meta'); el.setAttribute(attr||'name', name); document.head.appendChild(el); }
el.setAttribute('content', content);
}
/* ── Pieces ─────────────────────────────────────────────────────── */
function CaseBreadcrumb({ cs }) {
const link = { fontFamily:CT.bd, fontSize:12.5, color:'rgba(255,255,255,0.55)', textDecoration:'none', whiteSpace:'nowrap' };
return (
);
}
function CaseHero({ cs }) {
return (
{t} {s.p} {r.d} {f.a}
Tell us where your technology stands today. A senior engineer will walk through the options with you — no sales script.
{rows.map(([k,v]) => (
The Challenge
{cs.challenge.map((t,i) =>
The Solution
{s.h}
The Results
“{cs.quote.t}”
Technologies Deployed
{cs.tech.map(t => (
Questions About This Project
Services Behind This Project
{cs.related.map(id => (
More Case Studies
{o.title}
Facing something similar?