added will-change property to some elements (hoping it will do something)

This commit is contained in:
corgifist 2025-07-27 23:37:08 +03:00
parent 35f4084833
commit 0710981de7
2 changed files with 3 additions and 2 deletions

View File

@ -1,3 +1,4 @@
import { cn } from "@/lib/utils";
import { ComponentProps, useEffect, useRef, useState } from "react";
const easeFade = (x: number) => (
@ -20,5 +21,5 @@ export const ScrollFadingTitle = (props: ComponentProps<"div">) => {
return () => window.removeEventListener('scroll', handleScroll);
}, [elementRef]);
return <div style={{opacity: 1}} ref={elementRef} {...props}/>
return <div style={{opacity: 1}} ref={elementRef} {...props} className={cn("will-change-auto", props.className)}/>
};

View File

@ -31,5 +31,5 @@ export const SidebarTriggerAdjustable = (props: ComponentProps<"div">) => {
};
}, [isMobile]);
return <div data-sidebar-trigger="true" {...props}></div>;
return <div data-sidebar-trigger="true" {...props} className={cn("will-change-auto", props.className)}></div>;
}