From 59ee1e931f5ab634d3a64f596cd69b9207dd4414 Mon Sep 17 00:00:00 2001 From: Yuriy Plotnikov Date: Fri, 8 May 2026 14:16:15 +0300 Subject: [PATCH 1/2] Add animations --- src/app/api/revalidate/route.ts | 24 +++---- src/app/layout.tsx | 11 ++- src/app/order-delivery/page.tsx | 10 ++- src/components/AboutPage/AboutPage.tsx | 14 +++- .../AnimationObserver/AnimationObserver.tsx | 50 ++++++++++++++ src/components/Categories/Categories.tsx | 9 ++- src/components/ContactsPage/ContactsPage.tsx | 28 ++++++-- src/components/Detail/Detail.tsx | 10 ++- src/components/EmptySection/EmptySection.tsx | 5 +- src/components/Footer/Footer.module.scss | 5 ++ src/components/Footer/Footer.tsx | 17 +++-- .../GalleryPage/GalleryPageClient.tsx | 8 ++- src/components/Header/Header.module.scss | 17 +++++ src/components/Heading/Heading.tsx | 8 ++- src/components/Main/About/About.tsx | 12 +++- src/components/Main/Advantages/Advantages.tsx | 13 +++- .../Main/Calculation/Calculation.tsx | 6 +- .../Main/Categories/CategoriesSlider.tsx | 2 +- src/components/Main/Faq/Faq.tsx | 13 +++- src/components/Main/InStock/InStock.tsx | 13 +++- .../Main/LastWorks/LastWorksSlider.tsx | 2 +- src/components/Main/Masters/MastersSlider.tsx | 2 +- src/components/Main/News/NewsSlider.tsx | 2 +- src/components/Main/Process/Process.tsx | 12 +++- .../Main/Restoration/Restoration.tsx | 12 +++- src/components/Main/Reviews/Reviews.tsx | 4 +- src/components/Master/Master.tsx | 13 +++- src/components/News/News.tsx | 9 ++- src/components/NotFound/NotFound.tsx | 8 ++- .../PageTransition/PageTransition.tsx | 18 +++++ src/components/Payment/Payment.tsx | 6 +- src/components/Reviews/Reviews.tsx | 4 +- src/components/ReviewsList/ReviewsList.tsx | 9 ++- src/components/Works/Works.tsx | 9 ++- src/styles/animations.scss | 53 +++++++++++++++ src/styles/blocks.scss | 1 + src/styles/blocks/animate.scss | 67 +++++++++++++++++++ 37 files changed, 432 insertions(+), 74 deletions(-) create mode 100644 src/components/AnimationObserver/AnimationObserver.tsx create mode 100644 src/components/PageTransition/PageTransition.tsx create mode 100644 src/styles/blocks/animate.scss diff --git a/src/app/api/revalidate/route.ts b/src/app/api/revalidate/route.ts index b814118c..d8932243 100644 --- a/src/app/api/revalidate/route.ts +++ b/src/app/api/revalidate/route.ts @@ -37,21 +37,21 @@ export async function POST(request: NextRequest) { const modelTagMap: Record = { // Collections - news: ['collection-news'], - works: ['collection-works'], - reviews: ['collection-reviews'], - category: ['collection-category'], - faq: ['collection-faq'], - advantages: ['collection-advantages'], + news: ['collection-news'], + works: ['collection-works'], + reviews: ['collection-reviews'], + category: ['collection-category'], + faq: ['collection-faq'], + advantages: ['collection-advantages'], createprocess: ['collection-createprocess'], - restoration: ['singleton-restoration'], - masters: ['collection-masters'], - mainslider: ['collection-mainslider'], + restoration: ['singleton-restoration'], + masters: ['collection-masters'], + mainslider: ['collection-mainslider'], // Singletons - maininfo: ['singleton-maininfo'], - order: ['singleton-order'], + maininfo: ['singleton-maininfo'], + order: ['singleton-order'], // Trees - gallery: ['tree-gallery'], + gallery: ['tree-gallery'], } const tagsToRevalidate = modelTagMap[model] || [] diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 3c8ae105..84ded6d7 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -2,17 +2,19 @@ import '../styles/globals.scss' import '../styles/blocks.scss' import { Montserrat, CyrillicOld } from './fonts' import type { Metadata } from 'next' -import { JSX } from 'react' +import { JSX, ReactNode } from 'react' import clsx from 'clsx' import Script from 'next/script' import Header from '@/components/Header/Header' import Footer from '@/components/Footer/Footer' import ScrollButton from '@/components/ScrollButton/ScrollButton' +import AnimationObserver from '@/components/AnimationObserver/AnimationObserver' +import PageTransition from '@/components/PageTransition/PageTransition' export const dynamic = 'force-dynamic' type LayoutProps = { - children?: React.ReactNode + children?: ReactNode } export const metadata: Metadata = { @@ -90,9 +92,12 @@ export default function RootLayout({ children }: LayoutProps): JSX.Element { />
-
{children}
+
+ {children} +