Clean up main element style on unmount in AuditsPage

Add cleanup function to the useEffect that sets position: relative on
the main element, so the style is restored when the component unmounts.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2026-03-18 23:41:33 +01:00
parent 44cc650af2
commit f89fdc02b1

View File

@@ -196,6 +196,11 @@ export default function AuditsPage(props: Props) {
if (mainRef.current) {
mainRef.current.style.position = "relative";
}
return () => {
if (mainRef.current) {
mainRef.current.style.position = "";
}
};
}, []);
return (