feat : add not data config component at product config list
This commit is contained in:
@@ -6,6 +6,7 @@ import ConfigItem from "./components/ConfigItem";
|
|||||||
import ConfigItemLoading from "./components/ConfigItemLoading";
|
import ConfigItemLoading from "./components/ConfigItemLoading";
|
||||||
import ProfileImage from "./components/ProfileImage";
|
import ProfileImage from "./components/ProfileImage";
|
||||||
import { Fragment } from "react/jsx-runtime";
|
import { Fragment } from "react/jsx-runtime";
|
||||||
|
import { MdErrorOutline } from "react-icons/md";
|
||||||
|
|
||||||
const ProductConfigList = ({
|
const ProductConfigList = ({
|
||||||
data,
|
data,
|
||||||
@@ -23,8 +24,10 @@ const ProductConfigList = ({
|
|||||||
<LoaderIcon className="m-1.5" />
|
<LoaderIcon className="m-1.5" />
|
||||||
) : error ? (
|
) : error ? (
|
||||||
"error"
|
"error"
|
||||||
) : (
|
) : userTitle ? (
|
||||||
userTitle
|
userTitle
|
||||||
|
) : (
|
||||||
|
"خطای تشخیص نام"
|
||||||
)}
|
)}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
@@ -48,6 +51,11 @@ const ProductConfigList = ({
|
|||||||
<Alert type="danger" message="خطایی با این موضوع رخ داد: ">
|
<Alert type="danger" message="خطایی با این موضوع رخ داد: ">
|
||||||
{error.message}
|
{error.message}
|
||||||
</Alert>
|
</Alert>
|
||||||
|
) : data?.result?.configs?.length === 0 ? (
|
||||||
|
<div className="w-full h-full flex flex-col gap-3 justify-center items-center">
|
||||||
|
<MdErrorOutline className="w-[5rem] h-[5rem]" />
|
||||||
|
<p className="text-sm md:text-base"> کانفیگی وجود ندارد </p>
|
||||||
|
</div>
|
||||||
) : (
|
) : (
|
||||||
data?.result?.configs?.map((item) => {
|
data?.result?.configs?.map((item) => {
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user