feat(webapp): add nango clone snippet to template funcitons#5311
feat(webapp): add nango clone snippet to template funcitons#5311
nango clone snippet to template funcitons#5311Conversation
🤖 My Senior Dev — Analysis Complete👤 For @kaposke📁 Expert in View your contributor analytics → 📊 5 files reviewed • 1 high risk • 1 need attention 🚨 High Risk:
🚀 Open Interactive Review →The full interface unlocks features not available in GitHub:
💬 Chat here: 📖 View all 12 personas & slash commandsYou can interact with me by mentioning In PR comments or on any line of code:
Slash commands:
AI Personas (mention to get their perspective):
For the best experience, view this PR on myseniordev.com — includes AI chat, file annotations, and interactive reviews. |
| const func = data?.flows.find((flow) => flow.name === functionName); | ||
|
|
||
| const gitDir = func ? `${integrationData?.integration.provider}/${func.type === 'action' ? 'actions' : 'syncs'}/${func.name}` : ''; | ||
| const gitUrl = `https://github.com/NangoHQ/integration-templates/tree/main/integrations/${gitDir}.ts`; |
There was a problem hiding this comment.
nango/packages/webapp/src/utils/utils.ts
Line 20 in dd3f8a7
| }, [data, functionName]); | ||
| const func = data?.flows.find((flow) => flow.name === functionName); | ||
|
|
||
| const gitDir = func ? `${integrationData?.integration.provider}/${func.type === 'action' ? 'actions' : 'syncs'}/${func.name}` : ''; |
There was a problem hiding this comment.
can func be undefined/empty?
There was a problem hiding this comment.
moved to after guard clause
| <span className="text-text-primary text-body-medium-semi">Customize this template</span> | ||
| <Link | ||
| to="https://nango.dev/docs/reference/cli" | ||
| type="external" |
There was a problem hiding this comment.
does Link have a type prop?
There was a problem hiding this comment.
Whoops, that's from our StyledLink component, which I've replaced here. So no, should have been target="_blank". Good catch!
Adds
nango clonesnippet and link to view code in repo for template functions.Also, did a few updated in the header as requested by Gabrielle.
It also introduces a reusable LineSnippet component and restructures the function detail card layout with an optional subheader to present guidance content more cleanly.
Key Changes
• Added new
LineSnippetcomponent with inline copy support for displaying command snippets• Exposed
INTEGRATION_TEMPLATES_GITHUB_URLinpackages/webapp/src/constants.tsfor constructing repository links• Refactored
packages/webapp/src/pages/Integrations/providerConfigKey/Functions/One.tsxto render the CLI snippet, external doc links, and adjusted typography/layout for pre-built templates• Introduced
CardSubheaderinpackages/webapp/src/pages/Integrations/components/CardLayout.tsxto separate supplementary guidance from primary headers• Simplified
packages/webapp/src/pages/Integrations/components/FunctionSwitch.tsxswitch markup while preserving existing behaviorAffected Areas
•
packages/webapp/src/pages/Integrations/providerConfigKey/Functions/One.tsx•
packages/webapp/src/pages/Integrations/components/CardLayout.tsx•
packages/webapp/src/components-v2/LineSnippet.tsx•
packages/webapp/src/pages/Integrations/components/FunctionSwitch.tsx•
packages/webapp/src/constants.tsThis summary was automatically generated by @propel-code-bot