improv: explore hub card

This commit is contained in:
tomasz-io 2025-03-10 15:29:51 -07:00
parent be662c2284
commit 2d389b9e12

View file

@ -1,5 +1,7 @@
import { ChevronRightIcon } from "@heroicons/react/24/outline";
import { useContext } from "react";
import { Button, ButtonSubtext } from "..";
import { IdeMessengerContext } from "../../context/IdeMessenger";
import { useAppDispatch, useAppSelector } from "../../redux/hooks";
import { setIsExploreDialogOpen } from "../../redux/slices/uiSlice";
import { setLocalStorage } from "../../util/localStorage";
@ -8,6 +10,7 @@ import { ReusableCard } from "../ReusableCard";
export function ExploreHubCard() {
const dispatch = useAppDispatch();
const isOpen = useAppSelector((state) => state.ui.isExploreDialogOpen);
const ideMessenger = useContext(IdeMessengerContext);
if (!isOpen) return null;
@ -28,14 +31,24 @@ export function ExploreHubCard() {
<Button
className="w-full"
// href="https://hub.continue.dev/explore/trending-assistants"
// target="_blank"
// rel="noopener noreferrer"
onClick={() => {
ideMessenger.request("controlPlane/openUrl", {
path: "/explore/assistants",
orgSlug: undefined,
});
}}
>
Explore Assistants
</Button>
<ButtonSubtext onClick={() => console.log("button subtext")}>
<ButtonSubtext
onClick={() => {
ideMessenger.request("controlPlane/openUrl", {
path: "/new?type=assistant",
orgSlug: undefined,
});
}}
>
<div className="mt-4 flex cursor-pointer items-center justify-center gap-1">
<span>Or, create your own assistant from scratch</span>
<ChevronRightIcon className="h-3 w-3" />