From 753d5f3f005abcbc67637c5070f204281adfdbaa Mon Sep 17 00:00:00 2001 From: jacob-tucker Date: Tue, 20 Feb 2024 13:54:00 -0500 Subject: [PATCH 1/7] test load times --- app/cast/[id]/page.tsx | 6 +++--- lib/components/frames/TestFrame.tsx | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/cast/[id]/page.tsx b/app/cast/[id]/page.tsx index 7d3ce2c..011972e 100644 --- a/app/cast/[id]/page.tsx +++ b/app/cast/[id]/page.tsx @@ -109,7 +109,7 @@ export default async function Home({ params, searchParams, children }: any) { } //@ts-ignore - const { cast, castImage }: { cast: Cast, castImage: string } = await handleFetchCast(state.currentCastId); + // const { cast, castImage }: { cast: Cast, castImage: string } = await handleFetchCast(state.currentCastId); if (state.stage == 'start') { return ( @@ -122,8 +122,8 @@ export default async function Home({ params, searchParams, children }: any) { > {/* */} - - {/* */} + {/* */} + {/*
Hello there test. Cast #{params.id}
*/}
Join diff --git a/lib/components/frames/TestFrame.tsx b/lib/components/frames/TestFrame.tsx index f9087db..d5d8b14 100644 --- a/lib/components/frames/TestFrame.tsx +++ b/lib/components/frames/TestFrame.tsx @@ -1,7 +1,7 @@ import { Cast } from "@/lib/types/cast.interface"; // @ts-nocheck -export default function TestFrame({ castId, castImage }: { castId: number, castImage: string }) { +export default function TestFrame({ castId }: { castId: number }) { return (
- + {/* */}
Date: Tue, 20 Feb 2024 14:03:52 -0500 Subject: [PATCH 2/7] remove page as well --- app/cast/[id]/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/cast/[id]/page.tsx b/app/cast/[id]/page.tsx index 011972e..e14d719 100644 --- a/app/cast/[id]/page.tsx +++ b/app/cast/[id]/page.tsx @@ -128,7 +128,7 @@ export default async function Home({ params, searchParams, children }: any) { Join - + {/* */}
) } From 929c9ffe6ac49626a4e16439cd054fb61f518b31 Mon Sep 17 00:00:00 2001 From: jacob-tucker Date: Tue, 20 Feb 2024 14:43:20 -0500 Subject: [PATCH 3/7] bring the call back --- app/cast/[id]/page.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/cast/[id]/page.tsx b/app/cast/[id]/page.tsx index e14d719..cdce2a5 100644 --- a/app/cast/[id]/page.tsx +++ b/app/cast/[id]/page.tsx @@ -109,7 +109,7 @@ export default async function Home({ params, searchParams, children }: any) { } //@ts-ignore - // const { cast, castImage }: { cast: Cast, castImage: string } = await handleFetchCast(state.currentCastId); + const { cast, castImage }: { cast: Cast, castImage: string } = await handleFetchCast(state.currentCastId); if (state.stage == 'start') { return ( @@ -163,7 +163,6 @@ export default async function Home({ params, searchParams, children }: any) { newCastInfo.prompt_input, newCastInfo.layer_1_cast_id ); - //@ts let pastPrompts: string[] = cast.version_history.map(ele => ele.prompt_input as string).filter(ele => !!ele).concat(state.inputText); handleGenerateImage(cast.name, pastPrompts, createdArtcastId as number, farcaster_name); state.currentCastId = createdArtcastId as number; From 4c4acb4d7c14bdc952e6610a520507352d3afe85 Mon Sep 17 00:00:00 2001 From: jacob-tucker Date: Tue, 20 Feb 2024 14:50:38 -0500 Subject: [PATCH 4/7] add cast page back --- app/cast/[id]/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/cast/[id]/page.tsx b/app/cast/[id]/page.tsx index cdce2a5..ef11a50 100644 --- a/app/cast/[id]/page.tsx +++ b/app/cast/[id]/page.tsx @@ -128,7 +128,7 @@ export default async function Home({ params, searchParams, children }: any) { Join - {/* */} +
) } From bac4b1b4daa6abbfc618efdf79c978db5795613d Mon Sep 17 00:00:00 2001 From: jacob-tucker Date: Tue, 20 Feb 2024 14:55:02 -0500 Subject: [PATCH 5/7] back to nroaml frame w/ no image --- app/cast/[id]/page.tsx | 4 ++-- lib/components/frames/RootFrame.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/cast/[id]/page.tsx b/app/cast/[id]/page.tsx index ef11a50..91f0eb4 100644 --- a/app/cast/[id]/page.tsx +++ b/app/cast/[id]/page.tsx @@ -122,8 +122,8 @@ export default async function Home({ params, searchParams, children }: any) { > {/* */} - {/* */} - + + {/* */} {/*
Hello there test. Cast #{params.id}
*/}
Join diff --git a/lib/components/frames/RootFrame.tsx b/lib/components/frames/RootFrame.tsx index dc01141..3db7797 100644 --- a/lib/components/frames/RootFrame.tsx +++ b/lib/components/frames/RootFrame.tsx @@ -125,7 +125,7 @@ export default function RootFrame({ castInfo, imageSrc, type }: { castInfo: Cast display: 'flex', gap: '20px' }}> - + {/* */}
Date: Tue, 20 Feb 2024 15:04:32 -0500 Subject: [PATCH 6/7] add placeholder for image --- lib/components/frames/RootFrame.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/components/frames/RootFrame.tsx b/lib/components/frames/RootFrame.tsx index 3db7797..85fdce8 100644 --- a/lib/components/frames/RootFrame.tsx +++ b/lib/components/frames/RootFrame.tsx @@ -125,7 +125,11 @@ export default function RootFrame({ castInfo, imageSrc, type }: { castInfo: Cast display: 'flex', gap: '20px' }}> - {/* */} + {type != 'start' ? + :
+ Click 'Join' to + see the image! +
}
Date: Tue, 20 Feb 2024 15:08:49 -0500 Subject: [PATCH 7/7] see if this version works --- app/api/casts/[id]/route.ts | 7 +------ lib/components/frames/RootFrame.tsx | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/app/api/casts/[id]/route.ts b/app/api/casts/[id]/route.ts index 0030f92..9a7f219 100644 --- a/app/api/casts/[id]/route.ts +++ b/app/api/casts/[id]/route.ts @@ -28,11 +28,6 @@ export async function GET(request: Request, { params }: { params: { id: number } const castImage = await getArtcastImage(ans.image_path as string); return Response.json({ cast: ans, castImage }, { - status: 200, - headers: { - 'Cache-Control': 'public, s-maxage=100', - 'CDN-Cache-Control': 'public, s-maxage=100', - 'Vercel-CDN-Cache-Control': 'public, s-maxage=100', - }, + status: 200 }) } diff --git a/lib/components/frames/RootFrame.tsx b/lib/components/frames/RootFrame.tsx index 85fdce8..27983ce 100644 --- a/lib/components/frames/RootFrame.tsx +++ b/lib/components/frames/RootFrame.tsx @@ -126,7 +126,7 @@ export default function RootFrame({ castInfo, imageSrc, type }: { castInfo: Cast gap: '20px' }}> {type != 'start' ? - :
+ :
Click 'Join' to see the image!
}