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:
parent
2f57bf91ef
commit
b5d2174fdf
20 changed files with 110 additions and 41 deletions
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue