diff --git a/apps/studio/components/interfaces/Database/Replication/ComingSoon.tsx b/apps/studio/components/interfaces/Database/Replication/ComingSoon.tsx index 4ffda79892c01..c6e54a9877f64 100644 --- a/apps/studio/components/interfaces/Database/Replication/ComingSoon.tsx +++ b/apps/studio/components/interfaces/Database/Replication/ComingSoon.tsx @@ -1,5 +1,13 @@ import { motion } from 'framer-motion' -import { ArrowUpRight, Circle, Database, MoreVertical, Plus, Search } from 'lucide-react' +import { + ArrowRight, + ArrowUpRight, + Circle, + Database, + MoreVertical, + Plus, + Search, +} from 'lucide-react' import { useTheme } from 'next-themes' import Link from 'next/link' import { useMemo } from 'react' @@ -9,7 +17,7 @@ import 'reactflow/dist/style.css' import { ScaffoldContainer, ScaffoldSection } from 'components/layouts/Scaffold' import Table from 'components/to-be-cleaned/Table' import { BASE_PATH } from 'lib/constants' -import { Button, Input_Shadcn_ } from 'ui' +import { Badge, Button, Card, CardContent, Input_Shadcn_ } from 'ui' import { NODE_WIDTH } from '../../Settings/Infrastructure/InfrastructureConfiguration/InstanceConfiguration.constants' const STATIC_NODES = [ @@ -64,15 +72,15 @@ const STATIC_EDGES = [ { id: 'e1-4', source: '1', target: '4', type: 'smoothstep', animated: true }, ] -export const ReplicationComingSoon = () => { +export const ReplicationComingSoon = ({ projectRef }: { projectRef: string }) => { return ( - + ) } -const ReplicationStaticMockup = () => { +const ReplicationStaticMockup = ({ projectRef }: { projectRef: string }) => { const nodes = useMemo(() => STATIC_NODES, []) const edges = useMemo(() => STATIC_EDGES, []) @@ -86,7 +94,7 @@ const ReplicationStaticMockup = () => { primary: PrimaryNode, replica: ReplicaNode, blank: BlankNode, - cta: CTANode, + cta: () => CTANode({ projectRef }), }), [] ) @@ -200,45 +208,32 @@ const BlankNode = () => { ) } -const CTANode = () => { +const CTANode = ({ projectRef }: { projectRef: string }) => { return ( - -
- Early Access -

Replicate Your Data in Real Time

-

- Stream changes from your Postgres database into your data warehouse—no manual exports, no - lag. -

-

- We're rolling this out to a limited group of early adopters. Sign up to get early access. + + +

+

Replicate your data in real time

+ Early Access +
+

+ Stream database changes to multiple destinations - no manual exports, no lag. Limited + rollout for external destinations has begun, read replicas available now.

-

- -

-
-
+ + + + ) } diff --git a/apps/studio/pages/project/[ref]/database/replication/index.tsx b/apps/studio/pages/project/[ref]/database/replication/index.tsx index ee3b304caa7aa..9b78e282d034e 100644 --- a/apps/studio/pages/project/[ref]/database/replication/index.tsx +++ b/apps/studio/pages/project/[ref]/database/replication/index.tsx @@ -41,7 +41,7 @@ const DatabaseReplicationPage: NextPageWithLayout = () => { - + )} diff --git a/apps/www/app/api-v2/cms-posts/route.ts b/apps/www/app/api-v2/cms-posts/route.ts index 9df5606bde040..1750cd44c62b7 100644 --- a/apps/www/app/api-v2/cms-posts/route.ts +++ b/apps/www/app/api-v2/cms-posts/route.ts @@ -9,6 +9,9 @@ export const runtime = 'edge' const corsHeaders = { 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Headers': 'authorization, x-client-info, apikey, content-type', +} + +const cfHeaders = { 'CF-Access-Client-Id': process.env.CF_ACCESS_CLIENT_ID ?? '', 'CF-Access-Client-Secret': process.env.CF_ACCESS_CLIENT_SECRET ?? '', } @@ -160,6 +163,7 @@ export async function GET(request: NextRequest) { headers: { 'Content-Type': 'application/json', ...(apiKey ? { Authorization: `Bearer ${apiKey}` } : {}), + ...cfHeaders, }, cache: 'no-store', }) @@ -251,6 +255,7 @@ export async function GET(request: NextRequest) { headers: { 'Content-Type': 'application/json', ...(apiKey ? { Authorization: `Bearer ${apiKey}` } : {}), + ...cfHeaders, }, cache: 'no-store', // Never cache draft content }) @@ -330,6 +335,7 @@ export async function GET(request: NextRequest) { headers: { 'Content-Type': 'application/json', ...(apiKey ? { Authorization: `Bearer ${apiKey}` } : {}), + ...cfHeaders, }, cache: 'no-store', }) @@ -410,6 +416,7 @@ export async function GET(request: NextRequest) { headers: { 'Content-Type': 'application/json', ...(apiKey ? { Authorization: `Bearer ${apiKey}` } : {}), + ...cfHeaders, }, // For published posts: allow caching with revalidation next: { revalidate: 60 }, // 1 minute @@ -504,6 +511,7 @@ export async function GET(request: NextRequest) { headers: { 'Content-Type': 'application/json', ...(apiKey ? { Authorization: `Bearer ${apiKey}` } : {}), + ...cfHeaders, }, next: { revalidate: 60 }, // 1 minute for published posts }) @@ -525,6 +533,7 @@ export async function GET(request: NextRequest) { headers: { 'Content-Type': 'application/json', ...(apiKey ? { Authorization: `Bearer ${apiKey}` } : {}), + ...cfHeaders, }, next: { revalidate: 60 }, // 1 minute for published posts }) @@ -618,6 +627,7 @@ export async function GET(request: NextRequest) { headers: { 'Content-Type': 'application/json', ...(apiKey ? { Authorization: `Bearer ${apiKey}` } : {}), + ...cfHeaders, }, // For individual post requests, don't cache to ensure fresh data cache: slug ? 'no-store' : 'default',