weareinreach / InReach

Found shorthand type coercions JS-0066
Anti-pattern
Minor
2 days agoa year old
 56			select: (serviceInfoResult) => serviceInfoResult.length !== 0,
 57		}
 58	)
 59	const { data: alertData } = api.organization.getAlerts.useQuery({ slug }, { enabled: !!slug }) 60	const hasAlerts = Array.isArray(alertData) && alertData.length > 0
 61	const { ref, width } = useElementSize()
 62	const { searchState } = useSearchState()
use Boolean(data?.id) instead
 52	const { data: hasRemote } = api.service.forServiceInfoCard.useQuery(
 53		{ parentId: data?.id ?? '', remoteOnly: true },
 54		{
 55			enabled: !!data?.id && data?.locations?.length > 1, 56			select: (serviceInfoResult) => serviceInfoResult.length !== 0,
 57		}
 58	)
use Boolean(process.env.SENTRY_DEBUG) instead
13Sentry.init({
14	dsn: 'https://[email protected]/6751163',
15	enabled: isVercel,
16	debug: !!process.env.SENTRY_DEBUG,17	// Tracing rates
18	tracesSampleRate: 0.5,
19	profilesSampleRate: 0.5,
use Boolean(process.env.SENTRY_DEBUG) instead
15	tracesSampleRate: 0.5,
16
17	// Setting this option to true will print useful information to the console while you're setting up Sentry.
18	debug: !!process.env.SENTRY_DEBUG,19})
use Boolean(process.env.SENTRY_DEBUG) instead
16	enabled: isVercel,
17
18	// Setting this option to true will print useful information to the console while you're setting up Sentry.
19	debug: !!process.env.SENTRY_DEBUG,20
21	// Set sample rates
22	replaysOnErrorSampleRate: 1.0,