Skip to content

Commit b831e97

Browse files
Adds redirect to qn page
1 parent a922b45 commit b831e97

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

frontend/src/components/QnTable/QnTable.component.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@ import {
1212
Tag,
1313
Center,
1414
IconButton,
15+
Text,
1516
} from "@chakra-ui/react";
1617
import { Paginator } from "../Paginator/Paginator.component";
1718
import { Question } from "../../models/Quesiton.model";
1819
import { diffToScheme, isAdmin } from "../../helper/UIHelper";
1920
import { DeleteIcon } from "@chakra-ui/icons";
2021
import { deleteDummyQn } from "../../data/sampleqn";
22+
import { Link } from "react-router-dom";
2123

2224
export type TableProp = {
2325
filteredQn: Question[];
@@ -27,7 +29,11 @@ export type TableProp = {
2729
const QnEntry = (qn: Question) => {
2830
return (
2931
<Tr>
30-
<Td>{qn.displayedQuestion}</Td>
32+
<Td>
33+
<Link to={`/view/${qn.id}`}>
34+
<Text>{qn.displayedQuestion}</Text>
35+
</Link>
36+
</Td>
3137
<Td>
3238
<HStack spacing={1}>
3339
{qn.categories.map((qntype) => (

0 commit comments

Comments
 (0)