KayiLeung / Giftsy

0 stars 0 forks source link

Giftsy

About

Giftsy is a full stack Etsy clone that displays various handmade gifts for sale. Users are able to search for gifts for different occasion.

Live Demo

Technologies Used

Features

Create database/Product show page

User shopping cart

Leave Product's Rating

Search

Future directions

Code Snippet

I was inititially having an issue with search results gone after refreshed page. This was an issue because the filtered products did not mounted on search index page. To solve that issue, instead of pass in fliteredProduct to SearchIndexContainer, I used Redirect with customized url so I am able to find the search word by using redux location state.

const mSTP = (state, ownProps) => {
    let filteredProducts = Object.values(state.entities.products)
        .filter(product => product.title.toLowerCase().includes(ownProps.location.search.slice(8).toLowerCase()))
    return {
            filteredProducts,
    }
}

Licensing

Please note that none of these assets are mine. I do not claim any of the images featured on Gifysy and I do not gain any monetary value from this application.