Skip to content

Commit

Permalink
fix: updated keys, changed codesnippet, fixed feature cards
Browse files Browse the repository at this point in the history
  • Loading branch information
isaaclindenman committed Jan 15, 2024
1 parent 164edde commit 2879ef2
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions frontend/src/components/static-site/marketing-code-snippet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,23 @@ const docsKotlin =
const snippetKotlin = `import ai.basemind.client.BaseMindClient
val client = BaseMindClient.getInstance("<API_KEY")
val response = client.requestPrompt(templateVariables)
`;

const docsSwift =
'https://github.com/basemind-ai/sdk-ios?tab=readme-ov-file#basemindai-swift-iosmacos-sdk';
const snippetSwift = `import BaseMindClient
let client = BaseMindClient(apiKey: "<MyApiKey>")`;
let client = BaseMindClient(apiKey: "<MyApiKey>")
let response = try client.requestPrompt(templateVariables)
`;

const docsFlutter = 'https://pub.dev/packages/basemind';
const snippetDart = `import 'package:basemind/client.dart';
final client = BaseMindClient('<API_KEY>');`;
final client = BaseMindClient('<API_KEY>');
final response = await client.requestPrompt(templateVariables);
`;

const languageSnippetMap: Record<supportedLanguages, string | null> = {
dart: snippetDart,
Expand All @@ -38,13 +43,13 @@ const languageSnippetMap: Record<supportedLanguages, string | null> = {
};

const tabs: FrameworkTab[] = [
{ docs: docsSwift, framework: 'iOS', isActive: true, language: 'swift' },
{
docs: docsKotlin,
framework: 'Android',
isActive: true,
language: 'kotlin',
},
{ docs: docsSwift, framework: 'iOS', isActive: true, language: 'swift' },
{
docs: docsFlutter,
framework: 'Flutter',
Expand All @@ -54,7 +59,7 @@ const tabs: FrameworkTab[] = [
];

export function MarketingCodeSnippet() {
const [selectedFramework, setSelectedFramework] = useState('Android');
const [selectedFramework, setSelectedFramework] = useState('iOS');

return (
<Fragment>
Expand Down

0 comments on commit 2879ef2

Please sign in to comment.