Commit 5e8dfe8d by Chetan

brand logo

1 parent f67e11a1
...@@ -3,7 +3,7 @@ import Image from "next/image" ...@@ -3,7 +3,7 @@ import Image from "next/image"
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import { signOut } from "next-auth/react"; import { signOut } from "next-auth/react";
import { UserOutlined } from '@ant-design/icons'; import { UserOutlined } from '@ant-design/icons';
export const GenericHeader = ({ venderBusiness, venderEmail, adminName, adminEmail, isRoute }) => { export const GenericHeader = ({ venderBusiness, venderEmail, businessLogo, adminName, adminEmail, isRoute }) => {
const router = useRouter(); const router = useRouter();
const VenderDetails = () => { const VenderDetails = () => {
return <div> return <div>
...@@ -14,7 +14,7 @@ export const GenericHeader = ({ venderBusiness, venderEmail, adminName, adminEma ...@@ -14,7 +14,7 @@ export const GenericHeader = ({ venderBusiness, venderEmail, adminName, adminEma
</div> </div>
: :
<div className="d-flex align-items-center gap-3"> <div className="d-flex align-items-center gap-3">
<Skeleton.Image style={{ height: 50, width: 70 }} /> <Image src={businessLogo} height={50} width={70} objectFit="contain"/>
<div className="d-flex flex-column"> <div className="d-flex flex-column">
<p className="m-0">{venderBusiness}</p> <p className="m-0">{venderBusiness}</p>
<p className="m-0">{venderEmail}</p> <p className="m-0">{venderEmail}</p>
......
...@@ -35,6 +35,7 @@ export const GenericLayout = ({ children }) => { ...@@ -35,6 +35,7 @@ export const GenericLayout = ({ children }) => {
<GenericHeader <GenericHeader
venderBusiness={vendorDetails?.attributes?.businessName} venderBusiness={vendorDetails?.attributes?.businessName}
venderEmail={vendorDetails?.attributes?.email} venderEmail={vendorDetails?.attributes?.email}
businessLogo={vendorDetails?.attributes?.brandLogo?.data?.attributes?.url}
adminName={loadedUser?.username} adminName={loadedUser?.username}
adminEmail={loadedUser?.email} adminEmail={loadedUser?.email}
isRoute={isRoute} isRoute={isRoute}
......
...@@ -114,7 +114,7 @@ const OrderListing = () => { ...@@ -114,7 +114,7 @@ const OrderListing = () => {
name: item.attributes.end_user.data.attributes.name, name: item.attributes.end_user.data.attributes.name,
quantity: item.attributes.quantity, quantity: item.attributes.quantity,
status: item.attributes.status, status: item.attributes.status,
activityName: item.attributes.experience.data.attributes.name activityName: item?.attributes?.experience?.data?.attributes?.name
}; };
}); });
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!