Tinker
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user