Khi dùng hàm map , cần đặt tham chiếu có ý nghĩa (a đang dùng là a)
thay vì download ảnh về folder img trong public rồi import path vào src của thẻ img , a có thể lưu link của ảnh vào 1 key/value của object trên database của firebase sẽ giúp dung lượng giảm rất lớn (em kiểm tra thì từ 98MB xuống <2MB)
Shop :
-state categ dùng để làm gì ? nếu không dùng sao lại phải setCateg
phân loại : đặt tên là type , style dễ bị hiểu lầm a đang CSS . Ngoài ra nếu đã dùng redux , thì không cần truyền props qua 2-3 component con , lưu state này vào store của redux để dùng
Lần đầu vào , list category vẫn chưa focus vào mục click
Sort : Khi lắng nghe sự kiện onChange , call lại API dựa theo giá trị nhận đc (từ onChange) , không sort dưới local. Ngoài ra , hiện tại , khi sort 1 lần (VD : từ cao đến thấp) , khi chuyển sang trang khác (CD : trang chủ) , rồi quay lại Shop , value sort vẫn đc giữ nhưng Products vẫn trở về mặc định
AboutUs :
OurStats : đặt component con rồi dùng hàm Map để render ra giao diện
Về phần giao diện :
Tách biệt style component ra 1 file riêng cho mỗi component
Cố gắng tái sử dụng css chứ không nhất thiết mỗi element 1 class
các Button có nhiều đặc điểm giống nhau , nên tạo 1 component để tái sử dụng
Tạm thời đến đây thôi , a sửa xong rồi e review tiếp
Chung :
Về phần giao diện :