@stoker-platform/web-app 0.5.133 → 0.5.135

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/main.tsx CHANGED
@@ -92,7 +92,10 @@ function Main() {
92
92
  useEffect(() => {
93
93
  const root = document.documentElement
94
94
  if (mode === "app" && !maintenance) {
95
- root.dataset.mode = "app"
95
+ // Prevent black screen flash due to black background
96
+ setTimeout(() => {
97
+ root.dataset.mode = "app"
98
+ }, 500)
96
99
  } else {
97
100
  delete root.dataset.mode
98
101
  }
@@ -103,7 +106,11 @@ function Main() {
103
106
  const getRoutes = () => {
104
107
  const routes = loadRoutes()
105
108
  setRoutes(routes)
106
- runViewTransition(() => setMode("app"))
109
+ if (window.innerWidth >= 1024) {
110
+ runViewTransition(() => setMode("app"))
111
+ } else {
112
+ setMode("app")
113
+ }
107
114
  }
108
115
 
109
116
  const initialize = async () => {