fix: update AddFrame type to AddMiniApp

This commit is contained in:
veganbeef 2025-05-16 16:32:12 -07:00
parent 3c9d845f44
commit 3fcd2f6e52
No known key found for this signature in database
2 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@neynar/create-farcaster-mini-app", "name": "@neynar/create-farcaster-mini-app",
"version": "1.2.27", "version": "1.2.28",
"type": "module", "type": "module",
"private": false, "private": false,
"access": "public", "access": "public",

View File

@ -1,7 +1,7 @@
"use client"; "use client";
import { useEffect, useState, useCallback } from "react"; import { useEffect, useState, useCallback } from "react";
import sdk, { type Context, type FrameNotificationDetails, AddFrame } from "@farcaster/frame-sdk"; import sdk, { type Context, type FrameNotificationDetails, AddMiniApp } from "@farcaster/frame-sdk";
import { createStore } from "mipd"; import { createStore } from "mipd";
import React from "react"; import React from "react";
@ -58,7 +58,7 @@ export function useFrame() {
: "Added, got no notification details" : "Added, got no notification details"
); );
} catch (error) { } catch (error) {
if (error instanceof AddFrame.RejectedByUser || error instanceof AddFrame.InvalidDomainManifest) { if (error instanceof AddMiniApp.RejectedByUser || error instanceof AddMiniApp.InvalidDomainManifest) {
setAddFrameResult(`Not added: ${error.message}`); setAddFrameResult(`Not added: ${error.message}`);
}else { }else {
setAddFrameResult(`Error: ${error}`); setAddFrameResult(`Error: ${error}`);