test new shop
parent
d2731f2ca1
commit
6f3c200b19
|
@ -1,3 +1,7 @@
|
||||||
{
|
{
|
||||||
"extends": "next/core-web-vitals"
|
"extends": "next/core-web-vitals",
|
||||||
|
"rules": {
|
||||||
|
"react/no-unescaped-entities": 0,
|
||||||
|
"react/jsx-key": [1, { "checkFragmentShorthand": true }]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -139,6 +139,7 @@ const CheckoutData = () => {
|
||||||
<>
|
<>
|
||||||
{addressData.map((e, index) => (
|
{addressData.map((e, index) => (
|
||||||
<div
|
<div
|
||||||
|
key={index}
|
||||||
onClick={() => setAddressId(index)}
|
onClick={() => setAddressId(index)}
|
||||||
className={`flex rtl justify-between cursor-pointer mx-2 relative ${
|
className={`flex rtl justify-between cursor-pointer mx-2 relative ${
|
||||||
addressId == index
|
addressId == index
|
||||||
|
@ -213,6 +214,7 @@ const CheckoutData = () => {
|
||||||
<div>
|
<div>
|
||||||
{shippingData?.map((e, index) => (
|
{shippingData?.map((e, index) => (
|
||||||
<div
|
<div
|
||||||
|
key={index}
|
||||||
onClick={() => handleShippingID(index)}
|
onClick={() => handleShippingID(index)}
|
||||||
className={`flex rtl justify-between cursor-pointer mx-2 ${
|
className={`flex rtl justify-between cursor-pointer mx-2 ${
|
||||||
shippingId == index
|
shippingId == index
|
||||||
|
|
|
@ -32,7 +32,7 @@ const BlogsData = ({ dataCaetgories, data }) => {
|
||||||
<div className="grid xs:grid-cold-1 md:grid-cols-4 gap-7 ltr mt-10">
|
<div className="grid xs:grid-cold-1 md:grid-cols-4 gap-7 ltr mt-10">
|
||||||
<div className="xs:xol-span-1 lg:col-span-3">
|
<div className="xs:xol-span-1 lg:col-span-3">
|
||||||
<div className="grid xs:grid-cold-1 md:grid-cols-3 gap-7 rtl ">
|
<div className="grid xs:grid-cold-1 md:grid-cols-3 gap-7 rtl ">
|
||||||
{data?.blogs?.map((e) => (
|
{data?.blogs?.map((e, index) => (
|
||||||
<Cart
|
<Cart
|
||||||
categoryName={e.categoryName}
|
categoryName={e.categoryName}
|
||||||
title={e.title}
|
title={e.title}
|
||||||
|
@ -40,6 +40,7 @@ const BlogsData = ({ dataCaetgories, data }) => {
|
||||||
slug={e.slug}
|
slug={e.slug}
|
||||||
id={e.id}
|
id={e.id}
|
||||||
summery={e.summery}
|
summery={e.summery}
|
||||||
|
key={index}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
@ -53,8 +54,8 @@ const BlogsData = ({ dataCaetgories, data }) => {
|
||||||
<h3 className="text-center font-medium mb-5"> دسته بندی ها</h3>
|
<h3 className="text-center font-medium mb-5"> دسته بندی ها</h3>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
{dataCaetgories?.map((e) => (
|
{dataCaetgories?.map((e, index) => (
|
||||||
<div onClick={() => handleGoCategories(e.id)}>
|
<div key={index} onClick={() => handleGoCategories(e.id)}>
|
||||||
<div className="flex p-2">
|
<div className="flex p-2">
|
||||||
<div className="w-3 h-3 rounded-full bg-secondary-900 mt-1 ml-2"></div>
|
<div className="w-3 h-3 rounded-full bg-secondary-900 mt-1 ml-2"></div>
|
||||||
<p className="mb-0"> {e.name}</p>
|
<p className="mb-0"> {e.name}</p>
|
||||||
|
|
|
@ -607,8 +607,8 @@ const HeroSection = ({ data }) => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="grid xs:grid-cols-2 lg:grid-cols-5 gap-5">
|
<div className="grid xs:grid-cols-2 lg:grid-cols-5 gap-5">
|
||||||
{data?.products?.map((e) => (
|
{data?.products?.map((e, index) => (
|
||||||
<div className="relative">
|
<div key={index} className="relative">
|
||||||
<CardNormal data={e} priority />
|
<CardNormal data={e} priority />
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
|
|
|
@ -439,7 +439,10 @@ const NavbarTransparent = ({ theme }) => {
|
||||||
<div className="my-3 ">
|
<div className="my-3 ">
|
||||||
{e.children.map((s, index) => (
|
{e.children.map((s, index) => (
|
||||||
// <Link href={s.url} key={index}>
|
// <Link href={s.url} key={index}>
|
||||||
<div className="bg-primary-50 rounded-lg my-1 p-2 ">
|
<div
|
||||||
|
className="bg-primary-50 rounded-lg my-1 p-2 "
|
||||||
|
key={index}
|
||||||
|
>
|
||||||
<p className="mb-0 text-sm">{s.name}</p>
|
<p className="mb-0 text-sm">{s.name}</p>
|
||||||
</div>
|
</div>
|
||||||
// </Link>
|
// </Link>
|
||||||
|
|
|
@ -299,6 +299,7 @@ const Navbar = ({ theme }) => {
|
||||||
<div className="flex rtl">
|
<div className="flex rtl">
|
||||||
{dataNav?.map((e, index) => (
|
{dataNav?.map((e, index) => (
|
||||||
<p
|
<p
|
||||||
|
key={index}
|
||||||
className={`mb-0 pt-2 pb-3 px-2 tr03 cursor-pointer ${
|
className={`mb-0 pt-2 pb-3 px-2 tr03 cursor-pointer ${
|
||||||
navItemHover == index
|
navItemHover == index
|
||||||
? " border-y-[5px] border-b-primary-800 border-t-transparent text-primary-900"
|
? " border-y-[5px] border-b-primary-800 border-t-transparent text-primary-900"
|
||||||
|
@ -308,7 +309,6 @@ const Navbar = ({ theme }) => {
|
||||||
${theme == 0 && isScrolled ? "text-gray-900" : ""}`}
|
${theme == 0 && isScrolled ? "text-gray-900" : ""}`}
|
||||||
onMouseEnter={() => handleItemNavber(index)}
|
onMouseEnter={() => handleItemNavber(index)}
|
||||||
onMouseLeave={() => setNavItemHover(null)}
|
onMouseLeave={() => setNavItemHover(null)}
|
||||||
key={index}
|
|
||||||
>
|
>
|
||||||
{e.name}{" "}
|
{e.name}{" "}
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -2,7 +2,9 @@ import BlogData from "@comp/Blog/BlogData/page";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
async function getData(id) {
|
async function getData(id) {
|
||||||
const res = await fetch(`${process.env.NEXT_PUBLIC_API_URL}/blog/${id}`);
|
const res = await fetch(`${process.env.NEXT_PUBLIC_API_URL}/blog/${id}`, {
|
||||||
|
cache: "no-cache",
|
||||||
|
});
|
||||||
const post = await res.json();
|
const post = await res.json();
|
||||||
return post;
|
return post;
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,13 +11,18 @@ async function getData(sParams) {
|
||||||
|
|
||||||
const res = await fetch(
|
const res = await fetch(
|
||||||
`${process.env.NEXT_PUBLIC_API_URL}/blog?` +
|
`${process.env.NEXT_PUBLIC_API_URL}/blog?` +
|
||||||
new URLSearchParams({ ...query })
|
new URLSearchParams({ ...query }),
|
||||||
|
{
|
||||||
|
cache: "no-cache",
|
||||||
|
}
|
||||||
// ?page=${params.page ?? 0}
|
// ?page=${params.page ?? 0}
|
||||||
// { cache: "no-cache" }
|
// { cache: "no-cache" }
|
||||||
);
|
);
|
||||||
const post = await res.json();
|
const post = await res.json();
|
||||||
//
|
//
|
||||||
|
|
||||||
|
console.log("post", post);
|
||||||
|
|
||||||
return post;
|
return post;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import RootData from "@comp/AppsComponent/RootData/page";
|
import RootData from "@comp/AppsComponent/RootData/page";
|
||||||
|
import { Suspense } from "react";
|
||||||
|
|
||||||
export const metadata = {
|
export const metadata = {
|
||||||
icons: {
|
icons: {
|
||||||
|
@ -86,7 +87,9 @@ export default function RootLayout({ children }) {
|
||||||
/>
|
/>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<RootData>{children}</RootData>
|
<RootData>
|
||||||
|
<Suspense>{children}</Suspense>
|
||||||
|
</RootData>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
);
|
);
|
||||||
|
|
|
@ -4,9 +4,9 @@ import { useSearchParams } from "next/navigation";
|
||||||
|
|
||||||
const Page = () => {
|
const Page = () => {
|
||||||
const params = useSearchParams();
|
const params = useSearchParams();
|
||||||
const refid = params.get("refid");
|
const refid = params?.get("refid");
|
||||||
const paymentStatus = params.get("paymentStatus");
|
const paymentStatus = params?.get("paymentStatus");
|
||||||
const factorNumber = params.get("factorNumber");
|
const factorNumber = params?.get("factorNumber");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|
Loading…
Reference in New Issue