-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- new theme - remove safe-react-components - update to MUI 5 - Use craco instead of react-rewired
- Loading branch information
Showing
43 changed files
with
4,728 additions
and
4,981 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,24 @@ | ||
import NodePolyfillPlugin from 'node-polyfill-webpack-plugin'; | ||
import { Configuration } from 'webpack/types.d'; | ||
|
||
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin'); | ||
|
||
const config = { | ||
babel: { | ||
plugins: ['@emotion/babel-plugin'], | ||
}, | ||
webpack: { | ||
plugins: [new NodePolyfillPlugin()], | ||
configure: (webpackConfig: Configuration) => { | ||
if (!webpackConfig?.resolve?.plugins) return webpackConfig; | ||
|
||
// Allow imports outside of src/ | ||
webpackConfig.resolve.plugins = webpackConfig.resolve.plugins.filter( | ||
({ constructor }: InstanceType<typeof ModuleScopePlugin>) => constructor?.name !== 'ModuleScopePlugin', | ||
); | ||
return webpackConfig; | ||
}, | ||
}, | ||
}; | ||
|
||
export default config; |
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,31 @@ | ||
import { CircularProgress, CssBaseline, Theme, ThemeProvider, Typography } from '@mui/material'; | ||
import SafeProvider from '@safe-global/safe-apps-react-sdk'; | ||
import { SafeThemeProvider } from '@safe-global/safe-react-components'; | ||
|
||
import App from './App'; | ||
import { useDarkMode } from './hooks/useDarkMode'; | ||
|
||
export const AppWrapper = () => { | ||
const isDarkMode = useDarkMode(); | ||
const themeMode = isDarkMode ? 'dark' : 'light'; | ||
|
||
return ( | ||
<SafeThemeProvider mode={themeMode}> | ||
{(safeTheme: Theme) => ( | ||
<ThemeProvider theme={safeTheme}> | ||
<CssBaseline /> | ||
<SafeProvider | ||
loader={ | ||
<> | ||
<Typography>Waiting for Safe...</Typography> | ||
<CircularProgress /> | ||
</> | ||
} | ||
> | ||
<App /> | ||
</SafeProvider> | ||
</ThemeProvider> | ||
)} | ||
</SafeThemeProvider> | ||
); | ||
}; |
This file was deleted.
Oops, something went wrong.
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,31 @@ | ||
import { CheckOutlined } from '@mui/icons-material'; | ||
import { Box, Typography } from '@mui/material'; | ||
|
||
export const AppHeader = () => ( | ||
<Box display="flex" flexDirection="row" alignItems="center" justifyContent="space-between" width="100%"> | ||
<Typography variant="h1">Token Approval Manager</Typography> | ||
<Box> | ||
<Box display="flex" flexDirection="row" alignItems="center" gap={2}> | ||
<CheckOutlined | ||
sx={{ | ||
backgroundColor: ({ palette }) => palette.info.background, | ||
color: ({ palette }) => palette.info.main, | ||
borderRadius: '12px', | ||
}} | ||
/> | ||
<Typography>Keep track of all your token approvals.</Typography> | ||
</Box> | ||
|
||
<Box display="flex" flexDirection="row" alignItems="center" gap={2}> | ||
<CheckOutlined | ||
sx={{ | ||
backgroundColor: ({ palette }) => palette.info.background, | ||
color: ({ palette }) => palette.info.main, | ||
borderRadius: '12px', | ||
}} | ||
/> | ||
<Typography>Edit / Revoke multiple approvals in a single transaction.</Typography> | ||
</Box> | ||
</Box> | ||
</Box> | ||
); |
Oops, something went wrong.