Skip to content

Commit 4b20cc1

Browse files
committed
feat: remove preview env tracking
1 parent 6804fa7 commit 4b20cc1

File tree

3 files changed

+1
-15
lines changed

3 files changed

+1
-15
lines changed

apps/postgres-new/.env.example

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
NEXT_PUBLIC_SUPABASE_ANON_KEY="<supabase-anon-key>"
22
NEXT_PUBLIC_SUPABASE_URL="<supabase-api-url>"
3-
NEXT_PUBLIC_IS_PREVIEW=true
43
NEXT_PUBLIC_BROWSER_PROXY_DOMAIN="<browser-proxy-domain>"
54

65
OPENAI_API_KEY="<openai-api-key>"

apps/postgres-new/components/app-provider.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ export default function AppProvider({ children }: AppProps) {
100100
setUser(undefined)
101101
}, [supabase])
102102

103-
const isPreview = process.env.NEXT_PUBLIC_IS_PREVIEW === 'true'
104103
const pgliteVersion = process.env.NEXT_PUBLIC_PGLITE_VERSION
105104
const { value: pgVersion } = useAsyncMemo(async () => {
106105
if (!dbManager) {
@@ -237,7 +236,6 @@ export default function AppProvider({ children }: AppProps) {
237236
isRateLimited,
238237
setIsRateLimited,
239238
focusRef,
240-
isPreview,
241239
dbManager,
242240
pgliteVersion,
243241
pgVersion,
@@ -266,7 +264,6 @@ export type AppContextValues = {
266264
isRateLimited: boolean
267265
setIsRateLimited: (limited: boolean) => void
268266
focusRef: RefObject<FocusHandle>
269-
isPreview: boolean
270267
dbManager?: DbManager
271268
pgliteVersion?: string
272269
pgVersion?: string

apps/postgres-new/components/layout.tsx

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,13 @@ const loadFramerFeatures = () => import('./framer-features').then((res) => res.d
2626
export type LayoutProps = PropsWithChildren
2727

2828
export default function Layout({ children }: LayoutProps) {
29-
const { isPreview, isLegacyDomain, isLegacyDomainRedirect } = useApp()
29+
const { isLegacyDomain, isLegacyDomainRedirect } = useApp()
3030
const isSmallBreakpoint = useBreakpoint('lg')
3131

3232
return (
3333
<LazyMotion features={loadFramerFeatures}>
3434
<TooltipProvider delayDuration={0}>
3535
<div className="w-full h-full flex flex-col overflow-hidden">
36-
{isPreview && <PreviewBanner />}
3736
{/* TODO: re-enable rename banner when ready */}
3837
{(isLegacyDomain || isLegacyDomainRedirect) && <RenameBanner />}
3938
<main className="flex-1 flex flex-col lg:flex-row min-h-0">
@@ -50,15 +49,6 @@ export default function Layout({ children }: LayoutProps) {
5049
)
5150
}
5251

53-
function PreviewBanner() {
54-
return (
55-
<div className="px-3 py-3 flex justify-center text-sm text-center bg-neutral-800 text-white">
56-
Heads up! This is a preview version of {currentDomainHostname}, so expect some changes here
57-
and there.
58-
</div>
59-
)
60-
}
61-
6252
function RenameBanner() {
6353
const { setIsRenameDialogOpen } = useApp()
6454
return (

0 commit comments

Comments
 (0)