diff --git a/examples/nextjs-shadcn/src/app/actions.tsx b/examples/nextjs-shadcn/src/app/actions.tsx index ddb8962..6b7f937 100644 --- a/examples/nextjs-shadcn/src/app/actions.tsx +++ b/examples/nextjs-shadcn/src/app/actions.tsx @@ -2,20 +2,20 @@ import { Embed, ModManifest, handleOpenFile } from "@mod-protocol/core"; import { actionMods, actionModsExperimental } from "@mod-protocol/mod-registry"; import { ActionMod } from "@mod-protocol/react"; import { ModsSearch } from "@mod-protocol/react-ui-shadcn/dist/components/creation-mods-search"; +import { Button } from "@mod-protocol/react-ui-shadcn/dist/components/ui/button"; import { Popover, PopoverContent, PopoverTrigger, } from "@mod-protocol/react-ui-shadcn/dist/components/ui/popover"; import { renderers } from "@mod-protocol/react-ui-shadcn/dist/renderers"; +import { KebabHorizontalIcon } from "@primer/octicons-react"; import React, { useMemo } from "react"; import { getAddress } from "viem"; import { useAccount } from "wagmi"; import { API_URL } from "./constants"; import { useExperimentalMods } from "./use-experimental-mods"; import { sendEthTransaction } from "./utils"; -import { KebabHorizontalIcon } from "@primer/octicons-react"; -import { Button } from "@mod-protocol/react-ui-shadcn/dist/components/ui/button"; export function Actions({ author, @@ -62,7 +62,6 @@ export function Actions({ mods={experimentalMods ? actionModsExperimental : actionMods} onSelect={setCurrentMod} > - {/* TODO: Find a better way to do this */} @@ -79,9 +78,6 @@ export function Actions({ renderers={renderers} onOpenFileAction={handleOpenFile} onExitAction={() => setCurrentMod(null)} - // onSetInputAction={handleSetInput(setText)} - // onAddEmbedAction={handleAddEmbed(addEmbed)} - // onEthPersonalSignAction={getAuthSig} onSendEthTransactionAction={onSendEthTransactionAction} author={author} post={post} diff --git a/examples/nextjs-shadcn/src/app/cast.tsx b/examples/nextjs-shadcn/src/app/cast.tsx index 7433bf8..2f6a5aa 100644 --- a/examples/nextjs-shadcn/src/app/cast.tsx +++ b/examples/nextjs-shadcn/src/app/cast.tsx @@ -140,9 +140,6 @@ export function Cast(props: { ยท {publishedAt}
- {/* */} diff --git a/packages/core/src/renderer.ts b/packages/core/src/renderer.ts index 1170cd3..a25e3c8 100644 --- a/packages/core/src/renderer.ts +++ b/packages/core/src/renderer.ts @@ -158,15 +158,17 @@ export type ModElementRef = }; }; -export type BaseContext = { - user?: { - wallet?: { - address?: string; - }; - farcaster?: { - fid?: string; - }; +export type UserData = { + wallet?: { + address?: string; }; + farcaster?: { + fid?: string; + }; +}; + +export type BaseContext = { + user?: UserData; /** The url of the api hosting the mod backends. (including /api) **/ api: string; }; @@ -182,16 +184,8 @@ export type RichEmbedContext = BaseContext & { }; export type ActionContext = BaseContext & { - user: { - wallet?: { - address?: string; - }; - }; - author: { - farcaster?: { - fid?: string; - }; - }; + user: UserData; + author: Omit; post: { text: string; embeds: Embed[]; @@ -449,7 +443,7 @@ export type RendererOptions = { onEthPersonalSignAction: EthPersonalSignActionResolver; onSendEthTransactionAction: SendEthTransactionActionResolver; onExitAction: ExitActionResolver; -} & ( +} & ( // TODO: Variant-specific actions | { variant: "creation"; context: CreationContext;