Browse Source

feat: add 'Пройти тест' button to test list table

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
master
Aleksey Razorvin 1 week ago
parent
commit
a7937c937b
  1. 20
      frontend/src/pages/TestList/index.tsx

20
frontend/src/pages/TestList/index.tsx

@ -1,4 +1,4 @@
import { PlusOutlined } from '@ant-design/icons'
import { PlayCircleOutlined, PlusOutlined } from '@ant-design/icons'
import { useQuery } from '@tanstack/react-query'
import { Button, Space, Spin, Table, Tag, Typography } from 'antd'
import type { ColumnsType } from 'antd/es/table'
@ -58,11 +58,21 @@ export default function TestList() {
{
title: '',
key: 'actions',
width: 90,
width: 200,
render: (_: unknown, record: TestListItem) => (
<Button size="small" onClick={() => navigate(`/tests/${record.id}`)}>
Открыть
</Button>
<Space>
<Button size="small" onClick={() => navigate(`/tests/${record.id}`)}>
Открыть
</Button>
<Button
size="small"
type="primary"
icon={<PlayCircleOutlined />}
onClick={() => navigate(`/tests/${record.id}/take`)}
>
Пройти тест
</Button>
</Space>
),
},
]

Loading…
Cancel
Save