Skip to content

Commit

Permalink
add hoyt placeholder and remove unneeded stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
MrKevinOConnell committed Jun 24, 2024
1 parent 05dba34 commit f24992d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
9 changes: 2 additions & 7 deletions src/app/[identifier]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,6 @@ export default function Page({ params }: ResponseProps) {
setButtonClicked(true);
};

const handleCopyAuthorClick = () => {
copyToClipboard(authorFid.toString() as any);
setButtonClicked(true);
};

return (
<>
<Modal isOpen={isModalOpen} toggleModal={closeModal} response={modalData} title={modalTitle} />
Expand Down Expand Up @@ -213,8 +208,8 @@ export default function Page({ params }: ResponseProps) {
<>
{warpcastAuthor && renderHeader('Warpcast API', warpcastAuthor, warpcastAuthorMissing)}
{warpcastCast && renderHeader('Warpcast API', warpcastCast, warpcastCastMissing)}
{nemesAuthor && renderHeader('Warpcast Hub', nemesAuthor, warpcastAuthorHubMissing)}
{nemesCast && renderHeader('Warpcast Hub', nemesCast, warpcastCastHubMissing)}
{nemesAuthor && renderHeader('Warpcast Hub (Hoyt)', nemesAuthor, warpcastAuthorHubMissing)}
{nemesCast && renderHeader('Warpcast Hub (Hoyt)', nemesCast, warpcastCastHubMissing)}
{neynarHubAuthor && renderHeader('Neynar Hub', neynarHubAuthor, neynarAuthorHubMissing)}
{neynarHubCast && renderHeader('Neynar Hub', neynarHubCast, neynarCastHubMissing)}
{neynarAuthor && renderHeader('Neynar API', neynarAuthor, neynarAuthorMissing)}
Expand Down
4 changes: 0 additions & 4 deletions src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ if(isValidWarpcastUrl(processedHash)) {

export async function fetchCastFromHub(hash: string | null, fid: number | null, hub: HubType, isCast = true) {
if (!fid || !hash || !isCast) return null;
const start = performance.now();
try {
let headers: { "Content-Type": string, api_key?: string, "x-airstack-hubs"?: string } = { "Content-Type": "application/json" };
if (hub.shortname === "Neynar hub") {
Expand All @@ -254,7 +253,6 @@ export async function fetchCastFromHub(hash: string | null, fid: number | null,
}

export async function fetchCastFromNeynarAPI(identifier: string, isURL: boolean = false) {
const start = performance.now();
try {
const cast = await axios.get(`https://api.neynar.com/v2/farcaster/cast?identifier=${identifier}&type=${isURL ? 'url' : 'hash'}`, {
headers: {
Expand All @@ -272,7 +270,6 @@ export async function fetchCastFromNeynarAPI(identifier: string, isURL: boolean

export async function fetchFidFromHub(fid: number | null, hub: HubType,isCast = true) {
if (!fid || isCast) return null
const start = performance.now();
try {
let headers: { "Content-Type": string, api_key?: string, "x-airstack-hubs"?: string } = { "Content-Type": "application/json" };
if (hub.shortname === "Neynar hub") {
Expand Down Expand Up @@ -315,7 +312,6 @@ export async function getEmbedType(url: string) {
export async function fetchAuthorFromNeynarAPI(identifier: string) {
try {
const isURL = isValidWarpcastUrl(identifier);
const start = performance.now();
if (!isURL) {
const authorData = await axios.get(`https://api.neynar.com/v2/farcaster/user/bulk?fids=${identifier}`, {
headers: {
Expand Down

0 comments on commit f24992d

Please sign in to comment.