Skip to content

Commit

Permalink
refactor: change hook file name
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeRenJie committed Aug 5, 2023
1 parent 2106a79 commit 1bcdb7f
Show file tree
Hide file tree
Showing 4 changed files with 337 additions and 336 deletions.
56 changes: 28 additions & 28 deletions src/about/components/Education/EducationList.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
import React from "react";
import styles from "./Education.module.css";
import { Chrono } from "react-chrono";
import data from "./EducationData";
import useWindowSize from "../../../shared/hooks/windowSize";

const EducationList = () => {
const size = useWindowSize();
const bigScreenMode = "VERTICAL_ALTERNATING";
const smallScreenMode = "VERTICAL";

return (
<div className={styles.timeline}>
<Chrono
items={data}
mode={size.width <= 850 ? smallScreenMode : bigScreenMode}
hideControls
theme={{
primary: "#5969BA",
secondary: "#E6E8FA",
cardBgColor: "#d0d0d0",
}}
/>
</div>
);
};

export default EducationList;
import React from "react";
import styles from "./Education.module.css";
import { Chrono } from "react-chrono";
import data from "./EducationData";
import useWindowSize from "../../../shared/hooks/useWindowSize";

const EducationList = () => {
const size = useWindowSize();
const bigScreenMode = "VERTICAL_ALTERNATING";
const smallScreenMode = "VERTICAL";

return (
<div className={styles.timeline}>
<Chrono
items={data}
mode={size.width <= 850 ? smallScreenMode : bigScreenMode}
hideControls
theme={{
primary: "#5969BA",
secondary: "#E6E8FA",
cardBgColor: "#d0d0d0",
}}
/>
</div>
);
};

export default EducationList;
56 changes: 28 additions & 28 deletions src/experience/components/Experience/ExperienceList.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
import React from "react";
import styles from "./Experience.module.css";
import { Chrono } from "react-chrono";
import history from "./ExperienceData";
import useWindowSize from "../../../shared/hooks/windowSize";

const ExperienceList = () => {
const size = useWindowSize();
const bigScreenMode = "VERTICAL_ALTERNATING";
const smallScreenMode = "VERTICAL";

return (
<div className={styles.timeline}>
<Chrono
items={history}
mode={size.width <= 850 ? smallScreenMode : bigScreenMode}
hideControls
theme={{
primary: "#5969BA",
secondary: "#E6E8FA",
cardBgColor: "#d0d0d0",
}}
/>
</div>
);
};

export default ExperienceList;
import React from "react";
import styles from "./Experience.module.css";
import { Chrono } from "react-chrono";
import history from "./ExperienceData";
import useWindowSize from "../../../shared/hooks/useWindowSize";

const ExperienceList = () => {
const size = useWindowSize();
const bigScreenMode = "VERTICAL_ALTERNATING";
const smallScreenMode = "VERTICAL";

return (
<div className={styles.timeline}>
<Chrono
items={history}
mode={size.width <= 850 ? smallScreenMode : bigScreenMode}
hideControls
theme={{
primary: "#5969BA",
secondary: "#E6E8FA",
cardBgColor: "#d0d0d0",
}}
/>
</div>
);
};

export default ExperienceList;
Loading

0 comments on commit 1bcdb7f

Please sign in to comment.