fix: исправить типизацию, добавить SEO метатеги, исправить API Rules PB

- Добавлены типы PostVotes, VoteStats, Comment, Consultation, PostResponse
- Заменены все any на конкретные типы
- Исправлены catch (error: any) -> catch (error: unknown)
- Добавлены og: и twitter: метатеги в Layout
- Исправлены API Rules в PocketBase (posts, reviews, post_votes)
This commit is contained in:
Web-serfer 2026-05-06 22:33:44 +05:00
parent 2f57bf91ef
commit b5d2174fdf
20 changed files with 110 additions and 41 deletions

View file

@ -4,6 +4,7 @@ import { SITE_URL } from '@constants';
import BlogCard from '@components/blog/BlogCard.astro';
import SearchModal from '@components/base/SearchModal.astro';
import { getPosts, getPostImageUrl } from '@lib/pb';
import type { Post } from '@globalInterfaces';
const url = new URL(Astro.request.url);
const searchQuery = url.searchParams.get('q') || '';
@ -70,7 +71,7 @@ const formatDate = (date: string) => {
<section class="results-section">
<div class="site-container">
<div class="results-grid">
{searchResults.map((post: any) => (
{searchResults.map((post: Post) => (
<BlogCard
title={post.title}
description={post.description}