forked from ShivamJoker/Ylight-Music
-
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.
fix the issue of wrong img art position
- Loading branch information
1 parent
b849bd5
commit 82c7c68
Showing
6 changed files
with
79 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
import React from "react"; | ||
|
||
import "typeface-roboto"; | ||
import { GlobalState } from "./GlobalState"; | ||
import { BrowserRouter as Router, Route } from "react-router-dom"; | ||
|
||
import SimpleAppBar from "./header/SimpleAppBar"; | ||
import MainPlayer from "./player/MainPlayer"; | ||
import SwipeMenu from "./SwipeMenu"; | ||
import CurrentSection from "./CurrentSection"; | ||
import SnackbarMessage from "./SnackbarMessage"; | ||
import { MuiThemeProvider, createMuiTheme } from "@material-ui/core/styles"; | ||
import { pink } from "@material-ui/core/colors"; | ||
|
||
import { useCheckDarkmode } from "./sections/SettingsPage"; | ||
import { GlobalContext } from "./GlobalState"; | ||
|
||
const body = document.querySelector("body"); | ||
|
||
const defaultTheme = { | ||
palette: { | ||
primary: pink, | ||
secondary: { | ||
main: "#fafafa" | ||
} | ||
}, | ||
typography: { | ||
useNextVariants: true | ||
} | ||
}; | ||
|
||
const darkTheme = { | ||
palette: { | ||
type: "dark", | ||
primary: pink, | ||
secondary: { | ||
main: "#fafafa" | ||
} | ||
}, | ||
typography: { | ||
useNextVariants: true | ||
} | ||
}; | ||
|
||
function App() { | ||
const muiDarkTheme = createMuiTheme(darkTheme); | ||
const muiDefaultTheme = createMuiTheme(defaultTheme); | ||
|
||
// this works i have just transfered AppContainer contents to here | ||
return ( | ||
<GlobalState> | ||
<MuiThemeProvider | ||
theme={themeSelectValue === "Dark" ? muiDarkTheme : muiDefaultTheme} | ||
> | ||
<Router> | ||
<SimpleAppBar /> | ||
<CurrentSection /> | ||
<Route path={"/"} component={MainPlayer} /> | ||
<SwipeMenu /> | ||
</Router> | ||
<SnackbarMessage /> | ||
</MuiThemeProvider> | ||
</GlobalState> | ||
); | ||
} | ||
|
||
export default App; |
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
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