mirror of
https://github.com/aljazceru/landscape-template.git
synced 2026-01-24 00:34:25 +01:00
Merge branch 'dev' into feature/list-your-product-ui
This commit is contained in:
@@ -52,7 +52,12 @@ export default function NavDesktop() {
|
||||
Projects
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<li className="relative">
|
||||
<Link to={'/hackathons'} className='text-body4 font-bold hover:text-primary-600'>
|
||||
Events
|
||||
</Link>
|
||||
</li>
|
||||
{/* <li>
|
||||
<Menu
|
||||
offsetY={28}
|
||||
menuButton={
|
||||
@@ -72,8 +77,7 @@ export default function NavDesktop() {
|
||||
className='!p-16 font-medium flex gap-16 hover:bg-gray-100 !rounded-12 '
|
||||
>
|
||||
<div className="bg-white border border-gray-100 w-48 h-48 rounded-full flex justify-center items-center">
|
||||
{/* <FiFeather className={`text-body1 inline-block text-primary-600 `} /> */}
|
||||
<span className="text-body2">✍🏼</span>
|
||||
<span className="text-body2">✍🏼</span>
|
||||
</div>
|
||||
<div>
|
||||
<p className="text-body4 text-black font-medium">
|
||||
@@ -121,7 +125,7 @@ export default function NavDesktop() {
|
||||
</div>
|
||||
</MenuItem>
|
||||
</Menu>
|
||||
</li>
|
||||
</li> */}
|
||||
<li className="relative">
|
||||
<a
|
||||
href={'https://bolt.fun/guide/'}
|
||||
|
||||
@@ -166,7 +166,15 @@ export default function NavMobile() {
|
||||
Projects
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<li className="relative">
|
||||
<Link
|
||||
to={'/hackathons'}
|
||||
onClick={() => toggleDrawerOpen(false)}
|
||||
className='text-body4 font-bold hover:text-primary-600'>
|
||||
Events
|
||||
</Link>
|
||||
</li>
|
||||
{/* <li>
|
||||
<button
|
||||
className='text-body4 font-bold hover:text-primary-600 w-full flex justify-between'
|
||||
onClick={() => toggleCommunityOpen()}
|
||||
@@ -237,7 +245,7 @@ export default function NavMobile() {
|
||||
</Link>
|
||||
</div>
|
||||
</motion.div>}
|
||||
</li>
|
||||
</li> */}
|
||||
<li className="relative">
|
||||
<a
|
||||
href={'https://bolt.fun/guide/'}
|
||||
|
||||
@@ -35,23 +35,21 @@ export default function HackathonsPage() {
|
||||
className={`page-container`}
|
||||
>
|
||||
<div className={`w-full`}>
|
||||
<div className="rounded-16 min-h-[280px] relative overflow-hidden p-16 md:p-24 flex flex-col items-start justify-end">
|
||||
<img
|
||||
className="w-full h-full object-cover object-center absolute top-0 left-0 z-[-2]"
|
||||
src={bannerData.img}
|
||||
alt=""
|
||||
/>
|
||||
<div className="w-full h-full object-cover bg-black bg-opacity-60 absolute top-0 left-0 z-[-1]"></div>
|
||||
<div className="max-w-[90%]">
|
||||
{bannerData.title}
|
||||
<Link to={createRoute({ type: "tournament", id: 1 })}>
|
||||
<div className="rounded-16 min-h-[280px] relative overflow-hidden p-16 md:p-24 flex flex-col items-start justify-end mb-24">
|
||||
<img
|
||||
className="w-full h-full object-cover object-center absolute top-0 left-0 z-[-2]"
|
||||
src={bannerData.img}
|
||||
alt=""
|
||||
/>
|
||||
<div className="w-full h-full object-cover bg-gradient-to-t from-gray-900 absolute top-0 left-0 z-[-1]"></div>
|
||||
<div className="max-w-[90%]">
|
||||
{bannerData.title}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Button href={bannerData.link.url} color="white" className="mt-24">
|
||||
{bannerData.link.content}
|
||||
</Button>
|
||||
</div>
|
||||
</Link>
|
||||
<div className="flex gap-16 flex-wrap my-24 justify-between">
|
||||
<h1 id='title' className="text-body1 lg:text-h2 font-bolder">Hackathons 🏆</h1>
|
||||
<h1 id='title' className="text-body1 lg:text-h2 font-bolder">{sortByFilter ? sortByFilter : "All"} Events</h1>
|
||||
<div className="self-center">
|
||||
<SortByFilter
|
||||
filterChanged={setSortByFilter}
|
||||
|
||||
@@ -14,7 +14,9 @@ import { FaDiscord } from 'react-icons/fa'
|
||||
import { FiArrowRight } from 'react-icons/fi'
|
||||
import { capitalize } from 'src/utils/helperFunctions'
|
||||
import { bannerData } from 'src/features/Projects/pages/ExplorePage/Header/Header'
|
||||
import { PAGES_ROUTES } from 'src/utils/routing'
|
||||
import { createRoute, PAGES_ROUTES } from 'src/utils/routing'
|
||||
import { Link } from 'react-router-dom'
|
||||
import { IoLocationOutline } from 'react-icons/io5'
|
||||
|
||||
|
||||
export default function FeedPage() {
|
||||
@@ -41,27 +43,25 @@ export default function FeedPage() {
|
||||
return (
|
||||
<>
|
||||
<Helmet>
|
||||
<title>{`Bolt.Fun Stories`}</title>
|
||||
<meta property="og:title" content={`Bolt.Fun Stories`} />
|
||||
<title>{`Bolt.Fun`}</title>
|
||||
<meta property="og:title" content={`Bolt.Fun`} />
|
||||
</Helmet>
|
||||
<div
|
||||
className={`page-container`}
|
||||
>
|
||||
<div className="rounded-16 min-h-[280px] relative overflow-hidden p-16 md:p-24 flex flex-col items-start justify-end mb-24">
|
||||
<img
|
||||
className="w-full h-full object-cover object-center absolute top-0 left-0 z-[-2]"
|
||||
src={bannerData.img}
|
||||
alt=""
|
||||
/>
|
||||
<div className="w-full h-full object-cover bg-black bg-opacity-60 absolute top-0 left-0 z-[-1]"></div>
|
||||
<div className="max-w-[90%]">
|
||||
{bannerData.title}
|
||||
<Link to={createRoute({ type: "tournament", id: 1 })}>
|
||||
<div className="rounded-16 min-h-[280px] relative overflow-hidden p-16 md:p-24 flex flex-col items-start justify-end mb-24">
|
||||
<img
|
||||
className="w-full h-full object-cover object-center absolute top-0 left-0 z-[-2]"
|
||||
src={bannerData.img}
|
||||
alt=""
|
||||
/>
|
||||
<div className="w-full h-full object-cover bg-gradient-to-t from-gray-900 absolute top-0 left-0 z-[-1]"></div>
|
||||
<div className="max-w-[90%]">
|
||||
{bannerData.title}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Button href={bannerData.link.url} color="white" className="mt-24">
|
||||
{bannerData.link.content}
|
||||
</Button>
|
||||
</div>
|
||||
</Link>
|
||||
<div className={`w-full ${styles.grid}`}>
|
||||
<div id="title">
|
||||
{tagFilter && <p className="text-body6 text-gray-500 font-medium mb-8">
|
||||
@@ -70,10 +70,8 @@ export default function FeedPage() {
|
||||
<span> {tagFilter.title}</span>
|
||||
</p>}
|
||||
<h1 className="text-h2 font-bolder">{
|
||||
tagFilter ?
|
||||
<>{tagFilter.icon} {capitalize(tagFilter.title)}</>
|
||||
:
|
||||
"Stories ✍🏼"
|
||||
tagFilter &&
|
||||
<>{tagFilter.icon} {capitalize(tagFilter.title)}</>
|
||||
}</h1>
|
||||
</div>
|
||||
<div id="sort-by">
|
||||
@@ -91,6 +89,7 @@ export default function FeedPage() {
|
||||
</div>
|
||||
<aside id='categories' className='no-scrollbar'>
|
||||
<div className="pb-16 md:overflow-y-scroll sticky-side-element">
|
||||
<h1 className="text-h2 font-bolder mb-24">Discover</h1>
|
||||
<Button
|
||||
href={PAGES_ROUTES.blog.writeStory}
|
||||
color='primary'
|
||||
@@ -110,28 +109,24 @@ export default function FeedPage() {
|
||||
<aside id='side' className='no-scrollbar'>
|
||||
<div className="pb-16 flex flex-col gap-24 overflow-y-auto sticky-side-element" >
|
||||
<TrendingCard />
|
||||
<div className='min-h-[300px] text-white flex flex-col justify-end p-24 rounded-12 relative overflow-hidden'
|
||||
style={{
|
||||
backgroundImage: `url(${bannerData.img})`,
|
||||
backgroundSize: 'cover',
|
||||
backgroundPosition: "left"
|
||||
}}
|
||||
>
|
||||
<div className="absolute bg-black inset-0 opacity-10"></div>
|
||||
<div className="relative flex flex-col gap-24">
|
||||
<div className="flex flex-col gap-8">
|
||||
{bannerData.title}
|
||||
<a href='https://discord.gg/HFqtxavb7x' target='_blank' rel="noreferrer">
|
||||
<div className='min-h-[248px] text-white flex flex-col justify-end p-24 rounded-12 relative overflow-hidden'
|
||||
style={{
|
||||
backgroundImage: `url("/assets/images/join-discord-card.jpg")`,
|
||||
backgroundSize: 'cover',
|
||||
backgroundPosition: "center"
|
||||
}}
|
||||
>
|
||||
<div className="absolute bg-black inset-0 opacity-10"></div>
|
||||
<div className="relative flex flex-col gap-24">
|
||||
<div className="flex flex-col gap-8 text-white">
|
||||
<img src={'assets/icons/join-discord.svg'} className='h-48 max-w-full self-start' alt="" />
|
||||
<p className="text-body2 font-bold">BOLT🔩FUN Discord</p>
|
||||
<p className="text-body4 font-medium">Join the Bolt.Fun Community Discord server and connect with other like minded developers!</p>
|
||||
</div>
|
||||
</div>
|
||||
<Button
|
||||
color='white'
|
||||
fullWidth
|
||||
href='https://discord.gg/HFqtxavb7x'
|
||||
newTab
|
||||
>
|
||||
<FaDiscord className='scale-125 mr-8' /> <span className="align-middle">Join in Discord</span>
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</aside>
|
||||
</div>
|
||||
|
||||
@@ -6,33 +6,24 @@ import CustomDot from "./CustomDot/CustomDot";
|
||||
import useEmblaCarousel from 'embla-carousel-react'
|
||||
import { useCallback, useEffect, useState } from "react";
|
||||
import { createRoute } from "src/utils/routing";
|
||||
import { IoLocationOutline } from "react-icons/io5";
|
||||
|
||||
export const bannerData = {
|
||||
title:
|
||||
<>
|
||||
<p className="text-body1 font-bolder text-white">Legends of Lightning ⚡️ Tournament</p>
|
||||
<p className="text-body3 font-medium text-white mt-8">1st Oct - 31st Nov, 2022</p>
|
||||
<p className="text-body3 font-medium text-white mt-8">12th Oct - 7th Dec, 2022</p>
|
||||
<p className="text-body4 text-white mt-8"><IoLocationOutline className="mr-8" /> Online</p>
|
||||
</>,
|
||||
img: "https://i.ibb.co/bRY635n/wide.png",
|
||||
img: "https://i.ibb.co/3S35g6T/wide.jpg",
|
||||
link: {
|
||||
content: "Register Now",
|
||||
url: createRoute({ type: "tournament", id: 1, tab: 'overview' }),
|
||||
url: createRoute({ type: "tournament", id: 1 }),
|
||||
},
|
||||
}
|
||||
|
||||
const headerLinks = [
|
||||
{
|
||||
title:
|
||||
<>
|
||||
<p className="text-body1 font-bolder text-white">Legends of Lightning ⚡️ Tournament</p>
|
||||
<p className="text-body3 font-medium text-white mt-8">1st Oct - 31st Nov, 2022</p>
|
||||
</>,
|
||||
img: "https://i.ibb.co/bRY635n/wide.png",
|
||||
link: {
|
||||
content: "Register Now",
|
||||
url: createRoute({ type: "tournament", id: 1, tab: 'overview' }),
|
||||
},
|
||||
},
|
||||
bannerData,
|
||||
{
|
||||
title: <p className="text-body1 font-bolder text-white">Explore a fun directory of lightning web apps</p>,
|
||||
img: Assets.Images_ExploreHeader1,
|
||||
@@ -76,22 +67,21 @@ export default function Header() {
|
||||
<div className="relative group">
|
||||
<div className="overflow-hidden" ref={emblaRef}>
|
||||
<div className="w-full flex gap-16">
|
||||
<div className="flex-[0_0_100%] rounded-20 min-h-[280px] relative overflow-hidden p-24 flex flex-col items-start justify-end">
|
||||
<div className="flex-[0_0_100%] md:flex-[0_0_calc(50%-8px)] rounded-20 h-[280px] relative overflow-hidden p-24 flex flex-col items-start justify-end">
|
||||
<img
|
||||
className="w-full h-full object-cover object-center absolute top-0 left-0 z-[-2]"
|
||||
src={bannerData.img}
|
||||
className="w-full h-full object-cover absolute top-0 left-0 z-[-2]"
|
||||
src={headerLinks[0].img}
|
||||
alt=""
|
||||
/>
|
||||
<div className="w-full h-full object-cover bg-gradient-to-tr from-gray-900 absolute top-0 left-0 z-[-1]"></div>
|
||||
<div className="w-full h-full object-cover bg-gradient-to-t from-gray-900 absolute top-0 left-0 z-[-1]"></div>
|
||||
<div className="max-w-[90%]">
|
||||
{bannerData.title}
|
||||
{headerLinks[0].title}
|
||||
</div>
|
||||
|
||||
<Button href={bannerData.link.url} color="white" className="mt-24">
|
||||
{bannerData.link.content}
|
||||
<Button color="white" href={headerLinks[0].link.url} className="mt-24">
|
||||
{headerLinks[0].link.content}
|
||||
</Button>
|
||||
</div>
|
||||
{/* <div className="flex-[0_0_100%] md:flex-[0_0_calc(50%-8px)] rounded-20 h-[280px] relative overflow-hidden p-24 flex flex-col items-start justify-end">
|
||||
<div className="flex-[0_0_100%] md:flex-[0_0_calc(50%-8px)] rounded-20 h-[280px] relative overflow-hidden p-24 flex flex-col items-start justify-end">
|
||||
<img
|
||||
className="w-full h-full object-cover absolute top-0 left-0 z-[-2]"
|
||||
src={headerLinks[1].img}
|
||||
@@ -104,7 +94,7 @@ export default function Header() {
|
||||
<Button color="white" href={headerLinks[1].link.url} newTab={headerLinks[1].link.newTab} className="mt-24">
|
||||
{headerLinks[1].link.content}
|
||||
</Button>
|
||||
</div> */}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="absolute inset-x-0 bottom-8 flex justify-center gap-4 md:hidden">
|
||||
|
||||
@@ -19,7 +19,7 @@ export default function OverviewPage() {
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-24 items-start">
|
||||
<div className='md:col-span-2'>
|
||||
<div
|
||||
className={`text-gray-600 mt-16 prose `}
|
||||
className={`text-gray-600 prose `}
|
||||
dangerouslySetInnerHTML={{ __html: DOMPurify.sanitize(marked.parse(tournamentDetails.description)) }}
|
||||
>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import React from 'react'
|
||||
import { Tournament } from 'src/graphql'
|
||||
import styles from './styles.module.scss'
|
||||
|
||||
@@ -20,17 +19,31 @@ export default function PrizesSection({ prizes }: Props) {
|
||||
<h3 className="text-body2 text-gray-900 font-bolder">{track.title}</h3>
|
||||
<p className="text-body4 text-gray-500">{track.description}</p>
|
||||
</div>
|
||||
<div className={`text-right ${styles.prizes}`}>
|
||||
<div className={`md:text-right ${styles.prizes}`}>
|
||||
{/* One Prize */}
|
||||
{track.prizes.length === 1 &&
|
||||
<div>
|
||||
<h4 className='text-[32px]'>{track.prizes[0].title}</h4>
|
||||
<p className='text-[118px]' data-attr={trackNumber + 1}>{track.prizes[0].amount}</p>
|
||||
<h4 className='text-[32px] leading-[1em]'>{track.prizes[0].title}</h4>
|
||||
<p className='text-[118px] leading-[1em]' data-attr={trackNumber + 1}>{track.prizes[0].amount}</p>
|
||||
</div>
|
||||
}
|
||||
{/* Four Prizez */}
|
||||
|
||||
{/* Two Prizes */}
|
||||
{track.prizes.length === 2 &&
|
||||
<div className='flex flex-col gap-40'>
|
||||
<div>
|
||||
<h4 className='text-[32px] leading-[1em]'>{track.prizes[0].title}</h4>
|
||||
<p className='text-[72px] leading-[1em]' data-attr={trackNumber + 1}>{track.prizes[0].amount}</p>
|
||||
</div>
|
||||
<div>
|
||||
<h4 className='text-[20px] leading-[1em]'>{track.prizes[1].title}</h4>
|
||||
<p className='text-[36px] leading-[1em]' data-attr={trackNumber + 1}>{track.prizes[1].amount}</p>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
{/* Four Prizes */}
|
||||
{track.prizes.length === 4 &&
|
||||
<div className='flex justify-end flex-wrap gap-40'>
|
||||
<div className='flex md:justify-end flex-wrap gap-40'>
|
||||
{track.prizes.map((prize, idx) => <div key={prize.id} className='first:w-full'>
|
||||
<h4 className={`${idx === 0 ? "text-h2" : "text-body2"}`}>{prize.title}</h4>
|
||||
<p className={`${idx === 0 ? "text-[48px]" : "text-[36px]"}`} data-attr={trackNumber + 1}>{prize.amount}</p>
|
||||
@@ -69,13 +82,18 @@ const data = {
|
||||
id: 1,
|
||||
title: "the legend",
|
||||
amount: "1 BTC"
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
title: "Runners UP x2",
|
||||
amount: "0.5 BTC"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
title: "Bitcoin Adoption Track",
|
||||
description: "On-chain applications have been the bed rock of bitcoin’s explosive growth and adoption over the last decade. Slowly, steadily, and securely, bitcoin’s base layer always seeks to evolve and improve.",
|
||||
title: "Global Adoption Track",
|
||||
description: "This prize track is aimed at solving issues surrounding the global adoption of bitcoin - focusing on scalability, and product market fit. Makers can let their imaginations run wild with either lightning or on-chain technology, as well as driving adoption either via online or locally based solutions.",
|
||||
image: "https://s3-alpha-sig.figma.com/img/cb90/77b4/5ea853a671d0cb1c64bde10dd8955d39?Expires=1664755200&Signature=aXtIhKJg58wRTQlJIGWxpfCN2hxJx8L0~8Hu5aH8LKUVAYrxSV5Tvvxevx9xDnf-RpjTVfB6D7RKuVQjfIiftB4Ym80oOlW9tNzYUo991cJhdYnqaGzJ6Ht2kF7NHmxbiY5RUMYj8bGf2AF1A2a7wuW~DaqHyLQ0s2sszwH2EAv31QTH1DAOO97pQzQ5asas7qGjARWh45QEfw6F8e~6iq3UWHXtIcJ0HMJO4q3ONhsMkuC6XQNfAmWTRwKb3tPZ79oehWgDeyOMGQkRS0uaal~6fNkheEN5DuRBH2dbXtqB6va0PJCTB1l8P558HXhKQjHXRLPPReIci72jPuTzdA__&Key-Pair-Id=APKAINTVSUGEWH5XD5UA",
|
||||
prizes: [
|
||||
{
|
||||
@@ -102,8 +120,8 @@ const data = {
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
title: "Building for Africa track",
|
||||
description: "With ~1.4bn inhabitants, Africa is ripe for bitcoin adoption. In partnership with ABC 22, this track seeks to encourage makers to build solutions that are local to the African continent.",
|
||||
title: "Building for Africa",
|
||||
description: "With an estimated population of ~1.4bn inhabitants, Africa has poised itself as ripe for bitcoin adoption. In partnership with the African Bitcoin Conference 22, this track seeks to encourage makers to build solutions that solve local challenges & increase bitcoin adoption in Africa.",
|
||||
image: "https://s3-alpha-sig.figma.com/img/c306/f172/7ce7befa9414372e6d0ede739be46de8?Expires=1664755200&Signature=BBfOTJzk7Si7zs9dOBhTdIhoKCvUDxAr6Do0wCZaIq9PD2Jcfxu3ANbiogzihC5O2Rwz3sKsajsRCd8eSs8HGrHrQh89SfNIl0~MYjMz12yWpsc1vC5M5hmXH~VQzCTOWsSki9BimcpCu0IOWfJFjY-p0rlo8UFhdDe56DiRUOSW0pAm5UxTstzOew6X015xA3qQWwUIea2JAtlsI5RqMQMRB-QlaKFlQvYHBU6YzLUNTuTn4MfOd-1oZXKtDArubYnSrJb2rJAXqccxgsXceDl8jq8HXKwkBR95-sG3UDZB7q7qb1Nk3HlsDtirGNlOjLx~vDKpOuyIk5ufAkdJmQ__&Key-Pair-Id=APKAINTVSUGEWH5XD5UA",
|
||||
prizes: [
|
||||
{
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
@include gt-md {
|
||||
h4 {
|
||||
-webkit-text-stroke: 0.06em black;
|
||||
-webkit-text-stroke: calc(max(1.4px, 0.06em)) black;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,11 +47,11 @@ export default function RegisterCard({ makers_count, start_date, avatars, isRegi
|
||||
return (
|
||||
<Card onlyMd className='flex flex-col gap-24 md:!border'>
|
||||
<div>
|
||||
{makers_count > 2 && <p className="text-body5 text-gray-600 flex">
|
||||
{makers_count > 2 && <p className="text-body5 text-gray-600 flex mb-16">
|
||||
{avatars.map((img, idx) => <div className='w-[16px] h-32 relative'><Avatar key={idx} src={img} width={32} className='absolute top-0 left-0 min-w-[32px] !border-white' /></div>)}
|
||||
<span className='self-center ml-24 font-medium '>+ {makers_count} makers</span>
|
||||
</p>}
|
||||
<Button color={isRegistered ? 'gray' : "primary"} disabled={isRegistered} fullWidth className='mt-16' onClick={onRegister}>{isRegistered ? "Registered!" : "Register Now"}</Button>
|
||||
<Button color={isRegistered ? 'gray' : "primary"} disabled={isRegistered} fullWidth onClick={onRegister}>{isRegistered ? "Registered!" : "Register Now"}</Button>
|
||||
<Button color={"gray"} href={'https://discord.gg/HFqtxavb7x'} newTab fullWidth className='mt-8 !text-primary-500'><FaDiscord /> <span className="align-middle ml-4">Join the Discord</span></Button>
|
||||
|
||||
</div>
|
||||
@@ -79,10 +79,48 @@ export default function RegisterCard({ makers_count, start_date, avatars, isRegi
|
||||
</div>
|
||||
<div>
|
||||
<p className="text-body5 text-gray-900 font-medium">
|
||||
Sponsored by
|
||||
In partnership with
|
||||
</p>
|
||||
<img src={'/assets/images/logos/fulgur_logo.svg'} alt="Fulgur Ventures Logo" className='max-h-48 mt-16 ' />
|
||||
<div className="flex flex-wrap gap-x-8 gap-y-8 mt-16">
|
||||
{partners.map((p, idx) => <a key={idx} href={p.link}><Avatar src={p.image} width={48} /> </a>)}
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
)
|
||||
}
|
||||
|
||||
const partners = [
|
||||
{
|
||||
link: "https://fulgur.ventures/",
|
||||
image: "https://i.ibb.co/9gZFQ4d/fulgur.webp",
|
||||
},
|
||||
{
|
||||
link: "https://breez.technology/",
|
||||
image: "https://i.ibb.co/6stx8tC/breez.webp",
|
||||
},
|
||||
{
|
||||
link: "https://bitcoin.design/",
|
||||
image: "https://i.ibb.co/cgY6zy2/bitcoin-design.jpg",
|
||||
},
|
||||
{
|
||||
link: "https://www.afrobitcoin.org/",
|
||||
image: "https://i.ibb.co/qDZYrGz/Screenshot-2022-09-14-at-17-03-47.jpg",
|
||||
},
|
||||
{
|
||||
link: "https://2022.tabconf.com/",
|
||||
image: "https://i.ibb.co/zFGVqvV/tab-conf.jpg",
|
||||
},
|
||||
{
|
||||
link: "https://adoptingbitcoin.org/2022/",
|
||||
image: "https://i.ibb.co/HdvRbxQ/Screenshot-2022-09-14-at-17-06-33.jpg",
|
||||
},
|
||||
{
|
||||
link: "https://geyser.fund/",
|
||||
image: "https://i.ibb.co/tp6L5bt/geyser.jpg",
|
||||
},
|
||||
{
|
||||
link: "https://opensats.org/",
|
||||
image: "https://i.ibb.co/b5y29TL/open-sats.jpg",
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ import advancedFormat from 'dayjs/plugin/advancedFormat'
|
||||
import React from 'react'
|
||||
import { Helmet } from 'react-helmet'
|
||||
import { IoLocationOutline } from 'react-icons/io5'
|
||||
import { getSpanDate } from 'src/utils/helperFunctions'
|
||||
import { useTournament } from '../TournamentDetailsContext'
|
||||
dayjs.extend(advancedFormat)
|
||||
|
||||
@@ -24,7 +25,7 @@ export default function Header() {
|
||||
<div className='flex flex-col gap-4'>
|
||||
<p className="text-body6">TOURNAMENT 🏆</p>
|
||||
<p className="text-body1 md:text-h2 font-bold">{tournamentDetails.title}</p>
|
||||
<p className="text-body3"> {`${dayjs(tournamentDetails.start_date).format('Do')} - ${dayjs(tournamentDetails.end_date).format('Do MMMM, YYYY')}`}</p>
|
||||
<p className="text-body3">{getSpanDate(tournamentDetails.start_date, tournamentDetails.end_date)}</p>
|
||||
|
||||
<p className='text-body5'><IoLocationOutline className="mr-8" /> {tournamentDetails.location}</p>
|
||||
</div>
|
||||
|
||||
@@ -165,4 +165,20 @@ export async function lightningAddressToPR(address: string, amount_in_sat: numbe
|
||||
.then((prResponse) => {
|
||||
return prResponse.data.pr as string;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export const getSpanDate = (_date1: string, _date2: string) => {
|
||||
const date1 = new Date(_date1);
|
||||
const date2 = new Date(_date2);
|
||||
|
||||
const isSameMonth = date1.getMonth() === date2.getMonth();
|
||||
if (!isSameMonth)
|
||||
return `${dayjs(_date1).format('Do MMM')} - ${dayjs(_date2).format('Do MMM')}`
|
||||
|
||||
const isSameDay = date1.getDay() === date2.getDay();
|
||||
if (!isSameDay)
|
||||
return `${dayjs(_date1).format('Do')} - ${dayjs(_date2).format('Do MMM')}`
|
||||
// Same Day
|
||||
return `${dayjs(_date1).format('H:mm')} - ${dayjs(_date2).format('H:mm, Do MMM')}`
|
||||
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ type RouteOptions =
|
||||
| {
|
||||
type: "tournament",
|
||||
id: string | number
|
||||
tab: 'overview' | 'events' | 'makers' | 'projects'
|
||||
tab?: 'overview' | 'events' | 'makers' | 'projects'
|
||||
}
|
||||
|
||||
export function createRoute(options: RouteOptions) {
|
||||
@@ -80,7 +80,7 @@ export function createRoute(options: RouteOptions) {
|
||||
|
||||
|
||||
if (options.type === 'tournament')
|
||||
return `/tournaments/${options.id}/${options.tab}`
|
||||
return `/tournaments/${options.id}` + (options.tab ? `/${options.tab}` : "")
|
||||
|
||||
if (options.type === 'edit-project')
|
||||
return `/projects/list-project` + (options.id ? `?id=${options.id}` : '')
|
||||
|
||||
Reference in New Issue
Block a user