From a73412d1957d55ed6410265c04852b2b22d30cbc Mon Sep 17 00:00:00 2001 From: James Ritchie Date: Fri, 15 Apr 2022 15:36:22 +0100 Subject: [PATCH] Added a github star banner on the homepage --- app/components/Home/HomeGithubBanner.tsx | 13 +++++++++++++ app/components/UI/GithubStar.tsx | 8 ++++++-- app/routes/index.tsx | 2 ++ 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 app/components/Home/HomeGithubBanner.tsx diff --git a/app/components/Home/HomeGithubBanner.tsx b/app/components/Home/HomeGithubBanner.tsx new file mode 100644 index 0000000..0203739 --- /dev/null +++ b/app/components/Home/HomeGithubBanner.tsx @@ -0,0 +1,13 @@ +import { Body } from "../Primitives/Body"; +import { GithubStar } from "../UI/GithubStar"; + +export function GithubBanner() { + return ( +
+
+ Star us on Github 👉 + +
+
+ ); +} diff --git a/app/components/UI/GithubStar.tsx b/app/components/UI/GithubStar.tsx index e1d9489..5a2a77a 100644 --- a/app/components/UI/GithubStar.tsx +++ b/app/components/UI/GithubStar.tsx @@ -2,14 +2,18 @@ import { GithubIcon } from "../Icons/GithubIcon"; import { Body } from "../Primitives/Body"; import { useStarCount } from "../StarCountProvider"; -export function GithubStar() { +export type GithubStarProps = { + className?: string; +}; + +export function GithubStar({ className }: GithubStarProps) { const starCount = useStarCount(); return (
diff --git a/app/routes/index.tsx b/app/routes/index.tsx index fbfd175..dbbb8cc 100644 --- a/app/routes/index.tsx +++ b/app/routes/index.tsx @@ -6,12 +6,14 @@ import { HomeHeroSection } from "~/components/Home/HomeHeroSection"; import { HomeInfoBoxSection } from "~/components/Home/HomeInfoBoxSection"; import { HomeSearchSection } from "~/components/Home/HomeSearchSection"; import { HomeFooter } from "~/components/Home/HomeFooter"; +import { GithubBanner } from "~/components/Home/HomeGithubBanner"; export default function Index() { return (
+