multiple breakpoints

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-06-20 23:25:18 +02:00
parent c07f0d302c
commit cf8617e809
48 changed files with 908 additions and 432 deletions

View File

@@ -1,7 +1,13 @@
import mappings from '@/mappings.json';
export function useMappings() {
return (val: string | null) => {
return (val: string | string[]): string => {
if (Array.isArray(val)) {
return val
.map((v) => mappings.find((item) => item.id === v)?.name ?? v)
.join('');
}
return mappings.find((item) => item.id === val)?.name ?? val;
};
}