weareinreach / InReach

Detected the use of variables before they are defined JS-0357
Anti-pattern
Major
14 days ago2 years old
'WebsitesEdit' was used before it was defined
 19const anyTrue = (...args: boolean[]) => args.some((x) => x)
 20
 21export const Websites = ({ edit, ...props }: WebsitesProps) =>
 22	edit ? <WebsitesEdit {...props} /> : <WebsitesDisplay {...props} /> 23
 24const WebsitesDisplay = ({
 25	parentId = '',
'WebsitesDisplay' was used before it was defined
 19const anyTrue = (...args: boolean[]) => args.some((x) => x)
 20
 21export const Websites = ({ edit, ...props }: WebsitesProps) =>
 22	edit ? <WebsitesEdit {...props} /> : <WebsitesDisplay {...props} /> 23
 24const WebsitesDisplay = ({
 25	parentId = '',
'EmailsDisplay' was used before it was defined
 22const anyTrue = (...args: boolean[]) => args.some((x) => x)
 23
 24export const Emails = ({ edit, ...props }: EmailsProps) =>
 25	edit ? <EmailsEdit {...props} /> : <EmailsDisplay {...props} /> 26
 27const EmailsDisplay = ({
 28	parentId = '',
'EmailsEdit' was used before it was defined
 22const anyTrue = (...args: boolean[]) => args.some((x) => x)
 23
 24export const Emails = ({ edit, ...props }: EmailsProps) =>
 25	edit ? <EmailsEdit {...props} /> : <EmailsDisplay {...props} /> 26
 27const EmailsDisplay = ({
 28	parentId = '',
'PhoneNumbersDisplay' was used before it was defined
 18const formatNs = nsFormatter(['common', 'phone-type'])
 19
 20export const PhoneNumbers = ({ edit, ...props }: PhoneNumbersProps) =>
 21	edit ? <PhoneNumbersEdit {...props} /> : <PhoneNumbersDisplay {...props} /> 22
 23const PhoneNumbersDisplay = ({ parentId = '', passedData, direct, locationOnly }: PhoneNumbersProps) => {
 24	const output: ReactElement[] = []