Skip to content

Commit

Permalink
change screenshot theme with app theme
Browse files Browse the repository at this point in the history
Signed-off-by: Vu Van Dung <joulev.vvd@yahoo.com>
  • Loading branch information
joulev committed Apr 23, 2022
1 parent 7efaecb commit b2eff9c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions packages/client/components/home/sections/banner.tsx
Expand Up @@ -2,14 +2,16 @@ import clsx from "clsx";
import Image from "next/image";
import { FC, useRef } from "react";

import useCurrentTheme from "@client/lib/getCurrentTheme";

import A from "@client/components/anchor";

import imageApp from "@client/public/images/home/app-screenshot.png";
import logoTextWhite from "@client/public/images/logo-text-white.svg";

const HomeBanner: FC = () => {
const bannerRef = useRef<HTMLDivElement>(null);
const appScreenshotRef = useRef<HTMLDivElement>(null);
const theme = useCurrentTheme();
return (
<section className="relative text-white px-6 sm:px-10 mb-36">
<div
Expand Down Expand Up @@ -60,7 +62,13 @@ const HomeBanner: FC = () => {
</A>
</p>
<div ref={appScreenshotRef}>
<Image src={imageApp} alt="Screenshot" width={2442} height={1702} layout="responsive" />
<Image
src={theme === "dark" ? "/images/home/app-dark.png" : "/images/home/app-light.png"}
alt="Screenshot"
width={2216}
height={1674}
layout="responsive"
/>
</div>
</div>
</section>
Expand Down
Binary file added packages/client/public/images/home/app-dark.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/client/public/images/home/app-light.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.

0 comments on commit b2eff9c

Please sign in to comment.