|
|
|
@ -155,7 +155,9 @@ export const Address = ({ |
|
|
|
|
}; |
|
|
|
|
setProfile(data); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const [activeCheckbox, setActiveCheckbox] = useState(true); |
|
|
|
|
|
|
|
|
|
const submit = () => { |
|
|
|
|
const { |
|
|
|
|
firstName, |
|
|
|
@ -356,27 +358,47 @@ export const Address = ({ |
|
|
|
|
}`}
|
|
|
|
|
> |
|
|
|
|
{!profilePage && ( |
|
|
|
|
<div |
|
|
|
|
className={`flex flex-row items-center mb-7 cursor-pointer
|
|
|
|
|
<> |
|
|
|
|
<div className="flex item-center gap-x-4"> |
|
|
|
|
{/* my self */} |
|
|
|
|
<div |
|
|
|
|
className={`flex flex-row items-center mb-7 cursor-pointer
|
|
|
|
|
`}
|
|
|
|
|
onClick={() => { |
|
|
|
|
setActiveCheckbox(!activeCheckbox); |
|
|
|
|
}} |
|
|
|
|
> |
|
|
|
|
<div className="w-4 h-4 flex flex-col items-center justify-center ml-1 bg-gray-200 rounded-full"> |
|
|
|
|
<div className="w-2 h-2 bg-blueC0 rounded-full"></div> |
|
|
|
|
onClick={() => { |
|
|
|
|
setActiveCheckbox(false); |
|
|
|
|
}} |
|
|
|
|
> |
|
|
|
|
<div className="w-4 h-4 flex flex-col items-center justify-center ml-1 bg-gray-200 rounded-full"> |
|
|
|
|
<div |
|
|
|
|
className={`w-2 h-2 rounded-full ${ |
|
|
|
|
activeCheckbox === false ? "bg-blueC0" : "" |
|
|
|
|
}`}
|
|
|
|
|
></div> |
|
|
|
|
</div> |
|
|
|
|
<p className="font-bold text-sm ">برای خودم</p> |
|
|
|
|
</div> |
|
|
|
|
{/* someone else */} |
|
|
|
|
<div |
|
|
|
|
className={`flex flex-row items-center mb-7 cursor-pointer
|
|
|
|
|
`}
|
|
|
|
|
onClick={() => { |
|
|
|
|
setActiveCheckbox(true); |
|
|
|
|
}} |
|
|
|
|
// onClick={() => {
|
|
|
|
|
// setActiveCheckbox(!activeCheckbox);
|
|
|
|
|
// }}
|
|
|
|
|
> |
|
|
|
|
<div className="w-4 h-4 flex flex-col items-center justify-center ml-1 bg-gray-200 rounded-full"> |
|
|
|
|
<div |
|
|
|
|
className={`w-2 h-2 rounded-full ${ |
|
|
|
|
activeCheckbox === !false ? "bg-blueC0" : "" |
|
|
|
|
}`}
|
|
|
|
|
></div>{" "} |
|
|
|
|
</div> |
|
|
|
|
<p className="font-bold text-sm ">گیرنده فرد دیگری است</p> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<p className="font-bold text-sm "> |
|
|
|
|
{activeCheckbox === false |
|
|
|
|
? " گیرنده فرد دیگری است " |
|
|
|
|
: " برای خودم "} |
|
|
|
|
<span className="text-xs font-light"> |
|
|
|
|
{activeCheckbox |
|
|
|
|
? "(در صورتی که فرد گیرنده شما نیستید اینجا کلیک کنید)" |
|
|
|
|
: "(در صورتی که فرد گیرنده خودتون هستید اینجا کلیک کنید)"} |
|
|
|
|
</span> |
|
|
|
|
</p> |
|
|
|
|
</div> |
|
|
|
|
</> |
|
|
|
|
)} |
|
|
|
|
|
|
|
|
|
{profilePage || activeCheckbox === false ? ( |
|
|
|
|