Import function correctly

There was a typo in the function's name which broke mentions.
This commit is contained in:
Alexander Skvortsov 2021-10-06 16:15:01 -04:00
parent 798fadbddc
commit 03c6db4c8d

View File

@ -1,4 +1,4 @@
import getCleanDisplayName, { ShouldUseOldFormat } from './getCleanDisplayName';
import getCleanDisplayName, { shouldUseOldFormat } from './getCleanDisplayName';
/**
* Fetches the mention text for a specified user (and optionally a post ID for replies).
@ -20,7 +20,7 @@ import getCleanDisplayName, { ShouldUseOldFormat } from './getCleanDisplayName';
*/
export default function getMentionText(user, postId) {
if (postId === undefined) {
if (ShouldUseOldFormat()) {
if (shouldUseOldFormat()) {
// Plain @username
const cleanText = getCleanDisplayName(user, false);
return `@${cleanText}`;