From 0b00da4b0d3383a19fa4d90be8158b94920f4cdf Mon Sep 17 00:00:00 2001 From: ariari04 Date: Sun, 29 Sep 2024 21:59:42 +0600 Subject: [PATCH] Fix bug on main page --- src/app/[locale]/page.tsx | 42 +++++++++++----------- src/app/[locale]/profile/personal/page.tsx | 2 +- src/widgets/Navbar/Navbar.tsx | 4 ++- 3 files changed, 26 insertions(+), 22 deletions(-) diff --git a/src/app/[locale]/page.tsx b/src/app/[locale]/page.tsx index 8f37eb1..46c8374 100644 --- a/src/app/[locale]/page.tsx +++ b/src/app/[locale]/page.tsx @@ -4,6 +4,7 @@ import Image from "next/image"; import CardImg from "../../../public/assets/Image.png"; import Arrow from "../../../public/assets/arrow-right.png"; import { useTranslations } from "next-intl"; +import bg from "../../../public/assets/bg.png"; export default function Home() { const t = useTranslations("home"); @@ -11,26 +12,27 @@ export default function Home() { return ( <> -
-
- - <Title - size="xl" - text={"Название проекта "} - className="font-extrabold leading-[76px]" - /> - <p className="leading-8"> - Torem ipsum dolor sit amet, consectetur adipiscing elit. Nunc - vulputate libero et velit interdum, ac aliquet odio mattis. Class - aptent taciti sociosqu ad litora torquent per conubia nostra - </p> + <section className="text-white w-full px-5"> + <div className="flex justify-center relative"> + <Image src={bg} alt="bg" className="" /> + <div className="max-w-[943px] text-center absolute top-20 left-15 pt-10"> + <Title + size="md" + text={"Transparency International "} + className="text-[24px] leading-8" + /> + <Title + size="xl" + text={"Название проекта "} + className="font-extrabold leading-[76px]" + /> + <p className="leading-8"> + Torem ipsum dolor sit amet, consectetur adipiscing elit. Nunc + vulputate libero et velit interdum, ac aliquet odio mattis. + Class aptent taciti sociosqu ad litora torquent per conubia + nostra + </p> + </div> </div> </section> </Container> diff --git a/src/app/[locale]/profile/personal/page.tsx b/src/app/[locale]/profile/personal/page.tsx index ee85649..1f460af 100644 --- a/src/app/[locale]/profile/personal/page.tsx +++ b/src/app/[locale]/profile/personal/page.tsx @@ -11,7 +11,6 @@ import React from "react"; const Personal = async () => { const session = await getServerSession(authConfig); - console.log(session?.access_token); const getProfile = async () => { const Authorization = `Bearer ${session?.access_token}`; const config = { @@ -24,6 +23,7 @@ const Personal = async () => { "/users/profile/", config ); + console.log(response, "res"); return response.data; } catch (error: unknown) { if (error instanceof AxiosError) console.log(error.message); diff --git a/src/widgets/Navbar/Navbar.tsx b/src/widgets/Navbar/Navbar.tsx index 4a88b4a..6940a2a 100644 --- a/src/widgets/Navbar/Navbar.tsx +++ b/src/widgets/Navbar/Navbar.tsx @@ -17,12 +17,14 @@ import founded_kg from "./assets/founded-kg.png"; import { useParams } from "next/navigation"; import NavAuth from "./NavAuth/NavAuth"; import { Container } from "@/shared/ui"; +import { useSession } from "next-auth/react"; const Navbar = () => { + const session = useSession(); const pathname = usePathname(); const [openMenu, setOpenMenu] = useState<boolean>(false); const { locale } = useParams(); - + console.log(session); const FOUNDED: Record<string, StaticImageData> = { ru: founded_ru, kg: founded_kg,