This commit is contained in:
Manav Rathi
2024-06-03 11:44:29 +05:30
parent 82fbbd427e
commit d0640a094b
4 changed files with 8 additions and 8 deletions

View File

@@ -52,7 +52,7 @@ export default function App({ Component, pageProps }: AppProps) {
const showNavBar = (show: boolean) => setShowNavBar(show);
const isMobile = useMediaQuery("(max-width:428px)");
const isMobile = useMediaQuery("(max-width: 428px)");
const router = useRouter();

View File

@@ -67,7 +67,7 @@ export default function App({ Component, pageProps }: AppProps) {
DialogBoxAttributesV2 | undefined
>();
const [dialogBoxV2View, setDialogBoxV2View] = useState(false);
const isMobile = useMediaQuery("(max-width:428px)");
const isMobile = useMediaQuery("(max-width: 428px)");
const [themeColor, setThemeColor] = useLocalState(
LS_KEYS.THEME,
THEME_COLOR.DARK,

View File

@@ -133,7 +133,7 @@ export default function App({ Component, pageProps }: AppProps) {
const [dialogBoxV2View, setDialogBoxV2View] = useState(false);
const [watchFolderView, setWatchFolderView] = useState(false);
const [watchFolderFiles, setWatchFolderFiles] = useState<FileList>(null);
const isMobile = useMediaQuery("(max-width:428px)");
const isMobile = useMediaQuery("(max-width: 428px)");
const [notificationView, setNotificationView] = useState(false);
const closeNotification = () => setNotificationView(false);
const [notificationAttributes, setNotificationAttributes] =
@@ -388,7 +388,7 @@ export default function App({ Component, pageProps }: AppProps) {
attributes={dialogBoxAttributeV2}
/>
{shouldShowWhatsNew && (
<WhatsNew close={() => setShouldShowWhatsNew(false)} />
<WhatsNew onClose={() => setShouldShowWhatsNew(false)} />
)}
<Notification
open={notificationView}

View File

@@ -3,20 +3,20 @@ import React from "react";
interface WhatsNewProps {
/** Invoked by the component when it wants to get closed. */
close: () => void;
onClose: () => void;
}
/**
* Show a dialog showing a short summary of interesting-for-the-user things in
* this release of the desktop app.
*/
export const WhatsNew: React.FC<WhatsNewProps> = ({ close }) => {
const fullScreen = useMediaQuery("(max-width:428px)");
export const WhatsNew: React.FC<WhatsNewProps> = ({ onClose }) => {
const fullScreen = useMediaQuery("(max-width: 428px)");
return (
<Dialog open={true} fullScreen={fullScreen}>
<Contents>
<button onClick={close}>Hello</button>
<button onClick={onClose}>Hello</button>
</Contents>
</Dialog>
);