mirror of
https://github.com/neynarxyz/create-farcaster-mini-app.git
synced 2025-11-18 17:09:47 -05:00
feat: update deploy script to and manifest generation for simplicity
This commit is contained in:
@@ -4,6 +4,7 @@ import { useCallback, useState, useEffect } from 'react';
|
||||
import { Button } from './Button';
|
||||
import { useMiniApp } from '@neynar/react';
|
||||
import { type ComposeCast } from "@farcaster/miniapp-sdk";
|
||||
import { APP_URL } from '~/lib/constants';
|
||||
|
||||
interface EmbedConfig {
|
||||
path?: string;
|
||||
@@ -72,7 +73,7 @@ export function ShareButton({ buttonText, cast, className = '', isLoading = fals
|
||||
return embed;
|
||||
}
|
||||
if (embed.path) {
|
||||
const baseUrl = process.env.NEXT_PUBLIC_URL || window.location.origin;
|
||||
const baseUrl = APP_URL || window.location.origin;
|
||||
const url = new URL(`${baseUrl}${embed.path}`);
|
||||
|
||||
// Add UTM parameters
|
||||
|
||||
@@ -6,6 +6,7 @@ import { ShareButton } from "../Share";
|
||||
import { Button } from "../Button";
|
||||
import { SignIn } from "../wallet/SignIn";
|
||||
import { type Haptics } from "@farcaster/miniapp-sdk";
|
||||
import { APP_URL } from "~/lib/constants";
|
||||
|
||||
/**
|
||||
* ActionsTab component handles mini app actions like sharing, notifications, and haptic feedback.
|
||||
@@ -90,7 +91,7 @@ export function ActionsTab() {
|
||||
*/
|
||||
const copyUserShareUrl = useCallback(async () => {
|
||||
if (context?.user?.fid) {
|
||||
const userShareUrl = `${process.env.NEXT_PUBLIC_URL}/share/${context.user.fid}`;
|
||||
const userShareUrl = `${APP_URL}/share/${context.user.fid}`;
|
||||
await navigator.clipboard.writeText(userShareUrl);
|
||||
setNotificationState((prev) => ({ ...prev, shareUrlCopied: true }));
|
||||
setTimeout(() => setNotificationState((prev) => ({ ...prev, shareUrlCopied: false })), 2000);
|
||||
@@ -120,7 +121,7 @@ export function ActionsTab() {
|
||||
cast={{
|
||||
text: "Check out this awesome frame @1 @2 @3! 🚀🪐",
|
||||
bestFriends: true,
|
||||
embeds: [`${process.env.NEXT_PUBLIC_URL}/share/${context?.user?.fid || ''}`]
|
||||
embeds: [`${APP_URL}/share/${context?.user?.fid || ''}`]
|
||||
}}
|
||||
className="w-full"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user