@@ -17,9 +20,18 @@ export function LandscapePrompt() {
请旋转屏幕
- 为获得最佳体验,请横屏浏览
+ 为获得最佳体验,请横屏浏览
);
}
+
+export function OrientationGuard({ renderPrompt }: OrientationGuardProps) {
+ const isPortrait = useOrientation();
+
+ if (!isPortrait) return null;
+ if (renderPrompt) return <>{renderPrompt()}>;
+
+ return