fix(Personal): Make `Personal` related links conform to the `Permalink` setting

This commit is contained in:
haitaoo 2023-03-13 11:37:48 +08:00
parent 4aa63357b8
commit 54610b6fa8
2 changed files with 7 additions and 4 deletions

View File

@ -24,11 +24,14 @@ const Index: FC<Props> = ({ visible, data }) => {
className="text-break"
href={
item.object_type === 'question'
? pathFactory.questionLanding(item.object_id, item.url_title)
? pathFactory.questionLanding(
item.question_id,
item.url_title,
)
: pathFactory.answerLanding({
questionId: item.question_id,
slugTitle: item.url_title,
answerId: item.object_id,
answerId: item.answer_id,
})
}>
{item.title}

View File

@ -36,13 +36,13 @@ const Index: FC<Props> = ({ visible, data }) => {
href={
item.object_type === 'question'
? pathFactory.questionLanding(
item.object_id,
item.question_id,
item.url_title,
)
: pathFactory.answerLanding({
questionId: item.question_id,
slugTitle: item.url_title,
answerId: item.object_id,
answerId: item.answer_id,
})
}>
{item.title}