refactor(app): migrate small styles to tailwind

This commit is contained in:
2026-07-10 18:18:44 +08:00
parent 89e0fb687a
commit 7d29dbd72f
9 changed files with 70 additions and 59 deletions
@@ -0,0 +1,10 @@
import { renderToStaticMarkup } from "react-dom/server";
import { describe, expect, it } from "vitest";
import { PwaInstallOverlay } from "../pwa-install-overlay";
describe("PwaInstallOverlay", () => {
it("does not render visible markup", () => {
expect(renderToStaticMarkup(<PwaInstallOverlay enabled />)).toBe("");
});
});
@@ -1,5 +0,0 @@
/* PwaInstallOverlay PWA 安装弹窗触发器样式(无可见 UI,逻辑触发用) */
.hidden {
display: none;
}
@@ -22,7 +22,6 @@ import {
import { pwaUtil } from "@/utils";
import { PwaInstallDialog } from "./pwa-install-dialog";
import styles from "./pwa-install-overlay.module.css";
const DEVELOPMENT_DIALOG_DELAY_MS = 1000;
const PRODUCTION_DIALOG_DELAY_MS = 1500;
@@ -74,7 +73,7 @@ export function PwaInstallOverlay({ enabled }: PwaInstallOverlayProps) {
};
}, [enabled]);
return <div className={styles.hidden} aria-hidden="true" />;
return null;
}
async function shouldShowPwaInstallDialog(isDevelopment: boolean) {