1
0
mirror of https://github.com/flarum/core.git synced 2025-07-11 20:06:23 +02:00

Use Link component for links instead of mithril route patch (#2315)

This new component now also supports external links.
This commit is contained in:
Alexander Skvortsov
2020-10-02 16:56:40 -04:00
committed by GitHub
parent b66d16e44b
commit 5ecb74fb59
16 changed files with 104 additions and 71 deletions

View File

@ -1,6 +1,7 @@
import UserPage from './UserPage';
import LoadingIndicator from '../../common/components/LoadingIndicator';
import Button from '../../common/components/Button';
import Link from '../../common/components/Link';
import Placeholder from '../../common/components/Placeholder';
import CommentPost from './CommentPost';
@ -73,7 +74,7 @@ export default class PostsUserPage extends UserPage {
<li>
<div className="PostsUserPage-discussion">
{app.translator.trans('core.forum.user.in_discussion_text', {
discussion: <a route={app.route.post(post)}>{post.discussion().title()}</a>,
discussion: <Link href={app.route.post(post)}>{post.discussion().title()}</Link>,
})}
</div>