mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-14 08:34:25 +03:00
landscape/util: cast getModuleIcon
This commit is contained in:
parent
a276d42078
commit
36c5f1644b
@ -23,7 +23,9 @@ export const MOMENT_CALENDAR_DATE = {
|
||||
sameElse: '~YYYY.M.D'
|
||||
};
|
||||
|
||||
export const getModuleIcon = (mod: string): IconRef => {
|
||||
type GraphModule = 'link' | 'post' | 'chat' | 'publish';
|
||||
|
||||
export const getModuleIcon = (mod: GraphModule): IconRef => {
|
||||
if (mod === 'link') {
|
||||
return 'Collection';
|
||||
}
|
||||
@ -32,7 +34,7 @@ export const getModuleIcon = (mod: string): IconRef => {
|
||||
return 'Dashboard';
|
||||
}
|
||||
|
||||
return _.capitalize(mod);
|
||||
return _.capitalize(mod) as IconRef;
|
||||
};
|
||||
|
||||
export function wait(ms: number) {
|
||||
|
Loading…
Reference in New Issue
Block a user