From 2a8e839df787804186ae8f5a216b4778e4b47b3f Mon Sep 17 00:00:00 2001 From: Prakshitha Malla Date: Mon, 8 Jun 2026 22:07:03 +0530 Subject: [PATCH] perf: implement IntersectionObserver lazy loading wrapper for chat attachments (#347) --- frontend/src/components/chat/LazyMedia.jsx | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 frontend/src/components/chat/LazyMedia.jsx diff --git a/frontend/src/components/chat/LazyMedia.jsx b/frontend/src/components/chat/LazyMedia.jsx new file mode 100644 index 0000000..e429558 --- /dev/null +++ b/frontend/src/components/chat/LazyMedia.jsx @@ -0,0 +1,52 @@ +import React, { useState, useEffect, useRef } from "react"; + +/** + * LazyMedia Wrapper Component + * Intercepts default browser eager fetches by wrapping and