@@ -48,7 +48,10 @@ export default function BuilderRoot() {
4848 < BuilderSidebar />
4949 </ div >
5050 < div className = "w-2/3 @8xl:w-3/4 pl-2" >
51- < Tabs defaultValue = "preview" className = "h-full" >
51+ < Tabs
52+ defaultValue = { isFirefox ? 'files' : 'preview' }
53+ className = "h-full"
54+ >
5255 < TabsList >
5356 < TabsTrigger value = "preview" > Preview</ TabsTrigger >
5457 < TabsTrigger value = "files" > Files</ TabsTrigger >
@@ -57,7 +60,48 @@ export default function BuilderRoot() {
5760 < FileNavigator />
5861 </ TabsContent >
5962 < TabsContent value = "preview" >
60- < BuilderPreview />
63+ { isFirefox ? (
64+ < div className = "flex items-center justify-center h-full bg-gray-50 dark:bg-gray-900" >
65+ < div className = "bg-white dark:bg-gray-800 rounded-lg shadow-xl p-8 max-w-2xl w-full mx-4 border-2 border-orange-500" >
66+ < div className = "text-center" >
67+ < div className = "text-6xl mb-4" > 🦊</ div >
68+ < h2 className = "text-2xl font-bold mb-4" >
69+ Firefox Preview Not Available
70+ </ h2 >
71+ < p className = "text-gray-600 dark:text-gray-400 mb-6" >
72+ Unfortunately, WebContainer preview is not
73+ currently supported in Firefox due to browser
74+ limitations.
75+ </ p >
76+ < div className = "bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4 text-left mb-6" >
77+ < div className = "text-sm font-semibold text-blue-800 dark:text-blue-200 mb-2" >
78+ What you can do:
79+ </ div >
80+ < ul className = "text-sm text-blue-700 dark:text-blue-300 space-y-2 list-disc list-inside" >
81+ < li >
82+ Use the < strong > Files</ strong > tab to view and
83+ edit your generated code
84+ </ li >
85+ < li >
86+ Download or export your project to run it
87+ locally
88+ </ li >
89+ < li >
90+ Use Chrome, Edge, or another Chromium-based
91+ browser for preview functionality
92+ </ li >
93+ </ ul >
94+ </ div >
95+ < div className = "text-xs text-gray-500 dark:text-gray-500" >
96+ This is a known limitation of WebContainer
97+ technology in Firefox.
98+ </ div >
99+ </ div >
100+ </ div >
101+ </ div >
102+ ) : (
103+ < BuilderPreview />
104+ ) }
61105 </ TabsContent >
62106 </ Tabs >
63107 </ div >
0 commit comments