mirror of
https://github.com/neynarxyz/create-farcaster-mini-app.git
synced 2025-11-16 08:08:56 -05:00
fix: update AddFrame type to AddMiniApp
This commit is contained in:
parent
3c9d845f44
commit
3fcd2f6e52
@ -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",
|
||||||
|
|||||||
@ -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}`);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user