Commit 47e887cd by Arjun Jhukal

optimized the sitemap cannonical for exlclusive game homepage and general pages…

optimized the sitemap cannonical for exlclusive game homepage and general pages and also updated the robots.txt
parent 3d924a35
User-agent: *
Disallow:
Sitemap: https://www.getfirekirin.com/sitemap.xml
\ No newline at end of file
import ExclusiveGameDetail from "@/components/pages/dashboard/userDashboard/games/exclusiveGames/exclusiveGameDetail";
import { getSingleGame } from "@/serverApi/game";
import { cookies } from "next/headers";
import { Metadata } from "next";
const SITE_URL = process.env.NEXT_PUBLIC_FRONTEND_URL!;
export async function generateMetadata(props: { params: Promise<{ id: string }> }): Promise<Metadata> {
const { id } = await props.params;
const canonicalUrl = `${SITE_URL}/exclusive-games/${id}`.replace(/\/$/, "");
return {
alternates: {
canonical: canonicalUrl,
},
};
}
export default async function UserGameDetail(props: { params: Promise<{ id: string }> }) {
const { id } = await props.params;
......
import ExclusiveGamePage from '@/components/pages/dashboard/userDashboard/games/exclusiveGames'
import React from 'react'
export default function ExclusiveGames() {
return (
<ExclusiveGamePage />
)
......
import { getPageDetail } from '@/serverApi/pages';
import { renderHTML } from '@/utils/RenderHTML';
import { ArrowRight2 } from '@wandersonalwes/iconsax-react';
import { notFound, redirect } from 'next/navigation';
import React from 'react'
import { Metadata } from 'next';
import { notFound } from 'next/navigation';
const SITE_URL = process.env.NEXT_PUBLIC_FRONTEND_URL!;
export async function generateMetadata(props: { params: Promise<{ slug: string }> }): Promise<Metadata> {
const { slug } = await props.params;
const canonicalUrl = `${SITE_URL}/general/${slug}`.replace(/\/$/, "");
return {
alternates: {
canonical: canonicalUrl,
},
};
}
export default async function GeneralPage(props: { params: Promise<{ slug: string }> }) {
const { slug } = await props.params;
let pageData = null;
......
import GlassWrapper from "@/components/molecules/GlassWrapper";
import Dashboard from "@/components/pages/dashboard";
import UspSlider from "@/components/pages/dashboard/UspSlider";
import ProtectedLink from "@/routes/ProtectedLink";
import { getAllGames, getSubGames, getUsp } from "@/serverApi/game";
import { getBanners, getSubBanners } from "@/serverApi/pages";
import Image from "next/image";
import Link from "next/link";
import DashboardProvider from "./DashboardProvider";
import GlassWrapper from "@/components/molecules/GlassWrapper";
import { Stack } from "@mui/material";
import KycBanner from "@/components/pages/dashboard/userDashboard/verifyKyc/KycBanner";
export const dynamic = "force-dynamic";
......@@ -141,7 +138,7 @@ export default async function Home() {
className="dashboard-card1 col-span-1 flex justify-between px-10 gap-2 rounded-[24px]">
<div className="py-7 gap-6">
{subBanner.name && (
<h1
<h2
className="text-[40px] mb-[8px]"
style={{
color: "#FBD230",
......@@ -150,7 +147,7 @@ export default async function Home() {
}}
>
{subBanner.name}
</h1>
</h2>
)}
{subBanner.description && (
<p
......
import { pageSEO } from "@/serverApi/game";
import type { Metadata } from "next";
import { Inter } from "next/font/google";
import Script from "next/script";
import React from "react";
import "./globals.css";
import ProviderWrapper from "./ProviderWrapper";
import { SeonProvider } from "./SeonProvider";
import TopLoader from "./TopLoader";
const metadata: Metadata = {
title: "Sweepstake",
description: "Sweepstake - Online Gaming Platform",
......@@ -14,6 +14,10 @@ const metadata: Metadata = {
icon: "/assets/images/logo.png",
},
};
const GTM_ID = process.env.NEXT_PUBLIC_GTM_ID;
const SITE_URL = process.env.NEXT_PUBLIC_FRONTEND_URL!;
export async function generateMetadata(): Promise<Metadata> {
try {
const response = await pageSEO();
......@@ -28,6 +32,9 @@ export async function generateMetadata(): Promise<Metadata> {
images: seoData?.data?.logo ? [seoData.logo] : ["/assets/images/logo.png"],
},
icons: seoData?.data?.favicon || metadata.icons,
alternates: {
canonical: SITE_URL.replace(/\/$/, ""),
},
};
} catch (error) {
console.error("SEO metadata fetch failed:", error);
......@@ -41,6 +48,7 @@ const inter = Inter({
adjustFontFallback: false
});
export default function RootLayout({
children,
}: Readonly<{
......@@ -48,14 +56,45 @@ export default function RootLayout({
}>) {
return (
<html lang="en">
<head>
{GTM_ID && (
<Script
id="gtm-init"
strategy="afterInteractive"
dangerouslySetInnerHTML={{
__html: `
(function(w,d,s,l,i){w[l]=w[l]||[];
w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});
var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';
j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;
f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','${GTM_ID}');
`,
}}
/>
)}
</head>
{/* className="dark" */}
<body className={`${inter.className} scroll-smooth`} cz-shortcut-listen="true">
{GTM_ID && (
<noscript>
<iframe
src={`https://www.googletagmanager.com/ns.html?id=${GTM_ID}`}
height="0"
width="0"
style={{ display: "none", visibility: "hidden" }}
/>
</noscript>
)}
<SeonProvider>
<ProviderWrapper>
<React.Suspense fallback={<div />}>
<TopLoader />
</React.Suspense>
{children}
</ProviderWrapper>
</SeonProvider>
......
......@@ -20,8 +20,9 @@ export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
const urls: MetadataRoute.Sitemap = [
{
url: frontendUrl,
lastModified: new Date(),
changeFrequency: "monthly",
priority: 1
// lastModified: new Date(),
// changeFrequency: "monthly",
},
];
......@@ -29,8 +30,9 @@ export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
if (menuData?.data?.length) {
const menuUrls: MetadataRoute.Sitemap = menuData.data.map((menu: any) => ({
url: `${frontendUrl}/general/${menu.slug}`,
lastModified: new Date(),
changeFrequency: "weekly",
// lastModified: new Date(),
// changeFrequency: "weekly",
priority: 0.9
}));
urls.push(...menuUrls);
......@@ -40,8 +42,9 @@ export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
if (gameData.length) {
const gameUrls: MetadataRoute.Sitemap = gameData.map((game: any) => ({
url: `${frontendUrl}/exclusive-games/${game.id}`,
lastModified: new Date(),
changeFrequency: "weekly",
// lastModified: new Date(),
// changeFrequency: "weekly",
priority: 0.9
}));
urls.push(...gameUrls);
......
"use client";
import Image from "next/image";
import React, { useEffect, useState, useRef } from "react";
import { motion, useMotionValue, useTransform, animate } from "framer-motion";
import GlassWrapper from "@/components/molecules/GlassWrapper";
import { animate, motion, useMotionValue } from "framer-motion";
import Image from "next/image";
import { useEffect, useRef, useState } from "react";
interface UspItem {
title: string;
......@@ -40,9 +40,9 @@ export default function UspSlider({ uspData }: { uspData: UspItem[] }) {
return (
<section className="usp__slider w-full px-4 mt-8">
<h2 className="text-lg md:text-xl font-semibold mb-4">
<h1 className="text-lg md:text-xl font-semibold mb-4">
Top 10 Trending Games
</h2>
</h1>
<div className="relative w-full overflow-hidden">
<motion.div
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment