From 915bb5b04fffdd98a4d632507f4dd4be4f979c40 Mon Sep 17 00:00:00 2001 From: Chakravarthi Medicharla Date: Thu, 28 Sep 2023 11:11:28 +0530 Subject: [PATCH] fix: use twitter as twitter providers Id --- lib/build/thirdparty-shared.js | 6 ++++-- lib/ts/recipe/thirdparty/providers/twitter.tsx | 8 ++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/build/thirdparty-shared.js b/lib/build/thirdparty-shared.js index 828d7dc14..3bc317fe4 100644 --- a/lib/build/thirdparty-shared.js +++ b/lib/build/thirdparty-shared.js @@ -1012,14 +1012,16 @@ var Twitter = /** @class */ (function (_super) { */ function Twitter(config) { var _this = this; - var id = "x"; + var id = "twitter"; var name = "X"; var normalisedUseLegacyTwitterLogo = (config === null || config === void 0 ? void 0 : config.useLegacyTwitterLogo) === true; if (normalisedUseLegacyTwitterLogo) { - id = "twitter"; name = "Twitter"; } + if ((config === null || config === void 0 ? void 0 : config.id) !== undefined) { + id = config.id; + } _this = _super.call(this, genericComponentOverrideContext.__assign({ id: id, name: name }, config)) || this; _this.useLegacyTwitterLogo = false; _this.getLogo = function () { diff --git a/lib/ts/recipe/thirdparty/providers/twitter.tsx b/lib/ts/recipe/thirdparty/providers/twitter.tsx index aaeacbc00..1c451a560 100644 --- a/lib/ts/recipe/thirdparty/providers/twitter.tsx +++ b/lib/ts/recipe/thirdparty/providers/twitter.tsx @@ -39,15 +39,19 @@ export default class Twitter extends Provider { * Constructor. */ constructor(config?: TwitterProviderConfig) { - let id = "x"; + let id = "twitter"; let name = "X"; + const normalisedUseLegacyTwitterLogo = config?.useLegacyTwitterLogo === true; if (normalisedUseLegacyTwitterLogo) { - id = "twitter"; name = "Twitter"; } + if (config?.id !== undefined) { + id = config.id; + } + super({ id, name,