diff options
| author | Rafi Zadanly <rafizadanly@gmail.com> | 2022-12-30 09:56:08 +0700 |
|---|---|---|
| committer | Rafi Zadanly <rafizadanly@gmail.com> | 2022-12-30 09:56:08 +0700 |
| commit | ff830e7c6d6fbd768a91ed8f0e7be460656a6d29 (patch) | |
| tree | 86a4797323f080a459591d45b9d5a34ee869ab65 /src/pages/shop | |
| parent | ba6eca41f673f8db4d9f686fb7dab2358a4dc5eb (diff) | |
Address page
Diffstat (limited to 'src/pages/shop')
| -rw-r--r-- | src/pages/shop/checkout.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pages/shop/checkout.js b/src/pages/shop/checkout.js index 286219c3..5a47dd5e 100644 --- a/src/pages/shop/checkout.js +++ b/src/pages/shop/checkout.js @@ -17,7 +17,7 @@ import { createSlug } from "../../helpers/slug"; export default function Checkout() { - const [auth, setAuth] = useAuth(); + const [auth] = useAuth(); const [address, setAddress] = useState(null); const [selectedAddress, setSelectedAddress] = useState(null); const [selectedPayment, setSelectedPayment] = useState(null); @@ -34,7 +34,7 @@ export default function Checkout() { useEffect(() => { const getAddress = async () => { - if (auth?.id) { + if (auth) { const dataAddress = await apiOdoo('GET', `/api/v1/user/${auth.id}/address`); setAddress(dataAddress); } @@ -145,9 +145,9 @@ export default function Checkout() { /> </div> <div className="w-8/12 flex flex-col"> - <Link href={'/shop/product/' + createSlug(product.parent.name, product.parent.id)} className="product-card__title wrap-line-ellipsis-2"> + <p className="product-card__title wrap-line-ellipsis-2"> {product.parent.name} - </Link> + </p> <p className="text-caption-2 text-gray_r-11 mt-1"> {product.code || '-'} {product.attributes.length > 0 ? ` | ${product.attributes.join(', ')}` : ''} |
