kyd-shared-badge 0.3.79 → 0.3.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -164,10 +164,22 @@ export function ConnectAccounts(props: ConnectAccountsProps) {
|
|
|
164
164
|
if (url) router.push(url);
|
|
165
165
|
};
|
|
166
166
|
|
|
167
|
-
const selectedProvider = useMemo(
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
167
|
+
const selectedProvider = useMemo(() => {
|
|
168
|
+
if (!selectedProviderId) return null;
|
|
169
|
+
if (selectedProviderId.toLowerCase() === 'githubapp') {
|
|
170
|
+
// Special virtual provider for github app, not in providers list
|
|
171
|
+
return {
|
|
172
|
+
id: 'githubapp',
|
|
173
|
+
name: 'GitHub App',
|
|
174
|
+
connectionType: 'githubapp',
|
|
175
|
+
iconColor: 'text-gray-900',
|
|
176
|
+
placeholder: 'Install the GitHub App to connect your repositories.',
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
return providers.find(
|
|
180
|
+
(p) => p.id.toLowerCase() === selectedProviderId.toLowerCase()
|
|
181
|
+
) || null;
|
|
182
|
+
}, [selectedProviderId, providers]);
|
|
171
183
|
|
|
172
184
|
const handleConnectBack = () => {
|
|
173
185
|
setSelectedProviderIdAndCallback(null);
|