File tree Expand file tree Collapse file tree 2 files changed +16
-10
lines changed
frontend/src/routes/questions Expand file tree Collapse file tree 2 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import type { IGetQuestionsResponse } from '@/types/question-types';
10
10
11
11
import { QuestionTable } from './question-table' ;
12
12
import { columns } from './table-columns' ;
13
+ import { ScrollArea } from '@/components/ui/scroll-area' ;
13
14
14
15
const getListQuestionsQueryConfig = ( pageNumber ?: number ) =>
15
16
queryOptions ( {
@@ -69,12 +70,14 @@ export function Questions() {
69
70
70
71
return (
71
72
< WithNavBanner crumbs = { crumbs } >
72
- < div className = 'container mx-auto py-3' >
73
- < Suspense fallback = { < Loading /> } >
74
- < Await resolve = { initialData . initialPage } >
75
- < QuestionTable columns = { columns } data = { questions } isError = { isError } />
76
- </ Await >
77
- </ Suspense >
73
+ < div className = 'flex w-full flex-1 overflow-hidden py-3' >
74
+ < ScrollArea className = 'size-full px-6' >
75
+ < Suspense fallback = { < Loading /> } >
76
+ < Await resolve = { initialData . initialPage } >
77
+ < QuestionTable columns = { columns } data = { questions } isError = { isError } />
78
+ </ Await >
79
+ </ Suspense >
80
+ </ ScrollArea >
78
81
</ div >
79
82
</ WithNavBanner >
80
83
) ;
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ export function QuestionTable<TData, TValue>({
73
73
} ;
74
74
75
75
return (
76
- < div >
76
+ < div className = 'flex size-full flex-col' >
77
77
< div className = 'flex items-center py-4' >
78
78
< div className = 'mr-2' >
79
79
< Select onValueChange = { handleStatusFilterChange } >
@@ -107,11 +107,14 @@ export function QuestionTable<TData, TValue>({
107
107
className = 'max-w-sm'
108
108
/>
109
109
</ div >
110
- < div className = 'rounded-md border' >
110
+ < div className = 'border-border rounded-md border' >
111
111
< Table >
112
112
< TableHeader >
113
113
{ table . getHeaderGroups ( ) . map ( ( headerGroup ) => (
114
- < TableRow key = { headerGroup . id } >
114
+ < TableRow
115
+ className = 'border-border/60 bg-primary-foreground text-primary'
116
+ key = { headerGroup . id }
117
+ >
115
118
{ headerGroup . headers . map ( ( header ) => {
116
119
return (
117
120
< TableHead key = { header . id } >
@@ -127,7 +130,7 @@ export function QuestionTable<TData, TValue>({
127
130
< TableBody >
128
131
{ ! isError && table . getRowModel ( ) . rows ?. length ? (
129
132
table . getRowModel ( ) . rows . map ( ( row ) => (
130
- < TableRow key = { row . id } >
133
+ < TableRow key = { row . id } className = 'border-border/60 even:bg-secondary/10' >
131
134
{ row . getVisibleCells ( ) . map ( ( cell ) => (
132
135
< TableCell key = { cell . id } >
133
136
{ flexRender ( cell . column . columnDef . cell , cell . getContext ( ) ) }
You can’t perform that action at this time.
0 commit comments