Implement multi-domain SEO improvements:
- Add metadata to login and login-verify pages to prevent indexing. - Update robots.txt to disallow additional sensitive paths. - Enhance sitemap generation to filter by city and include accurate last modified dates. - Refactor canonical URL generation to support multi-domain architecture, ensuring self-canonicalization for city domains. - Remove deprecated CanonicalHandler component and streamline canonical URL handling. - Introduce safe JSON-LD output to prevent XSS vulnerabilities. - Add payment layout with appropriate metadata to prevent indexing. - Conduct a comprehensive technical SEO audit and implement necessary fixes across the application.
This commit is contained in:
@@ -1,11 +1,23 @@
|
||||
import { Pagination, useMediaQuery, useTheme } from "@mui/material";
|
||||
"use client";
|
||||
|
||||
import { Pagination, PaginationItem, useMediaQuery, useTheme } from "@mui/material";
|
||||
import { usePathname, useSearchParams } from "next/navigation";
|
||||
|
||||
function PaginationContent({ page, pageDetail, changePage, limit = 12 }) {
|
||||
const theme = useTheme();
|
||||
const isSmall = useMediaQuery(theme.breakpoints.down("sm"));
|
||||
const pathname = usePathname();
|
||||
const searchParams = useSearchParams();
|
||||
|
||||
const count = Math.ceil(pageDetail.totalRecords / limit);
|
||||
|
||||
// href واقعی برای خزندهها؛ کلیک کاربر همچنان SPA میماند (preventDefault + onChange)
|
||||
const buildHref = (pageNum) => {
|
||||
const params = new URLSearchParams(searchParams.toString());
|
||||
params.set("page", String(pageNum));
|
||||
return `${pathname}?${params.toString()}`;
|
||||
};
|
||||
|
||||
return (
|
||||
<Pagination
|
||||
count={count}
|
||||
@@ -14,6 +26,23 @@ function PaginationContent({ page, pageDetail, changePage, limit = 12 }) {
|
||||
onChange={changePage}
|
||||
color="primary"
|
||||
className={(!count || count < 2) && "!hidden"}
|
||||
renderItem={(item) => {
|
||||
const crawlable =
|
||||
item.page && item.page >= 1 && item.page <= count && !item.disabled;
|
||||
return (
|
||||
<PaginationItem
|
||||
{...item}
|
||||
{...(crawlable && {
|
||||
component: "a",
|
||||
href: buildHref(item.page),
|
||||
onClick: (event) => {
|
||||
event.preventDefault();
|
||||
item.onClick?.(event);
|
||||
},
|
||||
})}
|
||||
/>
|
||||
);
|
||||
}}
|
||||
sx={{
|
||||
"& .MuiPaginationItem-root": {
|
||||
color: "#616161",
|
||||
|
||||
Reference in New Issue
Block a user