@@ -14,7 +14,8 @@ import {
1414import { Badge } from "@/components/ui/badge" ;
1515import { Button } from "@/components/ui/button" ;
1616import { Skeleton } from "@/components/ui/skeleton" ;
17- import { Download , Columns3 } from "lucide-react" ;
17+ import { Download , Columns3 , Flag } from "lucide-react" ;
18+ import { FeedbackModal } from "@/components/feedback-modal" ;
1819import {
1920 DropdownMenu ,
2021 DropdownMenuTrigger ,
@@ -293,6 +294,8 @@ export function StablecoinTable({ data, isLoading, activeFilters, logos, pegRate
293294 } ) ;
294295 } , [ filtered , sort , effectiveSortKey , pegScores , dexLiquidity , reportCards , pegRates , metaById ] ) ;
295296
297+ const [ feedbackCoin , setFeedbackCoin ] = useState < { id : string ; name : string } | null > ( null ) ;
298+
296299 // Reset scroll when filters, search, or sort change
297300 const [ prev , setPrev ] = useState ( { filtered, sort } ) ;
298301 if ( prev . filtered !== filtered || prev . sort !== sort ) {
@@ -518,6 +521,7 @@ export function StablecoinTable({ data, isLoading, activeFilters, logos, pegRate
518521 { isVisible ( "flags" ) && (
519522 < TableHead className = "hidden md:table-cell text-center" > Flags</ TableHead >
520523 ) }
524+ < TableHead className = "w-8" />
521525 </ TableRow >
522526 </ TableHeader >
523527 < TableBody >
@@ -537,7 +541,7 @@ export function StablecoinTable({ data, isLoading, activeFilters, logos, pegRate
537541 return (
538542 < TableRow
539543 key = { coin . id }
540- className = "cursor-pointer focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:outline-none"
544+ className = "group cursor-pointer focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:outline-none"
541545 style = { { height : ROW_HEIGHT } }
542546 onClick = { ( ) => router . push ( `/stablecoin/${ coin . id } ` ) }
543547 onMouseEnter = { ( ) => prefetch ( coin . id ) }
@@ -700,6 +704,16 @@ export function StablecoinTable({ data, isLoading, activeFilters, logos, pegRate
700704 </ div >
701705 </ TableCell >
702706 ) }
707+ < TableCell className = "w-8 p-1 text-center" >
708+ < button
709+ onClick = { ( e ) => { e . stopPropagation ( ) ; setFeedbackCoin ( { id : coin . id , name : coin . name } ) ; } }
710+ className = "opacity-0 group-hover:opacity-100 rounded p-1 text-muted-foreground hover:text-foreground transition-all"
711+ aria-label = { `Report data issue for ${ coin . name } ` }
712+ title = "Report data issue"
713+ >
714+ < Flag className = "h-3 w-3" />
715+ </ button >
716+ </ TableCell >
703717 </ TableRow >
704718 ) ;
705719 } ) }
@@ -742,6 +756,16 @@ export function StablecoinTable({ data, isLoading, activeFilters, logos, pegRate
742756 </ span >
743757 </ div >
744758 ) }
759+
760+ { feedbackCoin && (
761+ < FeedbackModal
762+ open = { ! ! feedbackCoin }
763+ onOpenChange = { ( open ) => { if ( ! open ) setFeedbackCoin ( null ) ; } }
764+ defaultType = "data-correction"
765+ stablecoinId = { feedbackCoin . id }
766+ stablecoinName = { feedbackCoin . name }
767+ />
768+ ) }
745769 </ div >
746770 ) ;
747771}
0 commit comments