8 lines
181 B
TypeScript
8 lines
181 B
TypeScript
import mappings from '@/mappings.json';
|
|
|
|
export function useMappings() {
|
|
return (val: string | null) => {
|
|
return mappings.find((item) => item.id === val)?.name ?? val;
|
|
};
|
|
}
|