// Tatava Studio, universal article (inner) template.
// Reads the ?id= query param, looks up window.TATAVA_ARTICLES[id].
// Uses Nav / Footer / WhatsAppFloat / Icon from Sections.jsx.
const ART_DATA = window.TATAVA_ARTICLES || {};
function getArticleId() {
const p = new URLSearchParams(window.location.search);
return p.get("id");
}
function ArticleBody({ blocks }) {
return (
{blocks.map((b, i) => {
if (b.t === "h") return
{b.c}
;
if (b.t === "quote") return (
{b.c}
);
return
{b.c}
;
})}
);
}
function ArticleNotFound() {
return (
Insights
This Piece Has Moved
We couldn't find that article. It may have been renamed or is still being written.
);
}
function ArticleHero({ a }) {
return (
{a.eye}
{a.title[0]}{a.title[1]}{a.title[2]}
{a.dek}
{a.meta.map((m) => {m})}
);
}
function RelatedRail({ currentId }) {
const others = Object.keys(ART_DATA).filter((k) => k !== currentId).slice(0, 3);
if (!others.length) return null;
return (
Keep reading
More from the Practice
{others.map((k) => {
const p = ART_DATA[k];
return (
{p.eye}
);
})}
);
}
function ArticleApp() {
const id = getArticleId();
const a = id ? ART_DATA[id] : null;
if (!a) {
return (
);
}
React.useEffect(() => { document.title = a.title.join("") + ", Tatava Studio"; }, []);
return (
Written by Aarti Ahuja
Psychologist & NLP Master Trainer, Tatava Studio
);
}
ReactDOM.createRoot(document.getElementById("root")).render();