Skip to content

Commit

Permalink
chore(docs): add SponsorItem component and update sponsors list
Browse files Browse the repository at this point in the history
  • Loading branch information
jrgarciadev committed Jan 5, 2024
1 parent 921746f commit 22f2665
Show file tree
Hide file tree
Showing 12 changed files with 75 additions and 114 deletions.
9 changes: 0 additions & 9 deletions apps/docs/components/docs/components/code-demo/code-demo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {useCodeDemo, UseCodeDemoProps} from "./use-code-demo";
import WindowResizer, {WindowResizerProps} from "./window-resizer";

import {GradientBoxProps} from "@/components/gradient-box";
import {trackEvent} from "@/utils/va";

const DynamicReactLiveDemo = dynamic(
() => import("./react-live-demo").then((m) => m.ReactLiveDemo),
Expand Down Expand Up @@ -180,14 +179,6 @@ export const CodeDemo: React.FC<CodeDemoProps> = ({
panel: "pt-0",
}}
variant="underlined"
onSelectionChange={(tabKey) => {
trackEvent("CodeDemo - Selection", {
name: tabKey as string,
action: "tabChange",
category: "docs",
data: tabKey ?? "",
});
}}
>
<Tab key="preview" title="Preview">
{previewContent}
Expand Down
18 changes: 0 additions & 18 deletions apps/docs/components/docs/components/import-tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import {Tabs, Tab, Snippet} from "@nextui-org/react";

import Codeblock from "./codeblock";

import {trackEvent} from "@/utils/va";

type PackageManager = {
key: string;
name: string;
Expand Down Expand Up @@ -34,14 +32,6 @@ export const ImportTabs = ({commands}: ImportTabsProps) => {
tabList: "relative h-10",
}}
variant="underlined"
onSelectionChange={(tabKey) => {
trackEvent("ImportTabs - Selection", {
name: tabKey as string,
action: "tabChange",
category: "docs",
data: commands[tabKey] ?? "",
});
}}
>
{importTabs.map(({key, name}) => {
if (!commands[key]) return null;
Expand All @@ -57,14 +47,6 @@ export const ImportTabs = ({commands}: ImportTabsProps) => {
pre: "font-light text-base",
copyButton: "text-lg text-default-400",
}}
onCopy={() => {
trackEvent("ImportTabs - Copy", {
name,
action: "copyInstallScript",
category: "docs",
data: commands[name] ?? "",
});
}}
>
<Codeblock
hideScrollBar
Expand Down
16 changes: 0 additions & 16 deletions apps/docs/components/docs/components/package-managers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {useLocalStorage} from "usehooks-ts";
import Codeblock from "./codeblock";

import {YarnIcon, NpmSmallIcon, PnpmIcon} from "@/components/icons";
import {trackEvent} from "@/utils/va";

type PackageManagerName = "npm" | "yarn" | "pnpm";

Expand Down Expand Up @@ -40,13 +39,6 @@ export const PackageManagers = ({commands}: PackageManagersProps) => {
);

const handleSelectionChange = (tabKey: Key) => {
trackEvent("PackageManagers - Selection", {
name: `${tabKey}`,
action: "tabChange",
category: "docs",
data: commands[tabKey as unknown as PackageManagerName] ?? "",
});

setSelectedManager(tabKey as PackageManagerName);
};

Expand Down Expand Up @@ -83,14 +75,6 @@ export const PackageManagers = ({commands}: PackageManagersProps) => {
pre: "font-light text-base",
copyButton: "text-lg text-zinc-500 mr-2",
}}
onCopy={() => {
trackEvent("PackageManagers - Copy", {
name,
action: "copyScript",
category: "docs",
data: commands[name] ?? "",
});
}}
>
<Codeblock removeIndent codeString={commands[name] as string} language="bash" />
</Snippet>
Expand Down
37 changes: 37 additions & 0 deletions apps/docs/components/icons/sponsors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,40 @@ export const RelumeLogo = ({width = 152, height = 56, ...props}: IconSvgProps) =
</defs>
</svg>
);

export const Story2DesignLogo = ({width = 175, height = 26, ...props}: IconSvgProps) => (
<svg
fill="none"
height={height}
viewBox="0 0 202 28"
width={width}
xmlns="http://www.w3.org/2000/svg"
{...props}
>
<path
d="M6.76074 21.0521C5.48049 21.0521 4.34056 20.8352 3.34092 20.4015C2.34127 19.9677 1.55208 19.3779 0.973342 18.632C0.394602 17.8686 0.0701512 17.0186 0 16.0818H4.44578C4.4984 16.5848 4.73515 16.9926 5.15606 17.3049C5.57696 17.6171 6.09431 17.7733 6.70813 17.7733C7.26933 17.7733 7.699 17.6692 7.99714 17.461C8.31282 17.2354 8.47066 16.9491 8.47066 16.6023C8.47066 16.1859 8.25143 15.8822 7.813 15.6915C7.37455 15.4833 6.66428 15.2577 5.68218 15.0149C4.62993 14.772 3.75304 14.5205 3.05155 14.2603C2.35003 13.9826 1.74499 13.5577 1.23641 12.9852C0.727812 12.3952 0.473521 11.6059 0.473521 10.6171C0.473521 9.78436 0.701505 9.02972 1.15749 8.35314C1.631 7.65922 2.31497 7.11275 3.20938 6.71374C4.12133 6.31474 5.19989 6.11523 6.44507 6.11523C8.28651 6.11523 9.73336 6.56628 10.7856 7.46838C11.8554 8.37049 12.4692 9.56752 12.627 11.0595H8.47066C8.4005 10.5564 8.17251 10.1574 7.78669 9.86243C7.4184 9.56752 6.92734 9.42005 6.31354 9.42005C5.78741 9.42005 5.38404 9.52414 5.10344 9.73232C4.82283 9.92315 4.68254 10.1921 4.68254 10.539C4.68254 10.9554 4.90175 11.2676 5.3402 11.4758C5.79617 11.684 6.49768 11.8922 7.44471 12.1003C8.53203 12.3779 9.41769 12.6555 10.1017 12.9331C10.7856 13.1933 11.3819 13.627 11.8905 14.2342C12.4166 14.824 12.6884 15.622 12.7059 16.6283C12.7059 17.4783 12.4605 18.2417 11.9694 18.9182C11.4959 19.5774 10.8032 20.0978 9.8912 20.4796C8.99679 20.8612 7.95329 21.0521 6.76074 21.0521ZM23.6394 17.0707V20.8439H21.3507C19.7197 20.8439 18.4482 20.4535 17.5363 19.6729C16.6243 18.8748 16.1684 17.5824 16.1684 15.7956V10.0186H14.3795V6.3234H16.1684V2.78438H20.6668V6.3234H23.6131V10.0186H20.6668V15.8476C20.6668 16.2813 20.772 16.5935 20.9824 16.7844C21.1929 16.9752 21.5436 17.0707 22.0347 17.0707H23.6394ZM32.8269 21.0521C31.3887 21.0521 30.091 20.7484 28.9335 20.1413C27.7936 19.5341 26.8903 18.6666 26.224 17.5391C25.575 16.4114 25.2507 15.093 25.2507 13.5837C25.2507 12.0917 25.5838 10.7819 26.2503 9.65425C26.9166 8.50927 27.8287 7.63319 28.9862 7.026C30.1436 6.41883 31.4413 6.11523 32.8795 6.11523C34.3175 6.11523 35.6154 6.41883 36.7728 7.026C37.9303 7.63319 38.8422 8.50927 39.5087 9.65425C40.175 10.7819 40.5083 12.0917 40.5083 13.5837C40.5083 15.0755 40.1664 16.3941 39.4824 17.5391C38.8159 18.6666 37.8952 19.5341 36.7202 20.1413C35.5628 20.7484 34.2649 21.0521 32.8269 21.0521ZM32.8269 17.2008C33.6862 17.2008 34.4139 16.8885 35.0103 16.264C35.624 15.6394 35.931 14.746 35.931 13.5837C35.931 12.4213 35.6329 11.5279 35.0366 10.9033C34.4579 10.2788 33.7388 9.96652 32.8795 9.96652C32.0026 9.96652 31.2748 10.2788 30.6961 10.9033C30.1173 11.5105 29.828 12.404 29.828 13.5837C29.828 14.746 30.1085 15.6394 30.6698 16.264C31.2485 16.8885 31.9675 17.2008 32.8269 17.2008ZM47.3933 8.74347C47.9194 7.94546 48.577 7.32093 49.3662 6.86987C50.1554 6.40147 51.0322 6.16727 51.9969 6.16727V10.8773H50.7605C49.638 10.8773 48.7962 11.1202 48.2351 11.6059C47.6738 12.0743 47.3933 12.9071 47.3933 14.1041V20.8439H42.8949V6.3234H47.3933V8.74347ZM69.1415 6.3234L59.9343 27.7398H55.0939L58.4611 20.3495L52.4896 6.3234H57.5141L60.9076 15.4052L64.2748 6.3234H69.1415ZM72.8728 21.0521C72.0836 21.0521 71.4346 20.8264 70.9261 20.3755C70.435 19.9071 70.1896 19.3346 70.1896 18.658C70.1896 17.964 70.435 17.3829 70.9261 16.9145C71.4346 16.4461 72.0836 16.2119 72.8728 16.2119C73.6444 16.2119 74.2757 16.4461 74.7669 16.9145C75.2754 17.3829 75.5298 17.964 75.5298 18.658C75.5298 19.3346 75.2754 19.9071 74.7669 20.3755C74.2757 20.8264 73.6444 21.0521 72.8728 21.0521ZM86.3739 17.0707V20.8439H84.0852C82.4543 20.8439 81.1827 20.4535 80.2708 19.6729C79.3589 18.8748 78.9029 17.5824 78.9029 15.7956V10.0186H77.1141V6.3234H78.9029V2.78438H83.4013V6.3234H86.3476V10.0186H83.4013V15.8476C83.4013 16.2813 83.5065 16.5935 83.717 16.7844C83.9274 16.9752 84.2782 17.0707 84.7692 17.0707H86.3739ZM95.5614 21.0521C94.1234 21.0521 92.8255 20.7484 91.6681 20.1413C90.5281 19.5341 89.625 18.6666 88.9585 17.5391C88.3097 16.4114 87.9852 15.093 87.9852 13.5837C87.9852 12.0917 88.3183 10.7819 88.9848 9.65425C89.6513 8.50927 90.5632 7.63319 91.7207 7.026C92.8782 6.41883 94.176 6.11523 95.614 6.11523C97.0521 6.11523 98.3499 6.41883 99.5074 7.026C100.665 7.63319 101.577 8.50927 102.243 9.65425C102.91 10.7819 103.243 12.0917 103.243 13.5837C103.243 15.0755 102.901 16.3941 102.217 17.5391C101.55 18.6666 100.63 19.5341 99.4547 20.1413C98.2973 20.7484 96.9994 21.0521 95.5614 21.0521ZM95.5614 17.2008C96.4207 17.2008 97.1486 16.8885 97.7448 16.264C98.3587 15.6394 98.6656 14.746 98.6656 13.5837C98.6656 12.4213 98.3674 11.5279 97.7711 10.9033C97.1924 10.2788 96.4733 9.96652 95.614 9.96652C94.7371 9.96652 94.0093 10.2788 93.4306 10.9033C92.8518 11.5105 92.5625 12.404 92.5625 13.5837C92.5625 14.746 92.843 15.6394 93.4043 16.264C93.983 16.8885 94.7021 17.2008 95.5614 17.2008ZM107.734 21.0521C106.945 21.0521 106.296 20.8264 105.787 20.3755C105.296 19.9071 105.051 19.3346 105.051 18.658C105.051 17.964 105.296 17.3829 105.787 16.9145C106.296 16.4461 106.945 16.2119 107.734 16.2119C108.505 16.2119 109.137 16.4461 109.628 16.9145C110.136 17.3829 110.391 17.964 110.391 18.658C110.391 19.3346 110.136 19.9071 109.628 20.3755C109.137 20.8264 108.505 21.0521 107.734 21.0521ZM112.159 13.5577C112.159 12.0657 112.44 10.7559 113.001 9.62823C113.58 8.50061 114.36 7.63319 115.342 7.026C116.324 6.41883 117.421 6.11523 118.631 6.11523C119.595 6.11523 120.472 6.31474 121.261 6.71374C122.068 7.11275 122.699 7.65054 123.155 8.32712V1.58735H127.654V20.8439H123.155V18.7621C122.734 19.456 122.129 20.0112 121.34 20.4275C120.568 20.8439 119.665 21.0521 118.631 21.0521C117.421 21.0521 116.324 20.7484 115.342 20.1413C114.36 19.5167 113.58 18.6406 113.001 17.513C112.44 16.3681 112.159 15.0495 112.159 13.5577ZM123.155 13.5837C123.155 12.4733 122.84 11.5973 122.208 10.9554C121.594 10.3135 120.84 9.99254 119.946 9.99254C119.052 9.99254 118.289 10.3135 117.657 10.9554C117.043 11.5799 116.737 12.4473 116.737 13.5577C116.737 14.6679 117.043 15.5526 117.657 16.2119C118.289 16.8538 119.052 17.1747 119.946 17.1747C120.84 17.1747 121.594 16.8538 122.208 16.2119C122.84 15.57 123.155 14.6939 123.155 13.5837ZM144.746 13.3495C144.746 13.7658 144.719 14.1995 144.667 14.6506H134.486C134.556 15.5526 134.845 16.2465 135.354 16.7324C135.88 17.2008 136.52 17.435 137.274 17.435C138.396 17.435 139.176 16.9666 139.616 16.0298H144.404C144.158 16.9839 143.71 17.8426 143.062 18.606C142.431 19.3692 141.632 19.9677 140.668 20.4015C139.703 20.8352 138.624 21.0521 137.432 21.0521C135.993 21.0521 134.714 20.7484 133.592 20.1413C132.468 19.5341 131.592 18.6666 130.961 17.5391C130.329 16.4114 130.014 15.093 130.014 13.5837C130.014 12.0743 130.321 10.7559 130.935 9.62823C131.566 8.50061 132.442 7.63319 133.565 7.026C134.687 6.41883 135.976 6.11523 137.432 6.11523C138.853 6.11523 140.116 6.41015 141.22 6.99998C142.325 7.58983 143.184 8.4312 143.798 9.52414C144.43 10.6171 144.746 11.8922 144.746 13.3495ZM140.142 12.1784C140.142 11.4151 139.879 10.8079 139.353 10.3569C138.827 9.90581 138.169 9.68027 137.38 9.68027C136.625 9.68027 135.985 9.89713 135.459 10.3308C134.95 10.7645 134.635 11.3804 134.512 12.1784H140.142ZM153.09 21.0521C151.81 21.0521 150.67 20.8352 149.67 20.4015C148.67 19.9677 147.881 19.3779 147.302 18.632C146.724 17.8686 146.399 17.0186 146.329 16.0818H150.775C150.828 16.5848 151.064 16.9926 151.485 17.3049C151.906 17.6171 152.423 17.7733 153.037 17.7733C153.599 17.7733 154.028 17.6692 154.326 17.461C154.642 17.2354 154.8 16.9491 154.8 16.6023C154.8 16.1859 154.58 15.8822 154.142 15.6915C153.704 15.4833 152.994 15.2577 152.011 15.0149C150.959 14.772 150.082 14.5205 149.381 14.2603C148.68 13.9826 148.075 13.5577 147.566 12.9852C147.057 12.3952 146.803 11.6059 146.803 10.6171C146.803 9.78436 147.03 9.02972 147.487 8.35314C147.96 7.65922 148.644 7.11275 149.539 6.71374C150.45 6.31474 151.529 6.11523 152.774 6.11523C154.616 6.11523 156.063 6.56628 157.115 7.46838C158.184 8.37049 158.798 9.56752 158.956 11.0595H154.8C154.73 10.5564 154.501 10.1574 154.116 9.86243C153.748 9.56752 153.257 9.42005 152.643 9.42005C152.117 9.42005 151.713 9.52414 151.433 9.73232C151.152 9.92315 151.012 10.1921 151.012 10.539C151.012 10.9554 151.231 11.2676 151.669 11.4758C152.126 11.684 152.827 11.8922 153.774 12.1003C154.862 12.3779 155.747 12.6555 156.431 12.9331C157.115 13.1933 157.711 13.627 158.22 14.2342C158.746 14.824 159.018 15.622 159.035 16.6283C159.035 17.4783 158.789 18.2417 158.299 18.9182C157.825 19.5774 157.132 20.0978 156.22 20.4796C155.326 20.8612 154.283 21.0521 153.09 21.0521ZM164.049 4.81411C163.26 4.81411 162.611 4.58859 162.102 4.13753C161.612 3.66913 161.366 3.09664 161.366 2.42007C161.366 1.72614 161.612 1.15365 162.102 0.702598C162.611 0.2342 163.26 0 164.049 0C164.821 0 165.453 0.2342 165.943 0.702598C166.452 1.15365 166.706 1.72614 166.706 2.42007C166.706 3.09664 166.452 3.66913 165.943 4.13753C165.453 4.58859 164.821 4.81411 164.049 4.81411ZM166.285 6.3234V20.8439H161.787V6.3234H166.285ZM175.123 6.11523C176.157 6.11523 177.06 6.3234 177.832 6.73976C178.622 7.15611 179.227 7.70258 179.647 8.37916V6.3234H184.146V20.8179C184.146 22.1536 183.874 23.3593 183.33 24.4349C182.804 25.5279 181.989 26.3952 180.884 27.0372C179.796 27.679 178.437 28 176.806 28C174.631 28 172.868 27.4881 171.519 26.4647C170.168 25.4584 169.396 24.0879 169.204 22.3532H173.65C173.789 22.9082 174.123 23.342 174.649 23.6543C175.175 23.9839 175.824 24.1487 176.596 24.1487C177.525 24.1487 178.261 23.8798 178.806 23.342C179.366 22.8216 179.647 21.9801 179.647 20.8179V18.7621C179.208 19.4387 178.603 19.9937 177.832 20.4275C177.06 20.8439 176.157 21.0521 175.123 21.0521C173.913 21.0521 172.816 20.7484 171.834 20.1413C170.852 19.5167 170.072 18.6406 169.493 17.513C168.932 16.3681 168.651 15.0495 168.651 13.5577C168.651 12.0657 168.932 10.7559 169.493 9.62823C170.072 8.50061 170.852 7.63319 171.834 7.026C172.816 6.41883 173.913 6.11523 175.123 6.11523ZM179.647 13.5837C179.647 12.4733 179.332 11.5973 178.7 10.9554C178.086 10.3135 177.333 9.99254 176.438 9.99254C175.544 9.99254 174.781 10.3135 174.149 10.9554C173.535 11.5799 173.229 12.4473 173.229 13.5577C173.229 14.6679 173.535 15.5526 174.149 16.2119C174.781 16.8538 175.544 17.1747 176.438 17.1747C177.333 17.1747 178.086 16.8538 178.7 16.2119C179.332 15.57 179.647 14.6939 179.647 13.5837ZM196.344 6.16727C198.063 6.16727 199.431 6.72241 200.448 7.83269C201.483 8.92563 202 10.4349 202 12.3606V20.8439H197.528V12.9591C197.528 11.9876 197.274 11.2329 196.765 10.6951C196.256 10.1574 195.572 9.88845 194.713 9.88845C193.854 9.88845 193.17 10.1574 192.661 10.6951C192.152 11.2329 191.898 11.9876 191.898 12.9591V20.8439H187.4V6.3234H191.898V8.24905C192.355 7.60717 192.968 7.10407 193.74 6.73976C194.512 6.3581 195.38 6.16727 196.344 6.16727Z"
fill="url(#paint0_linear_590_69155)"
/>
<defs>
<linearGradient
gradientUnits="userSpaceOnUse"
id="paint0_linear_590_69155"
x1="-0.841804"
x2="203.955"
y1="11.736"
y2="11.736"
>
<stop stopColor="#FF4785" />
<stop offset="0.11" stopColor="#FF42B4" />
<stop offset="0.22" stopColor="#FF3DDF" />
<stop offset="0.33" stopColor="#EA39FE" />
<stop offset="0.44" stopColor="#B734FE" />
<stop offset="0.56" stopColor="#822FFE" />
<stop offset="0.67" stopColor="#4A2AFE" />
<stop offset="0.78" stopColor="#253BFE" />
<stop offset="0.89" stopColor="#2171FD" />
<stop offset="1" stopColor="#1CA6FD" />
</linearGradient>
</defs>
</svg>
);
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {PaletteIcon, MagicIcon, GamingConsoleIcon, StarIcon} from "@/components/
import {NextUILogo, CodeWindow} from "@/components";
import landingContent from "@/content/landing";
import {useIsMobile} from "@/hooks/use-media-query";
import {trackEvent} from "@/utils/va";

const themesTabs = (isMobile: boolean) => [
{
Expand Down Expand Up @@ -88,12 +87,6 @@ const CustomThemesExample = ({

const onSelectionChange = (value: React.Key) => {
onChangeTheme(value as Theme);

trackEvent("CustomThemes - Selection", {
action: "change_theme",
category: "landing-page",
data: value,
});
};

return (
Expand Down
30 changes: 30 additions & 0 deletions apps/docs/components/marketing/sponsor-item.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
"use client";

import {Link} from "@nextui-org/react";

import {trackEvent} from "@/utils/va";

export type Sponsor = {
name: string;
href: string;
logo: React.ReactNode;
};

export const SponsorItem = ({name, href, logo}: Sponsor) => {
return (
<Link
isExternal
className="flex flex-col items-center justify-center"
href={href}
onClick={() => {
trackEvent("Hero - Sponsors", {
name,
action: "click",
category: "hero",
});
}}
>
{logo}
</Link>
);
};
22 changes: 7 additions & 15 deletions apps/docs/components/marketing/sponsors.tsx
Original file line number Diff line number Diff line change
@@ -1,38 +1,30 @@
import {Button, Link} from "@nextui-org/react";

import {sectionWrapper} from "@/components/primitives";
import {RelumeLogo} from "@/components/icons/sponsors";
import {RelumeLogo, Story2DesignLogo} from "@/components/icons/sponsors";
import {HeartFilledIcon} from "@/components/icons";
import {VercelIcon} from "@/components/icons/social";
import {siteConfig} from "@/config/site";

type Sponsor = {
name: string;
href: string;
logo: React.ReactNode;
};
import {Sponsor, SponsorItem} from "@/components/marketing/sponsor-item";

const sponsors: Sponsor[] = [
{
name: "Relume",
href: "https://library.relume.io/ai-site-builder?via=nextui",
logo: <RelumeLogo className="text-black dark:text-white" />,
},
{
name: "story.to.design",
href: "https://story.to.design?utm_source=nextui&utm_marketing=partnership",
logo: <Story2DesignLogo className="pt-1" />,
},
{
name: "Vercel",
href: "https://www.vercel.com?utm_source=nextui&utm_marketing=oss",
logo: <VercelIcon className="text-black dark:text-white" height={24} />,
},
];

const SponsorItem = ({href, logo}: Sponsor) => {
return (
<Link isExternal className="flex flex-col items-center justify-center" href={href}>
{logo}
</Link>
);
};

export const Sponsors = () => {
return (
<section className={sectionWrapper({class: "text-center mt-24 lg:mt-32"})}>
Expand Down
8 changes: 0 additions & 8 deletions apps/docs/components/sandpack/bugreport-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,13 @@ import {capitalize, last} from "lodash";

import {BugIcon} from "@/components/icons";
import {ISSUE_REPORT_URL} from "@/libs/github/constants";
import {trackEvent} from "@/utils/va";

export const BugReportButton = () => {
const pathname = usePathname();

const componentTitle = capitalize(last(pathname?.split("/")));

const handlePress = () => {
trackEvent("BugReportButton - Sandpack", {
name: "sandpack - bug report",
action: "press",
category: "docs",
data: `${ISSUE_REPORT_URL}${componentTitle}`,
});

window.open(`${ISSUE_REPORT_URL}${componentTitle}`, "_blank");
};

Expand Down
8 changes: 0 additions & 8 deletions apps/docs/components/sandpack/code-viewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {Language} from "prism-react-renderer";
import {HighlightedLines} from "./types";
import {Decorators} from "./types";

import {trackEvent} from "@/utils/va";
import {Codeblock} from "@/components/docs/components";

export interface CodeViewerProps {
Expand Down Expand Up @@ -84,13 +83,6 @@ export const SandpackCodeViewer = React.forwardRef<any, CodeViewerProps>(
const handleExpand = () => {
const nextIsExpanded = !isExpanded;

trackEvent("CodeViewer - Expand", {
name: activeFile,
action: "expand",
category: "docs",
data: nextIsExpanded ? "expanded" : "collapsed",
});

setIsExpanded(nextIsExpanded);
if (containerRef && containerRef?.current !== null) {
const container = containerRef?.current;
Expand Down
Loading

0 comments on commit 22f2665

Please sign in to comment.