Skip to content

Commit

Permalink
🚧 Remove interactor
Browse files Browse the repository at this point in the history
  • Loading branch information
preetjdp committed May 28, 2024
1 parent 8a950ee commit ea3cb76
Showing 1 changed file with 26 additions and 15 deletions.
41 changes: 26 additions & 15 deletions src/app/api/[[...routes]]/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const neynarClient = new NeynarAPIClient(NEYNAR_API_KEY);

type State = {
confirm: {
interactor: NeynarMiddlewareUser;
// interactor: NeynarMiddlewareUser;
devfolio: NeynarUserV1;
searchUser: NeynarUserV2;
} | null;
Expand All @@ -31,12 +31,13 @@ const app = new Frog<{ State: State }>({
browserLocation: '/:path',
ui: { vars },
initialState: {},
}).use(
neynarMiddleware({
apiKey: NEYNAR_API_KEY,
features: ['interactor'],
})
);
})
// .use(
// neynarMiddleware({
// apiKey: NEYNAR_API_KEY,
// features: ['interactor'],
// })
// );

// COMPONENTS START

Expand Down Expand Up @@ -111,11 +112,11 @@ app.frame('/nominate', c => {
});

app.frame('/confirm', async c => {
const interactor = c.var.interactor;
if (!interactor) {
// @todo Update Error Message
return c.res(ErrorResponse('Invalid Interactor'));
}
// const interactor = c.var.interactor;
// if (!interactor) {
// // @todo Update Error Message
// return c.res(ErrorResponse('Invalid Interactor'));
// }

const devfolioLookupResponse = await neynarClient.lookupUserByUsername('devfolio').catch(() => false);
if (typeof devfolioLookupResponse === 'boolean') {
Expand Down Expand Up @@ -156,7 +157,7 @@ app.frame('/confirm', async c => {
const state = c.deriveState(previousState => {
previousState.confirm = {
devfolio: devfolio,
interactor,
// interactor,
searchUser,
};
});
Expand Down Expand Up @@ -216,9 +217,13 @@ app.frame('/confirm', async c => {
</Text>
<Text>hu</Text>
</HStack> */}
<Text color="text" weight="300" size="14">
{/* <Text color="text" weight="300" size="14">
🔵 gm @{confirmState.searchUser.username}. @{confirmState.interactor.username} thinks {"you're"} a
super based builder, and has nominated you for the Onchain Summer Buildathon.
</Text> */}
<Text color="text" weight="300" size="14">
🔵 gm @{confirmState.searchUser.username}. Someone thinks {"you're"} a
super based builder, and has nominated you for the Onchain Summer Buildathon.
</Text>
<Text color="text" weight="300" size="14">
Participate, mint your SupaBald Jesse NFT, and just build it. LFG 🛠️
Expand Down Expand Up @@ -248,7 +253,13 @@ app.frame('/cast', c => {
return c.res(ErrorResponse('Invalid State'));
}

const cast = `🔵 gm @${confirmState.searchUser.username}. @${confirmState.interactor.username} thinks you're a super based builder, and has nominated you for the Onchain Summer Buildathon.
// const cast = `🔵 gm @${confirmState.searchUser.username}. @${confirmState.interactor.username} thinks you're a super based builder, and has nominated you for the Onchain Summer Buildathon.

// Hop in, mint your SupaBald Jesse NFT, and just build it. LFG

// https://letsgetjessebald.com/`;

const cast = `🔵 gm @${confirmState.searchUser.username}. Someone thinks you're a super based builder, and has nominated you for the Onchain Summer Buildathon.
Hop in, mint your SupaBald Jesse NFT, and just build it. LFG
Expand Down

0 comments on commit ea3cb76

Please sign in to comment.