Skip to content

Commit e6b533b

Browse files
Merge pull request #107 from yehezkielgunawan/fix-sst-errors
Fix sst errors
2 parents ed29e99 + afddf14 commit e6b533b

File tree

3 files changed

+2
-303
lines changed

3 files changed

+2
-303
lines changed

src/pages/api/og-sst.tsx

Lines changed: 0 additions & 217 deletions
This file was deleted.

src/pages/api/og.edge.tsx

Lines changed: 0 additions & 64 deletions
This file was deleted.

src/pages/index.tsx

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@ const Home: NextPage = () => {
1616
const [socialMedia, setSocialMedia] = useState<string>("Twitter: @yehezgun");
1717
const [siteName, setSiteName] = useState<string>("yehezgun.com");
1818
const [isCopied, setIsCopied] = useState<boolean>(false);
19-
const [useSST, setUseSST] = useState<boolean>(false);
2019

21-
// Choose endpoint based on deployment or user preference
22-
const apiEndpoint = useSST ? "/api/og-sst" : "/api/og";
20+
// Always use /api/og as the endpoint
21+
const apiEndpoint = "/api/og";
2322

2423
const ogUrl = new URL(
2524
`${apiEndpoint}?title=${title}&desc=${desc}${
@@ -136,25 +135,6 @@ const Home: NextPage = () => {
136135
<Button block variant="secondary" onClick={() => onCopied()}>
137136
Copy URL
138137
</Button>
139-
140-
{/* Endpoint Toggle for Testing */}
141-
<div className="flex flex-col gap-2">
142-
<label className="font-bold" htmlFor="API Endpoint Label">
143-
API Endpoint
144-
</label>
145-
<div className="flex items-center gap-2">
146-
<input
147-
type="checkbox"
148-
id="useSST"
149-
checked={useSST}
150-
onChange={(e) => setUseSST(e.target.checked)}
151-
className="rounded"
152-
/>
153-
<label htmlFor="useSST" className="text-sm">
154-
Use SST Endpoint ({useSST ? "/api/og-sst" : "/api/og"})
155-
</label>
156-
</div>
157-
</div>
158138
</section>
159139
<section className="flex w-full flex-col gap-4">
160140
<figure>

0 commit comments

Comments
 (0)