From e559c09e8783a2dbd78b53e7dc35eaf7b41ba5dd Mon Sep 17 00:00:00 2001 From: cmhhelgeson <62450112+cmhhelgeson@users.noreply.github.com> Date: Wed, 3 Jan 2024 16:48:12 -0800 Subject: [PATCH] Changed function names from stylePanel to stylePanelContents to better reflect the element/ref they are directly modifying --- src/pages/_app.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index 4eedc5a5..b6e3a1ad 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -49,7 +49,7 @@ const MainLayout: React.FunctionComponent = ({ }, []); // Style .panelContents when clicking the expand icon. - const stylePanelOnExpand = () => { + const stylePanelContentsOnExpand = () => { if (panelContentsRef.current) { if (panelContentsRef.current.style.maxHeight === '0px') { // Scroll height + marginBlockEnd of 16 @@ -65,7 +65,7 @@ const MainLayout: React.FunctionComponent = ({ }; //Style .panelContents when clicking on a link. - const stylePanelOnLink = () => { + const stylePanelContentsOnLink = () => { // Only hide the panelContents when our window size is less than 768 pixels. // Otherwise maintain the current layout of panelContents. if (window.innerWidth <= 768) { @@ -101,7 +101,7 @@ const MainLayout: React.FunctionComponent = ({
{ - stylePanelOnExpand(); + stylePanelContentsOnExpand(); }} >
@@ -128,7 +128,7 @@ const MainLayout: React.FunctionComponent = ({ { - stylePanelOnLink(); + stylePanelContentsOnLink(); }} > {slug}