@@ -5,7 +5,6 @@ import { PaperclipIcon } from 'lucide-react';
55
66import { Project } from "@/projects.config" ;
77import Markdown from "./markdown" ;
8- import { Table , TableBody , TableCell , TableHead , TableHeader , TableRow } from "./ui/table" ;
98
109export default function ReleaseCard ( props : { project : Project , release : Release , isLatest ?: boolean } ) {
1110 const { release, project } = props ;
@@ -34,34 +33,25 @@ export default function ReleaseCard(props: { project: Project, release: Release,
3433 { release . assets . length > 0 && (
3534 < div className = "border-t" >
3635 < h3 className = "text-lg font-medium p-4" > Assets</ h3 >
37- < Table >
38- < TableHeader >
39- < TableRow >
40- < TableHead className = "px-4" > File</ TableHead >
41- < TableHead className = "px-4" > Size</ TableHead >
42- < TableHead className = "px-4" > Download</ TableHead >
43- </ TableRow >
44- </ TableHeader >
45- < TableBody >
46- { release . assets . map ( ( asset : ReleaseAsset , index ) => (
47- < TableRow key = { index } >
48- < TableCell className = "font-mono flex items-center gap-2 px-4" >
49- < PaperclipIcon className = "w-4 h-4 text-muted-foreground" />
50- { asset . name }
51- </ TableCell >
52- < TableCell className = "font-mono text-muted-foreground px-4" > { formatBytes ( asset . size ) } </ TableCell >
53- < TableCell className = "flex gap-2 px-4" >
54- < a href = { cdnUrl ( `${ project . repo } /${ release . tag_name } /${ asset . name } ` ) } className = "text-blue-600 hover:underline" >
55- CDN
56- </ a >
57- < a href = { asset . browser_download_url } className = "text-blue-600 hover:underline" >
58- GitHub
59- </ a >
60- </ TableCell >
61- </ TableRow >
62- ) ) }
63- </ TableBody >
64- </ Table >
36+ { release . assets . map ( ( asset : ReleaseAsset , index ) => (
37+ < div key = { index } className = "border-t py-2 md:flex items-center gap-4 px-4" >
38+ < div className = "flex items-center gap-2 justify-between md:justify-start" >
39+ < div className = "font-mono flex items-center gap-2" >
40+ < PaperclipIcon className = "w-4 h-4 text-muted-foreground" />
41+ { asset . name }
42+ </ div >
43+ < div className = "font-mono text-muted-foreground" > { formatBytes ( asset . size ) } </ div >
44+ </ div >
45+ < div className = "flex gap-2" >
46+ < a href = { cdnUrl ( `${ project . repo } /${ release . tag_name } /${ asset . name } ` ) } className = "text-blue-600 hover:underline" >
47+ CDN
48+ </ a >
49+ < a href = { asset . browser_download_url } className = "text-blue-600 hover:underline" >
50+ GitHub
51+ </ a >
52+ </ div >
53+ </ div >
54+ ) ) }
6555 </ div >
6656 ) }
6757 </ div >
0 commit comments