This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The code won't work by it self but most of the logic is here | |
* I was using immutablejs | |
* Also, I'm aware this is not react, but it's code that I'm most proud of 😅 | |
*/ | |
export function getLooksMasonry(masonry: List<List<Map<string, any>>>, lookIds: List<any>, colWidth: number, gutterPadding: number = 5, footerHeight: number = 55) { | |
return (dispatch, getState: () => IGlobalState) => { | |
const { looks } = getState(); | |
return masonry.withMutations(mLayout => { |