9 lines
182 B
TypeScript
9 lines
182 B
TypeScript
export const translateOptions = (options: any, t: any) => {
|
|
|
|
return options?.map((opt: any) => ({
|
|
...opt,
|
|
label: t(`${opt?.label}`),
|
|
name: t(`${opt?.name}`),
|
|
}));
|
|
};
|