completionId: cgen-524f9880492f4a358c7402f466038e1d
cgen-524f9880492f4a358c7402f466038e1d
This commit is contained in:
parent
68de139298
commit
c6e3f7b4e6
1 changed files with 31 additions and 23 deletions
|
|
@ -56,6 +56,14 @@ export default function BlogPost() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If API and Supabase both fail, try seed data
|
||||||
|
if (!data) {
|
||||||
|
const seedPost = blogSeedPosts.find((p) => p.slug === slug);
|
||||||
|
if (seedPost) {
|
||||||
|
data = seedPost;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!cancelled) setPost(data);
|
if (!cancelled) setPost(data);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.warn("Blog post fetch failed:", e);
|
console.warn("Blog post fetch failed:", e);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue