forked from bh2smith/safe-airdrop
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: redesign app Update safe-react-components and use the new theme to redesign the app. This requires an update of MUI to v5 and removes styled-components. All wrapped MUI components were removed meaning that we have to use the native MUI components across the app. Improvements: - Uses dark mode if OS of user is set to dark appearance - Improves design / flow of the app * fix: table border colors, drain dialog address validation
- Loading branch information
Showing
49 changed files
with
1,444 additions
and
1,220 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import { CircularProgress, CssBaseline, GlobalStyles, Theme, ThemeProvider, Typography } from "@mui/material"; | ||
import SafeProvider from "@safe-global/safe-apps-react-sdk"; | ||
import { SafeThemeProvider } from "@safe-global/safe-react-components"; | ||
import { Provider as ReduxProvider } from "react-redux"; | ||
|
||
import App from "./App"; | ||
import { useDarkMode } from "./hooks/useDarkMode"; | ||
import errorIcon from "./static/error-icon.svg"; | ||
import { store } from "./stores/store"; | ||
|
||
export const AppWrapper = () => { | ||
const isDarkMode = useDarkMode(); | ||
const themeMode = isDarkMode ? "dark" : "light"; | ||
|
||
return ( | ||
<SafeThemeProvider mode={themeMode}> | ||
{(safeTheme: Theme) => ( | ||
<ThemeProvider theme={safeTheme}> | ||
<CssBaseline /> | ||
<GlobalStyles | ||
styles={{ | ||
".error-marker": { | ||
position: "absolute", | ||
backgroundColor: "lightpink", | ||
display: "block", | ||
}, | ||
".ace_error": { | ||
backgroundImage: `url(${errorIcon}) !important`, | ||
backgroundSize: "15px", | ||
}, | ||
".ace_tooltip.ace_error": { | ||
backgroundImage: "none !important", | ||
}, | ||
}} | ||
/> | ||
<SafeProvider | ||
loader={ | ||
<> | ||
<Typography>Waiting for Safe...</Typography> | ||
<CircularProgress /> | ||
</> | ||
} | ||
> | ||
<ReduxProvider store={store}> | ||
<App /> | ||
</ReduxProvider> | ||
</SafeProvider> | ||
</ThemeProvider> | ||
)} | ||
</SafeThemeProvider> | ||
); | ||
}; |
Oops, something went wrong.