Cosmetics (typescript)
This commit is contained in:
parent
787323bcac
commit
7caf088a7e
|
@ -32,7 +32,7 @@ export const getTagStatus = <TagStatus>(
|
|||
) => {
|
||||
const defaultStatus = {
|
||||
highlighted: false,
|
||||
};
|
||||
} as TagStatus;
|
||||
const activityDefinitions = definitions[selectedKey];
|
||||
if (!activityDefinitions) {
|
||||
return defaultStatus;
|
||||
|
@ -47,23 +47,16 @@ export const getTagStatus = <TagStatus>(
|
|||
if (!!highlightedDefinitions) {
|
||||
const definition = highlightedDefinitions[tag];
|
||||
if (!!definition) {
|
||||
return { type, definition, highlighted: true };
|
||||
return { type, definition, highlighted: true } as TagStatus;
|
||||
}
|
||||
}
|
||||
|
||||
for (const category of Object.keys(typeDefinitions)) {
|
||||
if (category !== highlightedKey) {
|
||||
const categoryDefinitions = typeDefinitions[category];
|
||||
console.log({
|
||||
caller: 'getTagStatus / looping over categories',
|
||||
type,
|
||||
typeDefinitions,
|
||||
category,
|
||||
categoryDefinitions,
|
||||
});
|
||||
const definition = categoryDefinitions[tag];
|
||||
if (!!definition) {
|
||||
return { type, definition, highlighted: false };
|
||||
return { type, definition, highlighted: false } as TagStatus;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue