1
0
mirror of https://github.com/flarum/core.git synced 2025-10-15 00:44:40 +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,5 +1,6 @@
import ComposerBody from './ComposerBody';
import Button from '../../common/components/Button';
import Link from '../../common/components/Link';
import icon from '../../common/helpers/icon';
import extractText from '../../common/utils/extractText';
@@ -36,9 +37,9 @@ export default class ReplyComposer extends ComposerBody {
'title',
<h3>
{icon('fas fa-reply')}{' '}
<a route={app.route.discussion(discussion)} onclick={minimizeComposerIfFullScreen}>
<Link href={app.route.discussion(discussion)} onclick={minimizeComposerIfFullScreen}>
{discussion.title()}
</a>
</Link>
</h3>
);