Move getPlaceholder to component that needs it
This commit is contained in:
parent
c33fea35dc
commit
254cddc514
3 changed files with 7 additions and 12 deletions
|
@ -4,7 +4,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { ConversationType } from '../state/ducks/conversations';
|
import { ConversationType } from '../state/ducks/conversations';
|
||||||
import { LocalizerType } from '../types/Util';
|
import { LocalizerType } from '../types/Util';
|
||||||
import { getPlaceholder } from '../util/safetyNumber';
|
|
||||||
import { Intl } from './Intl';
|
import { Intl } from './Intl';
|
||||||
|
|
||||||
export type PropsType = {
|
export type PropsType = {
|
||||||
|
@ -112,3 +111,9 @@ export const SafetyNumberViewer = ({
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function getPlaceholder(): string {
|
||||||
|
return Array.from(Array(12))
|
||||||
|
.map(() => 'XXXXX')
|
||||||
|
.join(' ');
|
||||||
|
}
|
||||||
|
|
|
@ -9,10 +9,7 @@ import { createBatcher } from './batcher';
|
||||||
import { createWaitBatcher } from './waitBatcher';
|
import { createWaitBatcher } from './waitBatcher';
|
||||||
import { deleteForEveryone } from './deleteForEveryone';
|
import { deleteForEveryone } from './deleteForEveryone';
|
||||||
import { downloadAttachment } from './downloadAttachment';
|
import { downloadAttachment } from './downloadAttachment';
|
||||||
import {
|
import { generateSecurityNumber } from './safetyNumber';
|
||||||
generateSecurityNumber,
|
|
||||||
getPlaceholder as getSafetyNumberPlaceholder,
|
|
||||||
} from './safetyNumber';
|
|
||||||
import { getStringForProfileChange } from './getStringForProfileChange';
|
import { getStringForProfileChange } from './getStringForProfileChange';
|
||||||
import { getTextWithMentions } from './getTextWithMentions';
|
import { getTextWithMentions } from './getTextWithMentions';
|
||||||
import { getUserAgent } from './getUserAgent';
|
import { getUserAgent } from './getUserAgent';
|
||||||
|
@ -36,7 +33,6 @@ export {
|
||||||
downloadAttachment,
|
downloadAttachment,
|
||||||
fromWebSafeBase64,
|
fromWebSafeBase64,
|
||||||
generateSecurityNumber,
|
generateSecurityNumber,
|
||||||
getSafetyNumberPlaceholder,
|
|
||||||
getStringForProfileChange,
|
getStringForProfileChange,
|
||||||
getTextWithMentions,
|
getTextWithMentions,
|
||||||
getUserAgent,
|
getUserAgent,
|
||||||
|
|
|
@ -28,12 +28,6 @@ export async function generateSecurityNumber(
|
||||||
return Promise.resolve(fingerprintString);
|
return Promise.resolve(fingerprintString);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getPlaceholder(): string {
|
|
||||||
return Array.from(Array(12))
|
|
||||||
.map(() => 'XXXXX')
|
|
||||||
.join(' ');
|
|
||||||
}
|
|
||||||
|
|
||||||
export async function generateSecurityNumberBlock(
|
export async function generateSecurityNumberBlock(
|
||||||
contact: ConversationType
|
contact: ConversationType
|
||||||
): Promise<Array<string>> {
|
): Promise<Array<string>> {
|
||||||
|
|
Loading…
Reference in a new issue