| // src/pages/PaperObjectPage.tsx | |
| import { useParams } from "react-router-dom"; | |
| import { usePaperObject } from "@/hooks/usePaperObject"; | |
| import { PaperHeader } from "@/components/publication/PaperHeader"; | |
| import { PaperBody } from "@/components/publication/PaperBody"; | |
| import { CitationExportPanel } from "@/components/publication/CitationExportPanel"; | |
| import { FigureBrowser } from "@/components/publication/FigureBrowser"; | |
| import { PaperAnalyticsDashboard } from "@/components/publication/PaperAnalyticsDashboard"; | |
| import { Skeleton } from "@/components/ui/skeleton"; | |
| import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; | |
| import { FileText, BarChart3, Image, BookOpen } from "lucide-react"; | |
| export default function PaperObjectPage() { | |
| const { paperId, id } = useParams<{ paperId?: string; id?: string }>(); | |
| const resolvedPaperId = paperId || id; | |
| const { paper, loading, error } = usePaperObject(resolvedPaperId!); | |
| if (loading) { | |
| return <div className="max-w-5xl mx-auto px-4 py-8"><Skeleton className="h-96 w-full" /></div>; | |
| } | |
| if (error || !paper) { | |
| return <div className="p-8 text-center text-red-500">Paper not found</div>; | |
| } | |
| return ( | |
| <div className="max-w-5xl mx-auto px-4 py-8 space-y-6"> | |
| <PaperHeader paper={paper} /> | |
| <Tabs defaultValue="content" className="space-y-6"> | |
| <TabsList> | |
| <TabsTrigger value="content"><FileText className="w-4 h-4 mr-2" /> Content</TabsTrigger> | |
| <TabsTrigger value="figures"><Image className="w-4 h-4 mr-2" /> Figures</TabsTrigger> | |
| <TabsTrigger value="citations"><BookOpen className="w-4 h-4 mr-2" /> Cite</TabsTrigger> | |
| <TabsTrigger value="analytics"><BarChart3 className="w-4 h-4 mr-2" /> Analytics</TabsTrigger> | |
| </TabsList> | |
| <TabsContent value="content"><PaperBody body={(paper as any).body ?? (paper as any).abstract ?? ""} /></TabsContent> | |
| <TabsContent value="figures"><FigureBrowser figures={paper.figures || []} /></TabsContent> | |
| <TabsContent value="citations"><CitationExportPanel paper={paper} /></TabsContent> | |
| <TabsContent value="analytics"><PaperAnalyticsDashboard paperId={paper.id} /></TabsContent> | |
| </Tabs> | |
| </div> | |
| ); | |
| } | |
Xet Storage Details
- Size:
- 2.23 kB
- Xet hash:
- 33dc726c31f72667b76c7b9c5fa7f99f9d730cdeeff7c17dc8f5c8310ce55e62
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.