feat(MED-168): move toArray to shared utils
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
'use server';
|
||||
|
||||
import { toArray } from '@/lib/utils';
|
||||
|
||||
import { getMailer } from '@kit/mailers';
|
||||
import { enhanceAction } from '@kit/next/actions';
|
||||
import { getLogger } from '@kit/shared/logger';
|
||||
import { toArray } from '@kit/shared/utils';
|
||||
|
||||
import { emailSchema } from '~/lib/validations/email.schema';
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ import type {
|
||||
MedipostOrderResponse,
|
||||
UuringElement,
|
||||
} from '@/packages/shared/src/types/medipost-analysis';
|
||||
import { toArray } from '@/lib/utils';
|
||||
import { toArray } from '@kit/shared/utils';
|
||||
import type { AnalysisOrder } from '~/lib/types/analysis-order';
|
||||
import type { AnalysisResponseElement } from '~/lib/types/analysis-response-element';
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ import {
|
||||
import {
|
||||
MaterjalideGrupp,
|
||||
} from '@/lib/types/medipost';
|
||||
import { toArray } from '@/lib/utils';
|
||||
import { toArray } from '@kit/shared/utils';
|
||||
import { uniqBy } from 'lodash';
|
||||
|
||||
import { Tables } from '@kit/supabase/database';
|
||||
|
||||
@@ -9,11 +9,6 @@ export function cn(...inputs: ClassValue[]) {
|
||||
return twMerge(clsx(inputs));
|
||||
}
|
||||
|
||||
export function toArray<T>(input?: T | T[] | null): T[] {
|
||||
if (!input) return [];
|
||||
return Array.isArray(input) ? input : [input];
|
||||
}
|
||||
|
||||
export function toTitleCase(str?: string) {
|
||||
return (
|
||||
str
|
||||
|
||||
Reference in New Issue
Block a user