11"use client" ;
2+
23import type React from "react" ;
34import { type Dispatch , type SetStateAction , useMemo } from "react" ;
45import { CodeClient } from "@/components/ui/code/code.client" ;
56import { TabButtons } from "@/components/ui/tabs" ;
67import { cn } from "@/lib/utils" ;
78
89export type CodeEnvironment =
10+ | "api"
911 | "javascript"
1012 | "typescript"
1113 | "react"
1214 | "react-native"
13- | "unity" ;
15+ | "dotnet"
16+ | "unity"
17+ | "curl" ;
1418
1519type SupportedEnvironment = {
1620 environment : CodeEnvironment ;
@@ -20,6 +24,10 @@ type SupportedEnvironment = {
2024type CodeSnippet = Partial < Record < CodeEnvironment , string > > ;
2125
2226const Environments : SupportedEnvironment [ ] = [
27+ {
28+ environment : "api" ,
29+ title : "API" ,
30+ } ,
2331 {
2432 environment : "javascript" ,
2533 title : "JavaScript" ,
@@ -36,10 +44,18 @@ const Environments: SupportedEnvironment[] = [
3644 environment : "react-native" ,
3745 title : "React Native" ,
3846 } ,
47+ {
48+ environment : "dotnet" ,
49+ title : ".NET" ,
50+ } ,
3951 {
4052 environment : "unity" ,
4153 title : "Unity" ,
4254 } ,
55+ {
56+ environment : "curl" ,
57+ title : "cURL" ,
58+ } ,
4359] ;
4460
4561interface CodeSegmentProps {
@@ -122,9 +138,14 @@ export const CodeSegment: React.FC<CodeSegmentProps> = ({
122138 : activeEnvironment === "react" ||
123139 activeEnvironment === "react-native"
124140 ? "tsx"
125- : activeEnvironment === "unity"
141+ : activeEnvironment === "unity" ||
142+ activeEnvironment === "dotnet"
126143 ? "cpp"
127- : activeEnvironment
144+ : activeEnvironment === "api"
145+ ? "javascript"
146+ : activeEnvironment === "curl"
147+ ? "bash"
148+ : activeEnvironment
128149 }
129150 />
130151 ) }
0 commit comments