Commit 7ddb2192 by Giang Tran

merge code

parent b4098916
...@@ -18,7 +18,7 @@ const Home = (props) => { ...@@ -18,7 +18,7 @@ const Home = (props) => {
const [dataPriceFilter, setDataPriceFilter] = useState([]); const [dataPriceFilter, setDataPriceFilter] = useState([]);
const [listImage, setListImage] = useState([]); const [listImage, setListImage] = useState([]);
const [filters, setFilters] = useState([]); const [filters, setFilters] = useState([]);
const [filterId, setFilterId] = useState(null); const [filterId, setFilterId] = useState(-1);
const [isSortName, setIsSortName] = useState(null); const [isSortName, setIsSortName] = useState(null);
const [isSortPercent, setIsSortPercent] = useState(null); const [isSortPercent, setIsSortPercent] = useState(null);
const [isSortPriceOpenClose, setIsSortPriceOpenClose] = useState(null); const [isSortPriceOpenClose, setIsSortPriceOpenClose] = useState(null);
...@@ -78,6 +78,7 @@ const Home = (props) => { ...@@ -78,6 +78,7 @@ const Home = (props) => {
type: 'PRODUCT', type: 'PRODUCT',
}); });
console.log(resCategoryProduct); console.log(resCategoryProduct);
if ((resCategoryProduct.data.code = 200 && resCategoryProduct.data.data)) { if ((resCategoryProduct.data.code = 200 && resCategoryProduct.data.data)) {
let data = []; let data = [];
data.push({id: -1, name: 'All'}); data.push({id: -1, name: 'All'});
...@@ -93,7 +94,9 @@ const Home = (props) => { ...@@ -93,7 +94,9 @@ const Home = (props) => {
showAlert(TYPE.ERROR, I18n.t('Notification'), I18n.t('Can_not_get_data')); showAlert(TYPE.ERROR, I18n.t('Notification'), I18n.t('Can_not_get_data'));
} }
props.hideLoading(); props.hideLoading();
console.log('filterId', filterId); console.log('filterId', filterId);
console.log('filters', filters);
}; };
const changeFilter = (id) => { const changeFilter = (id) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment