File tree Expand file tree Collapse file tree 2 files changed +26
-5
lines changed
Expand file tree Collapse file tree 2 files changed +26
-5
lines changed Original file line number Diff line number Diff line change 1+ "use client" ;
2+
3+ import React , { useEffect , useState } from 'react' ;
4+ import Text from "@/components/Text/Text" ;
5+ import { useTranslations } from "next-intl" ;
6+
7+ const Copyright = ( ) => {
8+ const [ year , setYear ] = useState ( new Date ( ) . getFullYear ( ) ) ;
9+ const t = useTranslations ( 'Footer' ) ;
10+
11+ useEffect ( ( ) => {
12+ setYear ( new Date ( ) . getFullYear ( ) ) ;
13+ } , [ ] ) ;
14+
15+ return (
16+ < Text type = { 'caption-01' } >
17+ { t ( 'copyright' , {
18+ year : year ?. toString ( ) ,
19+ } ) }
20+ </ Text >
21+ ) ;
22+ } ;
23+
24+ export default Copyright ;
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import ContentWrapper from '@/components/ContentWrapper/ContentWrapper';
66import Text from '@/components/Text/Text' ;
77import Link from 'next/link' ;
88import { Routes } from '@/contants/contants' ;
9+ import Copyright from "@/components/Copyright/Copyright" ;
910
1011const Footer = ( ) => {
1112 const t = useTranslations ( 'Footer' ) ;
@@ -41,11 +42,7 @@ const Footer = () => {
4142 </ div >
4243 < div className = { classes . divider } />
4344 < div className = { classes . copyright } >
44- < Text type = { 'caption-01' } >
45- { t ( 'copyright' , {
46- year : new Date ( ) . getFullYear ( ) ?. toString ( ) ,
47- } ) }
48- </ Text >
45+ < Copyright />
4946 < Link href = { Routes . PP } >
5047 < Text type = { 'link' } > { t ( 'privacyPolicy' ) } </ Text >
5148 </ Link >
You can’t perform that action at this time.
0 commit comments