Skip to content

Commit

Permalink
Merge branch 'edge-ssr-fix'
Browse files Browse the repository at this point in the history
  • Loading branch information
rmarscher committed Jan 5, 2024
2 parents 2cd1123 + 670405a commit c80ccd8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
17 changes: 17 additions & 0 deletions apps/next/pages/ssr/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { Paragraph, YStack } from '@t4/ui'
import { GetServerSideProps } from 'next'

export const runtime = 'experimental-edge'

export const getServerSideProps = (async () => {
return { props: { content: 'This content is sent from the server' } }
}) satisfies GetServerSideProps<{ content: string }>

export default function Page(props: { content: string }) {
return (
<YStack flex={1}>
<Paragraph role='heading'>Server-side rendering</Paragraph>
<Paragraph>{props.content}</Paragraph>
</YStack>
)
}
1 change: 0 additions & 1 deletion apps/next/wrangler.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name = "t4-stack"
compatibility_date = "2023-10-30"
send_metrics = false
node_compat = true
account_id = "b0f35235b34e83da001de73148cc561e"
route = "app.t4stack.com/*"
workers_dev = false

Expand Down

0 comments on commit c80ccd8

Please sign in to comment.