From 2faaa71f58214fe0067a1644c906ffa83291bea2 Mon Sep 17 00:00:00 2001 From: Caspian Zhao Date: Sat, 5 Oct 2024 09:40:35 +0800 Subject: [PATCH] fix: demo app can't dislay in doc site (#693) * ci: add new CI job for testing * chore: remove unused linting before commit * ci: update testing CI * ci: update yarn caching logic * ci: refacor dependency caching logic in ci files * ci: update CI trigger time * docs: update example baseUrl * fix: demo app can't dislay in doc site --- example/app/app/+html.tsx | 16 +++-- example/app/app/_layout.tsx | 109 +++++++++++++++++++---------------- example/app/app/index.tsx | 2 +- example/website/package.json | 2 - 4 files changed, 67 insertions(+), 62 deletions(-) diff --git a/example/app/app/+html.tsx b/example/app/app/+html.tsx index d076575f..a88a856f 100644 --- a/example/app/app/+html.tsx +++ b/example/app/app/+html.tsx @@ -1,6 +1,5 @@ import { ScrollViewStyleReset } from "expo-router/html"; import { WebProvider } from "@/store/WebProvider"; -import { MAX_WIDTH } from "@/constants/sizes"; // This file is web-only and used to configure the root HTML for every // web page during static rendering. @@ -17,6 +16,12 @@ export default function Root({ children }: { children: React.ReactNode }) { content="width=device-width, initial-scale=1, shrink-to-fit=no, maximum-scale=1" /> + {/* This CSP used to control which domain could embed this App. For now, we're using this App in doc site. */} + + {/* Disable body scrolling on web. This makes ScrollView components work closer to how they do on native. However, body scrolling is often nice to have for mobile web. If you want to enable it, remove this line. @@ -26,7 +31,7 @@ export default function Root({ children }: { children: React.ReactNode }) { {/* Using raw CSS styles as an escape-hatch to ensure the background color never flickers in dark-mode. */}