Skip to content

Commit

Permalink
refactor: add wallpaper component
Browse files Browse the repository at this point in the history
  • Loading branch information
henriquespecian committed Oct 25, 2023
1 parent cabaee6 commit 20b549f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
14 changes: 14 additions & 0 deletions components/wallpaper.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { createGlobalStyle } from '@xstyled/styled-components';

const WallpaperStyle = createGlobalStyle`
body {
background: url("/image/wallpaper_flower.png") no-repeat center center fixed;
background-size: cover;
}
`;

export default function Wallpaper(){
return (
<WallpaperStyle />
);
}
8 changes: 1 addition & 7 deletions pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { isMobileDevice } from '../utils/mobile';
import FlipClockCountdown from '@leenguyen/react-flip-clock-countdown';
import '@leenguyen/react-flip-clock-countdown/dist/index.css';
import DesktopIcons from '../components/desktopIcons'
import Wallpaper from '../components/wallpaper';

const InsideModal = styled(Frame)`
text-align: center;
Expand All @@ -33,13 +34,6 @@ const InsideModal = styled(Frame)`
box-shadow: none;
`;

const Wallpaper = createGlobalStyle`
body {
background: url( ${getImagePath("/image/wallpaper_flower.png")}) no-repeat center center fixed;
background-size: cover;
}
`;

export default function Home() {
/* Spotify Modal */
const [showSpotifyModal, setShowSpotifyModal] = useState(false);
Expand Down

0 comments on commit 20b549f

Please sign in to comment.