Skip to content

Commit cd6fcee

Browse files
committed
test
1 parent 8991d64 commit cd6fcee

20 files changed

+32
-29
lines changed

src/components/landing-page-components/context-providers/mobile-context-provider.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,13 @@ const MobileContext = createContext(true);
44

55
export const MobileContextProvider = ({ children }) => {
66
const [isMobile, setIsMobile] = useState(true);
7+
const [isTablet, setIsTablet] = useState(false);
78

89
useEffect(() => {
10+
if (!window) return;
911
const handleResize = () => {
1012
setIsMobile(window.innerWidth < 896);
13+
setIsTablet(window.innerWidth < 1024);
1114
};
1215
handleResize();
1316
window.addEventListener('resize', handleResize);
@@ -18,7 +21,7 @@ export const MobileContextProvider = ({ children }) => {
1821
}, []);
1922

2023
return (
21-
<MobileContext.Provider value={isMobile}>
24+
<MobileContext.Provider value={{isMobile, isTablet}}>
2225
{children}
2326
</MobileContext.Provider>
2427
);

src/components/landing-page-components/parts/landing-page-card.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const LandingPageCard = ({
55
className = '',
66
children,
77
}) => {
8-
const isMobile = useIsMobile();
8+
const { isMobile } = useIsMobile();
99

1010
return (
1111
<div

src/components/landing-page-components/parts/landing-page-dropdown.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const LandingPageDropdown = ({
88
description,
99
borderBottom,
1010
}) => {
11-
const isMobile = useIsMobile();
11+
const { isMobile } = useIsMobile();
1212
const [isExpanded, setIsExpanded] = useState(false);
1313

1414
const toggleExpand = () => {

src/components/landing-page-components/parts/landing-page-feature-card.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const LandingPageFeatureCard = ({
77
title,
88
description,
99
}) => {
10-
const isMobile = useIsMobile();
10+
const { isMobile } = useIsMobile();
1111

1212
return (
1313
<CardSpotlight

src/components/landing-page-components/parts/landing-page-quote-card.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const LandingPageQuoteCard = ({
99
}) => {
1010
const cardRef = useRef(null);
1111
const [carWidth, setCardWidth] = useState(0);
12-
const isMobile = useIsMobile();
12+
const { isMobile } = useIsMobile();
1313

1414
useEffect(() => {
1515
const handleResize = () => {

src/components/landing-page-components/parts/pricing-card.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const PricingCard = ({
1111
buttonTitle,
1212
href
1313
}) => {
14-
const isMobile = useIsMobile();
14+
const { isMobile } = useIsMobile();
1515

1616
return (
1717
<div

src/components/landing-page-components/sections/landing-page-call-to-action.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { LINK_CHAT_WITH_FOUNDERS, LINK_GET_STARTED } from '@site/src/constants/l
88

99
const LandingPageCallToAction = () => {
1010
const history = useHistory();
11-
const isMobile = useIsMobile();
11+
const { isMobile } = useIsMobile();
1212
return (
1313
<LandingPageCard>
1414
<div

src/components/landing-page-components/sections/landing-page-community.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import PrimaryButtonWhiteText from '../parts/landing-page-button-primary-white-t
33
import { useIsMobile } from '../context-providers/mobile-context-provider';
44

55
const LandingPageCommunityCard = () => {
6-
const isMobile = useIsMobile();
6+
const { isMobile } = useIsMobile();
77

88
return (
99
<div

src/components/landing-page-components/sections/landing-page-demo-card.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import LandingPageLink from '../parts/landing-page-link';
44
import { useIsMobile } from '../context-providers/mobile-context-provider';
55

66
const LandingPageDemoCard = () => {
7-
const isMobile = useIsMobile();
7+
const { isMobile } = useIsMobile();
88

99
return (
1010
<LandingPageCard>

src/components/landing-page-components/sections/landing-page-end.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const BACKER_LOGOS_SRC = [
1111
];
1212

1313
const LandingPageEnd = () => {
14-
const isMobile = useIsMobile();
14+
const { isMobile } = useIsMobile();
1515

1616
return (
1717
<div

0 commit comments

Comments
 (0)