mirror of
https://github.com/simstudioai/sim.git
synced 2026-09-24 15:45:35 +08:00
fix(home,integrations): optical-center home input + integrations page render fix (#4916)
* fix(integrations): correct integrationType key so the integrations page renders The merged email-verification blocks (zerobounce, neverbounce, millionverifier) were serialized into integrations.json with a typo'd `integrationTypes: ["sales"]` plural array instead of the singular `integrationType` the catalog reads. They fell into an `undefined` category bucket, and sorting sections by label threw "Cannot read properties of undefined (reading 'localeCompare')", erroring the whole page. - Correct the three entries to `integrationType: "sales"` (matches each block config's IntegrationType.Sales and the generator's output) - Defensively skip any integration without an integrationType when grouping so a single malformed catalog entry can never crash the page again * move home chat to optical center
This commit is contained in:
@@ -309,11 +309,12 @@ export function Home({ chatId, userName, userId, initialResourceId = null }: Hom
|
||||
<div className='absolute top-[8.5px] right-[16px] z-10'>
|
||||
<CreditsChip />
|
||||
</div>
|
||||
<div className='flex min-h-full flex-col items-center px-6 pt-[24vh] pb-[2vh]'>
|
||||
{/* Asymmetric padding biases the group up so the full cluster (heading + input + suggestions) sits at the optical center */}
|
||||
<div className='flex min-h-full flex-col items-center justify-center px-6 pt-[2vh] pb-[22vh]'>
|
||||
<h1 className='mb-7 max-w-[48rem] text-balance font-season text-[30px] text-[var(--text-primary)]'>
|
||||
What should we get done{firstName ? `, ${firstName}` : ''}?
|
||||
</h1>
|
||||
<div ref={initialViewInputRef} className='w-full'>
|
||||
<div ref={initialViewInputRef} className='relative w-full max-w-[48rem]'>
|
||||
<UserInput
|
||||
ref={initialViewUserInputRef}
|
||||
defaultValue={initialPrompt}
|
||||
@@ -325,9 +326,12 @@ export function Home({ chatId, userName, userId, initialResourceId = null }: Hom
|
||||
onContextAdd={handleContextAdd}
|
||||
onContextRemove={handleInitialContextRemove}
|
||||
/>
|
||||
<SuggestedActions
|
||||
onSelectPrompt={(prompt) => initialViewUserInputRef.current?.populatePrompt(prompt)}
|
||||
/>
|
||||
{/* Anchored out of flow so expanding/collapsing never shifts the centered input */}
|
||||
<div className='absolute inset-x-0 top-full'>
|
||||
<SuggestedActions
|
||||
onSelectPrompt={(prompt) => initialViewUserInputRef.current?.populatePrompt(prompt)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -54,6 +54,7 @@ const INTEGRATION_BY_LOWER_NAME: ReadonlyMap<string, Integration> = new Map(
|
||||
const ALL_CATEGORY_SECTIONS: readonly { label: string; integrations: Integration[] }[] = (() => {
|
||||
const grouped = new Map<string, Integration[]>()
|
||||
for (const integration of INTEGRATIONS) {
|
||||
if (!integration.integrationType) continue
|
||||
const bucket = grouped.get(integration.integrationType)
|
||||
if (bucket) bucket.push(integration)
|
||||
else grouped.set(integration.integrationType, [integration])
|
||||
|
||||
@@ -9539,7 +9539,7 @@
|
||||
"triggerCount": 0,
|
||||
"authType": "api-key",
|
||||
"category": "tools",
|
||||
"integrationTypes": ["sales"],
|
||||
"integrationType": "sales",
|
||||
"tags": ["enrichment", "sales-engagement"]
|
||||
},
|
||||
{
|
||||
@@ -9791,7 +9791,7 @@
|
||||
"triggerCount": 0,
|
||||
"authType": "api-key",
|
||||
"category": "tools",
|
||||
"integrationTypes": ["sales"],
|
||||
"integrationType": "sales",
|
||||
"tags": ["enrichment", "sales-engagement"]
|
||||
},
|
||||
{
|
||||
@@ -15180,7 +15180,7 @@
|
||||
"triggerCount": 0,
|
||||
"authType": "api-key",
|
||||
"category": "tools",
|
||||
"integrationTypes": ["sales"],
|
||||
"integrationType": "sales",
|
||||
"tags": ["enrichment", "sales-engagement"]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user