loading and seo optimization, big design update
This commit is contained in:
@@ -24,11 +24,11 @@ export default async function BlogIndexPage({ params }: Props) {
|
||||
let records: PBPost[] = [];
|
||||
|
||||
try {
|
||||
// Динамически выбираем таблицу: posts_ru или posts_en
|
||||
records = await pb.collection(`posts_${lang}`).getFullList<PBPost>({
|
||||
filter: "published = true",
|
||||
sort: "-created",
|
||||
cache: "no-store",
|
||||
fetch: (url, config) =>
|
||||
fetch(url, { ...config, next: { revalidate: 3600 } }),
|
||||
});
|
||||
} catch (err) {
|
||||
console.error("Failed to fetch blog posts:", err);
|
||||
|
||||
Reference in New Issue
Block a user