feat: model comparison picto timeline
This commit is contained in:
@@ -80,4 +80,10 @@ const weatherCodes: Record<number, string> = {
|
||||
99: 'tornado'
|
||||
};
|
||||
|
||||
export function getWeatherIconName(code: number, daytime: boolean): string {
|
||||
const prefix = daytime ? 'day' : 'night';
|
||||
const name = weatherCodes[code as keyof typeof weatherCodes] ?? 'clear';
|
||||
return `wi-${prefix}-${name}`;
|
||||
}
|
||||
|
||||
export default weatherCodes;
|
||||
|
||||
Reference in New Issue
Block a user