refactor: refactor layout components to use SuspenseHelper for loading states

This commit is contained in:
rstubryan
2025-10-09 11:06:59 +07:00
parent 9f2add3a57
commit f0eabedcb2
9 changed files with 88 additions and 141 deletions
+23
View File
@@ -0,0 +1,23 @@
'use client';
import { Suspense } from 'react';
const SuspenseHelper = ({
children,
}: Readonly<{
children: React.ReactNode;
}>) => {
return (
<Suspense
fallback={
<div className='w-full flex flex-row justify-center items-center p-4'>
<span className='loading loading-spinner loading-xl' />
</div>
}
>
{children}
</Suspense>
);
};
export default SuspenseHelper;