Frontastic component name

Wishlist

Page type

Used in the My account Wishlist dynamic page

Example images

Empty wishlist

Wishlist

Wishlist cart exampleWishlist cart example

Wishlist exampleWishlist example

Code samples

{
    "tasticType": "frontastic/account/wishlists",
    "name": "Wishlists",
    "category": "Account",
    "icon": "menu",
    "schema": [
        {
            "name": "Data source selection",
            "fields": [
                {
                    "label": "Data source",
                    "field": "stream",
                    "type": "stream",
                    "streamType": "account-wishlists",
                    "default": null
                }
            ]
        }
    ]
}
import React from 'react'
import PropTypes from 'prop-types'

import tastify from '@frontastic/catwalk/src/js/helper/tastify'
import app from '@frontastic/catwalk/src/js/app/app'

import AccountWishlist from '../../../patterns/organisms/Account/AccountWishlist'

const AccountWishlistsTastic = ({ wishlist }) => {
    return (
        <AccountWishlist
            wishlist={wishlist}
            handleRemoveFromWishlist={(itemId) => {
                app.getLoader('wishlist').removeLineItem(wishlist.data.wishlistId, {
                    lineItemId: itemId,
                })
            }}
            returnToHomePage={() => {
                app.getRouter().history.replace('/')
            }}
        />
    )
}

AccountWishlistsTastic.propTypes = {
    wishlist: PropTypes.object.isRequired,
}

export default tastify({
    translate: true,
    connect: {
        wishlist: true,
    },
})(AccountWishlistsTastic)

Did this page help you?