Skip to content
This repository was archived by the owner on Apr 7, 2025. It is now read-only.

Commit 03bf4db

Browse files
committed
fix: remove HOC from PageHeading
1 parent bcbdc66 commit 03bf4db

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

src/components/Image.js

-9
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@ const Image = (props) => {
1313
const [currentSrc, setCurrentSrc] = useState(props.src);
1414
const [errored, setErrored] = useState(false);
1515

16-
const [isClient, setIsClient] = useState(false);
17-
React.useEffect(() => {
18-
setIsClient(true);
19-
}, []);
20-
2116
React.useEffect(() => {
2217
if (errored) {
2318
setCurrentSrc(props.fallbackSrc);
@@ -33,10 +28,6 @@ const Image = (props) => {
3328

3429
const { src, fallbackSrc, ...remainingProps } = props;
3530

36-
if (!isClient) {
37-
return null;
38-
}
39-
4031
return (
4132
<>
4233
{currentSrc ? (

src/components/PageHeading.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,4 +112,4 @@ PageHeading.propTypes = {
112112
className: PropTypes.string,
113113
};
114114

115-
export default withDarkMode(PageHeading);
115+
export default PageHeading;

0 commit comments

Comments
 (0)