mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
fix: get flags method
This commit is contained in:
1 parent
ff990d9500
commit
043dc543f9
1 file changed
+1
-5
@@ -1,12 +1,8 @@
|
||||
import { isValueOfStringEnum } from '$lib/helpers/types';
|
||||
import { Flag } from '@appwrite.io/console';
|
||||
import { sdk } from '$lib/stores/sdk';
|
||||
import { page } from '$app/state';
|
||||
|
||||
export function getFlagUrl(countryCode: string) {
|
||||
if (!isValueOfStringEnum(Flag, countryCode)) return '';
|
||||
return sdk
|
||||
.forProject(page.params.region, 'console')
|
||||
.avatars.getFlag(countryCode, 22, 15, 100)
|
||||
?.toString();
|
||||
return sdk.forConsole.avatars.getFlag(countryCode, 22, 15, 100)?.toString();
|
||||
}
|
||||
Reference in new issue
Block a user