Loading.tsx 579 B

12345678910111213141516171819202122232425
  1. 'use client';
  2. import Image from 'next/image';
  3. type Props = {
  4. type?: number;
  5. };
  6. export default function Loading({ type = 1 }: Props) {
  7. return (
  8. <>
  9. { type === 1 && (
  10. <div className='absolute h-full inset-0 flex items-center justify-center bg-black bg-opacity-30 z-50'>
  11. <Image src='/resources/loading.gif' alt='준비 중...' width={64} height={64} />
  12. </div>
  13. )}
  14. { type === 2 && (
  15. <div className='w-full flex items-center justify-center my-4'>
  16. <Image src='/resources/loading.gif' alt='준비 중...' width={32} height={32} />
  17. </div>
  18. )}
  19. </>
  20. );
  21. }