detail page done

This commit is contained in:
nabijonovdavronbek619@gmail.com
2026-03-31 16:47:18 +05:00
parent 0495f16e5e
commit 3fe54b5c3c
40 changed files with 2004 additions and 241 deletions

View File

@@ -0,0 +1,46 @@
'use client';
import React from 'react';
import { useHistory } from '../lib/useHistory';
import { HistoryTable } from './historyTable';
import { Pagination } from './pagination';
// ─── Page Header ───────────────────────────────────────────────────────────────
const PageHeader: React.FC = () => (
<div className="mb-6">
<h1 className="text-2xl font-semibold text-slate-900 tracking-tight">
Check History
</h1>
<p className="mt-1 text-sm text-slate-500">
All plagiarism checks submitted by you
</p>
</div>
);
// ─── HistoryPage ───────────────────────────────────────────────────────────────
export const HistoryPage = () => {
const { items, status, error, refetch, currentPage, totalPages, goToPage } =
useHistory();
return (
<div className=" px-4 py-10 sm:px-6 lg:px-8">
<div className="mx-auto max-w-6xl">
<PageHeader />
<HistoryTable
items={items}
isLoading={false}
error={status === 'error' ? error : null}
onRetry={refetch}
/>
<Pagination
currentPage={currentPage}
totalPages={totalPages}
onPageChange={goToPage}
/>
</div>
</div>
);
};