Skip to content

Commit

Permalink
Merge pull request #136 from EnigmaVSSUT/dev-v2
Browse files Browse the repository at this point in the history
fix: remove useless  parameters from useResponsive
  • Loading branch information
SySagar authored Apr 3, 2024
2 parents 6942fa6 + 64a8aa2 commit e075e91
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
6 changes: 3 additions & 3 deletions src/app/team/components/AllTeams.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import useLoading from "../../../shared/store/useLoading";

export default function AllTeam() {
const [member, setMember] = useState([]);
const { isTablet, fontSize, fontWeight } = useResponsive();
const { isMobile, isTablet } = useResponsive();
const [loading, setLoading] = useLoading((state) => [
state.loading,
state.setLoading,
Expand Down Expand Up @@ -37,8 +37,8 @@ export default function AllTeam() {
<Stack justifyContent={"center"} alignItems={"center"} gap={10}>
<Typography
sx={{
fontSize: fontSize,
fontWeight: fontWeight,
fontSize: isMobile?"1.4rem":isTablet ? "2rem" : "2.5rem",
fontWeight: isMobile?"200":isTablet ? "300" : "400",
textAlign: "center",
color: "#fff",
}}
Expand Down
10 changes: 1 addition & 9 deletions src/hooks/useResponsive.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,9 @@ export const useResponsive = () => {
}
},[]);


fontSize = isMobile ? "1.4rem" : isTablet ? "2rem" : "2.5rem";
lineHeight = isMobile ? "1.1rem" : isTablet ? "1.3rem" : "1.5rem";
fontWeight = isMobile ? "200" : isTablet ? "300" : "400";

return {
isLaptop,
isTablet,
isMobile,
fontSize,
lineHeight,
fontWeight,
isMobile
};
};

0 comments on commit e075e91

Please sign in to comment.