Skip to content

Commit 1f5da6c

Browse files
committed
remove scrollbar locking. too finicky.
1 parent f1dc4bd commit 1f5da6c

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

src/components/EmbedMachine/index.tsx

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState } from 'react';
1+
import React from 'react';
22
import styles from './styles.module.css';
33
import { useColorMode } from '@docusaurus/theme-common';
44

@@ -7,23 +7,9 @@ type Embed = {
77
embedURL: string;
88
};
99

10-
1110
export default function EmbedMachine({ name, embedURL }: Embed) {
1211
const { colorMode } = useColorMode();
13-
14-
// keeps the whole page from scrolling when
15-
const handleMouseEnter = () => {
16-
document.body.style.overflow = 'hidden';
17-
}
18-
const handleMouseLeave = () => {
19-
document.body.style.overflow = 'auto';
20-
}
21-
2212
return (
23-
<div
24-
onMouseEnter={handleMouseEnter}
25-
onMouseLeave={handleMouseLeave}
26-
>
2713
<iframe
2814
loading="lazy"
2915
src={manageURL(embedURL, {
@@ -36,7 +22,6 @@ export default function EmbedMachine({ name, embedURL }: Embed) {
3622
</a>
3723
.
3824
</iframe>
39-
</div>
4025
);
4126
}
4227

0 commit comments

Comments
 (0)