diff --git a/api/queries.ts b/api/queries.ts index 65b51c8..234f65a 100644 --- a/api/queries.ts +++ b/api/queries.ts @@ -288,3 +288,45 @@ export const getTossData = async ({ console.log(err); } }; + +export const getQuizWinnersById = async (id: number) => { + try { + const res = await fetch( + `${baseUrl.QUIZ_SRC}${routes.getQuizQuestionsWinners(id)}`, + { + next: { revalidate: 3600 }, + } + ); + + const result = await res.json(); + console.log(result); + + return result as IQuizQuestionsWinners; + } catch (err) { + console.log(err); + } +}; + +export const getNextQuizWinnners = async ( + id: number, + limit: number, + offset: number +) => { + try { + const res = await fetch( + `${baseUrl.QUIZ_SRC}${routes.getQuizQuestionsWinners( + id + )}?limit=${limit}&offset=${offset}`, + { + next: { revalidate: 3600 }, + } + ); + + const result = await res.json(); + console.log(result); + + return result as IQuizQuestionsWinners; + } catch (err) { + console.log(err); + } +}; diff --git a/app/layout.tsx b/app/layout.tsx index d227da0..ef4a753 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,42 +1,42 @@ -import localFont from 'next/font/local'; -import Script from 'next/script'; +import localFont from "next/font/local"; +import Script from "next/script"; -import { Roboto } from 'next/font/google'; -import { Merriweather } from 'next/font/google'; -import { Merriweather_Sans } from 'next/font/google'; -import { Alexandria } from 'next/font/google'; +import { Roboto } from "next/font/google"; +import { Merriweather } from "next/font/google"; +import { Merriweather_Sans } from "next/font/google"; +import { Alexandria } from "next/font/google"; -import 'swiper/swiper-bundle.css'; -import './globals.css'; -import QueryProvider from '@/providers/QueryProvider'; -import { HtmlContext } from 'next/dist/shared/lib/html-context.shared-runtime'; +import "swiper/swiper-bundle.css"; +import "./globals.css"; +import QueryProvider from "@/providers/QueryProvider"; +import { HtmlContext } from "next/dist/shared/lib/html-context.shared-runtime"; // FONTS const aeroport = localFont({ - src: '../fonts/Aeroport.otf', - variable: '--font-aeroport', + src: "../fonts/Aeroport.otf", + variable: "--font-aeroport", }); const roboto = Roboto({ - subsets: ['latin'], - weight: ['300', '400', '700'], - variable: '--font-roboto', + subsets: ["latin"], + weight: ["300", "400", "700"], + variable: "--font-roboto", }); const mw = Merriweather({ - subsets: ['cyrillic', 'cyrillic-ext', 'latin', 'latin-ext'], - weight: '700', - variable: '--font-mw', + subsets: ["cyrillic", "cyrillic-ext", "latin", "latin-ext"], + weight: "700", + variable: "--font-mw", }); const mw_sans = Merriweather_Sans({ - subsets: ['cyrillic-ext', 'latin', 'latin-ext'], - weight: ['300', '400', '700'], - variable: '--font-mwsans', + subsets: ["cyrillic-ext", "latin", "latin-ext"], + weight: ["300", "400", "700"], + variable: "--font-mwsans", }); const alexandria = Alexandria({ - subsets: ['latin', 'latin-ext'], - variable: '--font-alexandria', + subsets: ["latin", "latin-ext"], + variable: "--font-alexandria", }); export const metadata = { - title: 'Turkmen TV', + title: "Turkmen TV", }; interface IProps { @@ -47,12 +47,14 @@ export default function RootLayout({ children }: IProps) { return ( + className={`${aeroport.variable} ${mw.variable} ${roboto.variable} ${mw_sans.variable} ${alexandria.variable}`} + >
+ content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no;" + >