'use client';

import { Suspense } from 'react';
import { useParams } from 'react-router';

import Loader from '@/components/ui/Loader';
import { OssState } from '@/pages/OssPage/OssContext';

import OssTabs from './OssTabs';

function OssPage() {
  const params = useParams();
  const itemID = params.id ? Number(params.id) : undefined;
  return (
    <Suspense fallback={<Loader />}>
      <OssState itemID={itemID}>
        <OssTabs />
      </OssState>
    </Suspense>
  );
}

export default OssPage;
