diff --git a/packages/backend/.sample.env b/packages/backend/.sample.env deleted file mode 100644 index c6c4e03e..00000000 --- a/packages/backend/.sample.env +++ /dev/null @@ -1,10 +0,0 @@ -# Firebase emulator -FIRESTORE_EMULATOR_HOST=localhost:8080 -# vs. Firebase live -# GOOGLE_APPLICATION_CREDENTIALS="/home/user/Downloads/service-account-file.json" - -# Ethereum RPC URL -# RPC_URL="https://mainnet.infura.io/v3/xxx" - -# APIKEY for communicating with BG /api services -# API_KEY=XXXXXX diff --git a/packages/react-app/components/BuildCard.jsx b/packages/react-app/components/BuildCard.jsx index 279be1a1..89c81b8e 100644 --- a/packages/react-app/components/BuildCard.jsx +++ b/packages/react-app/components/BuildCard.jsx @@ -24,6 +24,7 @@ import { getBuildDeleteSignMessage, deleteBuild } from "../data/api"; import SubmitBuildModal from "./SubmitBuildModal"; import { USER_ROLES } from "../helpers/constants"; import BuildLikeButton from "./BuildLikeButton"; +import HackathonWinner from "./HackathonWinner"; const BuildCard = ({ build, userProvider, userRole, onUpdate }) => { const address = useUserAddress(userProvider); @@ -148,6 +149,9 @@ const BuildCard = ({ build, userProvider, userRole, onUpdate }) => { likesAmount={build?.likes?.length ?? 0} onLike={onUpdate} /> + {build.hackathonWinner && ( + + )} {canEditBuild && ( diff --git a/packages/react-app/components/HackathonWinner.jsx b/packages/react-app/components/HackathonWinner.jsx new file mode 100644 index 00000000..e07d5bda --- /dev/null +++ b/packages/react-app/components/HackathonWinner.jsx @@ -0,0 +1,17 @@ +import React from 'react'; +import BadgeIcon from "./icons/BadgeIcon"; +import { Button, Icon, Tooltip } from "@chakra-ui/react"; + +const HackathonWinner = ({ message }) => { + if (!message) return; + + return ( + + + + ) +} + +export default HackathonWinner; \ No newline at end of file diff --git a/packages/react-app/components/icons/BadgeIcon.jsx b/packages/react-app/components/icons/BadgeIcon.jsx new file mode 100644 index 00000000..7bed83e4 --- /dev/null +++ b/packages/react-app/components/icons/BadgeIcon.jsx @@ -0,0 +1,22 @@ +/* eslint react/jsx-props-no-spreading: off */ +// ☝️ we want this component to be usable with chakra props +import React from "react"; +import { chakra } from "@chakra-ui/react"; + +const BadgeIcon = props => ( + + + +); + +export default BadgeIcon; \ No newline at end of file diff --git a/packages/react-app/pages/build/[buildId].jsx b/packages/react-app/pages/build/[buildId].jsx index eca5bf74..9770ef1f 100644 --- a/packages/react-app/pages/build/[buildId].jsx +++ b/packages/react-app/pages/build/[buildId].jsx @@ -11,6 +11,7 @@ import useConnectedAddress from "../../hooks/useConnectedAddress"; import { getYoutubeVideoId } from "../../helpers/strings"; import { useRouter } from "next/router"; import MetaSeo from "../../components/MetaSeo"; +import HackathonWinner from "../../components/HackathonWinner"; export default function BuildDetailView({ build }) { const address = useConnectedAddress(); @@ -82,6 +83,7 @@ export default function BuildDetailView({ build }) { likesAmount={build.likes?.length ?? 0} onLike={refreshData} /> + );