fix(frontend): Fix app icons (#1977)

This commit is contained in:
Faton Ramadani
2023-08-01 12:55:45 +02:00
committed by GitHub
parent d7ec2c0ab4
commit edd98c6149
@@ -1,4 +1,10 @@
import { toKebabCase } from '../utils'
function toKebabCase(str: string): string {
return str
.replace(/([a-z0-9])([A-Z])/g, '$1-$2') // Convert camel case to kebab case
.replace(/([A-Z0-9])([A-Z])/g, '$1-$2') // Separate consecutive uppercase letters
.replace(/([a-z])([0-9])/g, '$1-$2') // Separate letters from digits
.toLowerCase()
}
export async function loadIcon(name: string): Promise<any> {
let iconComponent: any