From 42ed0b23091ae958788253017848de53000fd9e0 Mon Sep 17 00:00:00 2001 From: Glen Date: Sun, 10 Nov 2024 14:53:49 +0530 Subject: [PATCH] fix --- scripts/__mocks__/@dicebear/core.ts | 2 +- src/components/Avatar/Avatar.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/__mocks__/@dicebear/core.ts b/scripts/__mocks__/@dicebear/core.ts index 41811e2f8d..71a02f19ea 100644 --- a/scripts/__mocks__/@dicebear/core.ts +++ b/scripts/__mocks__/@dicebear/core.ts @@ -1,5 +1,5 @@ export const createAvatar = jest.fn(() => { return { - toDataUri: jest.fn(() => 'mocked-data-uri'), + toDataUriSync: jest.fn(() => 'mocked-data-uri'), }; }); diff --git a/src/components/Avatar/Avatar.tsx b/src/components/Avatar/Avatar.tsx index 3e2f818e3f..431c4a875a 100644 --- a/src/components/Avatar/Avatar.tsx +++ b/src/components/Avatar/Avatar.tsx @@ -41,7 +41,7 @@ const Avatar = ({ size: size || 128, seed: name, radius: radius || 0, - }).toDataUri(); + }).toDataUriSync(); }, [name, size]); const svg = avatar?.toString();