1- import React , { useState } from 'react' ;
1+ import React , { useState } from 'react' ;
22import AppBar from '@material-ui/core/AppBar' ;
33import Toolbar from '@material-ui/core/Toolbar' ;
44import Typography from '@material-ui/core/Typography' ;
55import CssBaseline from '@material-ui/core/CssBaseline' ;
66import useScrollTrigger from '@material-ui/core/useScrollTrigger' ;
77import Container from '@material-ui/core/Container' ;
8- import { IconButton , Paper } from " @material-ui/core" ;
9- import { createMuiTheme , ThemeProvider } from " @material-ui/core/styles" ;
8+ import { IconButton , Paper } from ' @material-ui/core' ;
9+ import { createMuiTheme , ThemeProvider } from ' @material-ui/core/styles' ;
1010import { dashConstants } from '../../config/constants' ;
11- import { LightTheme , DarkTheme } from " ../../util/themes/GlobalThemes"
12- import { getAppBarStyles } from " ../../util/styles/componentStyles"
13- import MoonIcon from '../../moon.svg' ;
14- import LightIcon from " ../../sun.svg"
11+ import { LightTheme , DarkTheme } from ' ../../util/themes/GlobalThemes' ;
12+ import { getAppBarStyles } from ' ../../util/styles/componentStyles' ;
13+ import MoonIcon from '../../assets/ moon.svg' ;
14+ import LightIcon from ' ../../assets/ sun.svg' ;
1515import Home from '../Pages/Home' ;
1616
1717function ElevationScroll ( props ) {
@@ -31,29 +31,64 @@ function ElevationScroll(props) {
3131}
3232
3333function Dashboard ( props ) {
34- const [ isDark , setIsDark ] = useState ( false ) ;
35- const theme = isDark ? createMuiTheme ( DarkTheme ) : createMuiTheme ( LightTheme )
36- const classes = getAppBarStyles ( )
34+ const [ isDark , setIsDark ] = useState ( false ) ;
35+ const theme = isDark
36+ ? createMuiTheme ( DarkTheme )
37+ : createMuiTheme ( LightTheme ) ;
38+ const classes = getAppBarStyles ( ) ;
3739
38- function handleThemeChange ( ) {
39- setIsDark ( ! isDark )
40- }
40+ function handleThemeChange ( ) {
41+ setIsDark ( ! isDark ) ;
42+ }
4143 return (
4244 < React . Fragment >
4345 < ThemeProvider theme = { theme } >
4446 < Paper >
4547 < CssBaseline />
4648 < ElevationScroll { ...props } >
47- < AppBar >
48- < Toolbar className = { classes . root } >
49- < Typography variant = "h6" className = { classes . title } > { dashConstants . APP_NAME } </ Typography >
50- < IconButton className = { classes . themeIcon } onClick = { handleThemeChange } > { < img alt = "Theme Icon" src = { isDark ? LightIcon : MoonIcon } /> } </ IconButton >
51- </ Toolbar >
52- </ AppBar >
49+ < AppBar >
50+ < Toolbar className = { classes . root } >
51+ < Typography
52+ variant = 'h6'
53+ className = { classes . title }
54+ >
55+ { dashConstants . APP_NAME }
56+ </ Typography >
57+ < IconButton >
58+ < a
59+ href = 'https://www.producthunt.com/posts/dynamic-github-profile-readme-quotes?utm_source=badge-featured& utm_medium = badge & utm_souce = badge - dynamic-github-profile-readme-quotes '
60+ target = '_blank'
61+ rel = 'noreferrer'
62+ >
63+ < img
64+ src = 'https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=276934& theme = light '
65+ alt = 'Dynamic GitHub Profile Readme Quotes - Everlasting Poetic Touch to GitHub Profiles for everyone | Product Hunt'
66+ style = { {
67+ width : ' 250px' ,
68+ height : '54px' ,
69+ } }
70+ width = '250'
71+ height = '54'
72+ />
73+ </ a >
74+ </ IconButton >
75+ < IconButton
76+ className = { classes . themeIcon }
77+ onClick = { handleThemeChange }
78+ >
79+ {
80+ < img
81+ alt = 'Theme Icon'
82+ src = { isDark ? LightIcon : MoonIcon }
83+ />
84+ }
85+ </ IconButton >
86+ </ Toolbar >
87+ </ AppBar >
5388 </ ElevationScroll >
5489 < Toolbar />
55- < Container style = { { backgroundColor :'white' } } >
56- < Home />
90+ < Container style = { { backgroundColor : 'white' } } >
91+ < Home />
5792 </ Container >
5893 </ Paper >
5994 </ ThemeProvider >
0 commit comments