Skip to content

Commit

Permalink
feat: remove filter limitations
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronkiro committed May 28, 2024
1 parent 42dd4fb commit 65ef456
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions src/Find/FindPet/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const FindPet = ({ onSearch, loading }) => {
const [genders, setGenders] = useState([]);
const [sizes, setSizes] = useState([]);

const [showImageUpload, setshowImageUpload] = useState(false);
const [showImageUpload, setshowImageUpload] = useState(true);

const [selectedCity, setSelectedCity] = useState(null);
const [selectedOrigin, setSelectedOrigin] = useState(null);
Expand Down Expand Up @@ -147,12 +147,12 @@ const FindPet = ({ onSearch, loading }) => {
};

getFieldsValue(clean(payload));
if (Object.values(clean(payload)).length < 2) {
setshowImageUpload(false);
handleImageClear();
} else {
setshowImageUpload(true);
}
// if (Object.values(clean(payload)).length < 2) {
// setshowImageUpload(false);
// handleImageClear();
// } else {
// setshowImageUpload(true);
// }
}, [
selectedCity,
selectedOrigin,
Expand Down Expand Up @@ -238,7 +238,7 @@ const FindPet = ({ onSearch, loading }) => {
</Divider>
</Grid>
<Grid item xs={12} onClick={handleImageClick}>
{!showImageUpload && (
{/* {!showImageUpload && (
<Box sx={{ textAlign: "center", my: 2 }}>
<Typography variant="caption">
São necessários ao menos 2 filtros para utilizar a busca por
Expand All @@ -247,7 +247,7 @@ const FindPet = ({ onSearch, loading }) => {
trazer a melhor experiência para você!!
</Typography>
</Box>
)}
)} */}
{showImageUpload && (
<Grid
sx={{
Expand Down
2 changes: 1 addition & 1 deletion src/Find/PetList/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const Pet = ({ imgUrl, city, score, gender, handleClick }) => (
<CardContent>
<Box sx={{ display: "flex", justifyContent: "space-between" }}>
<Typography>{city}</Typography>
{score && (
{score != undefined && score != null && (
<Typography variant="caption" sx={{ alignContent: "center" }}>
{Math.round(score * 100)}% similar
</Typography>
Expand Down

0 comments on commit 65ef456

Please sign in to comment.