mirror of
https://github.com/aljazceru/landscape-template.git
synced 2026-01-10 01:44:29 +01:00
Merge branch 'dev' into feature/list-your-product-ui
This commit is contained in:
@@ -23,12 +23,19 @@ const getEventsExtraData = async (req, res) => {
|
||||
select: {
|
||||
id: true,
|
||||
avatar: true,
|
||||
avatar_rel: {
|
||||
select: {
|
||||
url: true,
|
||||
}
|
||||
},
|
||||
name: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
comments.map(c => c.user.avatar = c.user.avatar_rel?.url ?? c.user.avatar)
|
||||
|
||||
return res
|
||||
.status(200)
|
||||
.json(comments)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
const { PrismaClient } = require('@prisma/client');
|
||||
const { PrismaClient } = require('@prisma/client/edge');
|
||||
const createGlobalModule = require('../utils/createGlobalModule');
|
||||
|
||||
|
||||
const createPrismaClient = () => {
|
||||
console.log("New Prisma Client");
|
||||
return new PrismaClient({
|
||||
|
||||
68
package-lock.json
generated
68
package-lock.json
generated
@@ -11,7 +11,7 @@
|
||||
"@apollo/client": "^3.6.9",
|
||||
"@hookform/resolvers": "^2.8.8",
|
||||
"@noble/secp256k1": "^1.6.3",
|
||||
"@prisma/client": "^3.12.0",
|
||||
"@prisma/client": "^4.3.1",
|
||||
"@react-hookz/web": "^13.2.1",
|
||||
"@react-spring/web": "^9.4.4",
|
||||
"@reduxjs/toolkit": "^1.8.1",
|
||||
@@ -68,7 +68,6 @@
|
||||
"nostr-tools": "^0.23.4",
|
||||
"passport": "^0.6.0",
|
||||
"passport-lnurl-auth": "^1.5.0",
|
||||
"prisma": "^3.12.0",
|
||||
"qrcode.react": "^3.0.2",
|
||||
"react": "^18.0.0",
|
||||
"react-accessible-accordion": "^5.0.0",
|
||||
@@ -136,6 +135,7 @@
|
||||
"msw": "^0.39.2",
|
||||
"netlify-cli": "^10.0.0",
|
||||
"postcss": "^8.4.12",
|
||||
"prisma": "^4.3.1",
|
||||
"readable-stream": "^4.1.0",
|
||||
"serverless": "^3.22.0",
|
||||
"serverless-offline": "^8.7.0",
|
||||
@@ -5144,15 +5144,15 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@prisma/client": {
|
||||
"version": "3.12.0",
|
||||
"resolved": "https://registry.npmjs.org/@prisma/client/-/client-3.12.0.tgz",
|
||||
"integrity": "sha512-4NEQjUcWja/NVBvfuDFscWSk1/rXg3+wj+TSkqXCb1tKlx/bsUE00rxsvOvGg7VZ6lw1JFpGkwjwmsOIc4zvQw==",
|
||||
"version": "4.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@prisma/client/-/client-4.3.1.tgz",
|
||||
"integrity": "sha512-FA0/d1VMJNWqzU7WVWTNWJ+lGOLR9JUBnF73GdIPAEVo/6dWk4gHx0EmgeU+SMv4MZoxgOeTBJF2azhg7x0hMw==",
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"@prisma/engines-version": "3.12.0-37.22b822189f46ef0dc5c5b503368d1bee01213980"
|
||||
"@prisma/engines-version": "4.3.0-32.c875e43600dfe042452e0b868f7a48b817b9640b"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.6"
|
||||
"node": ">=14.17"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"prisma": "*"
|
||||
@@ -5164,15 +5164,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@prisma/engines": {
|
||||
"version": "3.12.0-37.22b822189f46ef0dc5c5b503368d1bee01213980",
|
||||
"resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-3.12.0-37.22b822189f46ef0dc5c5b503368d1bee01213980.tgz",
|
||||
"integrity": "sha512-zULjkN8yhzS7B3yeEz4aIym4E2w1ChrV12i14pht3ePFufvsAvBSoZ+tuXMvfSoNTgBS5E4bolRzLbMmbwkkMQ==",
|
||||
"version": "4.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-4.3.1.tgz",
|
||||
"integrity": "sha512-4JF/uMaEDAPdcdZNOrnzE3BvrbGpjgV0FcPT3EVoi6I86fWkloqqxBt+KcK/+fIRR0Pxj66uGR9wVH8U1Y13JA==",
|
||||
"devOptional": true,
|
||||
"hasInstallScript": true
|
||||
},
|
||||
"node_modules/@prisma/engines-version": {
|
||||
"version": "3.12.0-37.22b822189f46ef0dc5c5b503368d1bee01213980",
|
||||
"resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-3.12.0-37.22b822189f46ef0dc5c5b503368d1bee01213980.tgz",
|
||||
"integrity": "sha512-o+jo8d7ZEiVpcpNWUDh3fj2uPQpBxl79XE9ih9nkogJbhw6P33274SHnqheedZ7PyvPIK/mvU8MLNYgetgXPYw=="
|
||||
"version": "4.3.0-32.c875e43600dfe042452e0b868f7a48b817b9640b",
|
||||
"resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-4.3.0-32.c875e43600dfe042452e0b868f7a48b817b9640b.tgz",
|
||||
"integrity": "sha512-8yWpXkQRmiSfsi2Wb/ZS5D3RFbeu/btL9Pm/gdF4phB0Lo5KGsDFMxFMgaD64mwED2nHc8ZaEJg/+4Jymb9Znw=="
|
||||
},
|
||||
"node_modules/@protobufjs/aspromise": {
|
||||
"version": "1.1.2",
|
||||
@@ -61195,19 +61196,20 @@
|
||||
}
|
||||
},
|
||||
"node_modules/prisma": {
|
||||
"version": "3.12.0",
|
||||
"resolved": "https://registry.npmjs.org/prisma/-/prisma-3.12.0.tgz",
|
||||
"integrity": "sha512-ltCMZAx1i0i9xuPM692Srj8McC665h6E5RqJom999sjtVSccHSD8Z+HSdBN2183h9PJKvC5dapkn78dd0NWMBg==",
|
||||
"version": "4.3.1",
|
||||
"resolved": "https://registry.npmjs.org/prisma/-/prisma-4.3.1.tgz",
|
||||
"integrity": "sha512-90xo06wtqil76Xsi3mNpc4Js3SdDRR5g4qb9h+4VWY4Y8iImJY6xc3PX+C9xxTSt1lr0Q89A0MLkJjd8ax6KiQ==",
|
||||
"devOptional": true,
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"@prisma/engines": "3.12.0-37.22b822189f46ef0dc5c5b503368d1bee01213980"
|
||||
"@prisma/engines": "4.3.1"
|
||||
},
|
||||
"bin": {
|
||||
"prisma": "build/index.js",
|
||||
"prisma2": "build/index.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.6"
|
||||
"node": ">=14.17"
|
||||
}
|
||||
},
|
||||
"node_modules/prismjs": {
|
||||
@@ -74782,22 +74784,23 @@
|
||||
"integrity": "sha512-9X2obfABZuDVLCgPK9aX0a/x4jaOEweTTWE2+9sr0Qqqevj2Uv5XorvusThmc9XGYpS9yI+fhh8RTafBtGposw=="
|
||||
},
|
||||
"@prisma/client": {
|
||||
"version": "3.12.0",
|
||||
"resolved": "https://registry.npmjs.org/@prisma/client/-/client-3.12.0.tgz",
|
||||
"integrity": "sha512-4NEQjUcWja/NVBvfuDFscWSk1/rXg3+wj+TSkqXCb1tKlx/bsUE00rxsvOvGg7VZ6lw1JFpGkwjwmsOIc4zvQw==",
|
||||
"version": "4.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@prisma/client/-/client-4.3.1.tgz",
|
||||
"integrity": "sha512-FA0/d1VMJNWqzU7WVWTNWJ+lGOLR9JUBnF73GdIPAEVo/6dWk4gHx0EmgeU+SMv4MZoxgOeTBJF2azhg7x0hMw==",
|
||||
"requires": {
|
||||
"@prisma/engines-version": "3.12.0-37.22b822189f46ef0dc5c5b503368d1bee01213980"
|
||||
"@prisma/engines-version": "4.3.0-32.c875e43600dfe042452e0b868f7a48b817b9640b"
|
||||
}
|
||||
},
|
||||
"@prisma/engines": {
|
||||
"version": "3.12.0-37.22b822189f46ef0dc5c5b503368d1bee01213980",
|
||||
"resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-3.12.0-37.22b822189f46ef0dc5c5b503368d1bee01213980.tgz",
|
||||
"integrity": "sha512-zULjkN8yhzS7B3yeEz4aIym4E2w1ChrV12i14pht3ePFufvsAvBSoZ+tuXMvfSoNTgBS5E4bolRzLbMmbwkkMQ=="
|
||||
"version": "4.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-4.3.1.tgz",
|
||||
"integrity": "sha512-4JF/uMaEDAPdcdZNOrnzE3BvrbGpjgV0FcPT3EVoi6I86fWkloqqxBt+KcK/+fIRR0Pxj66uGR9wVH8U1Y13JA==",
|
||||
"devOptional": true
|
||||
},
|
||||
"@prisma/engines-version": {
|
||||
"version": "3.12.0-37.22b822189f46ef0dc5c5b503368d1bee01213980",
|
||||
"resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-3.12.0-37.22b822189f46ef0dc5c5b503368d1bee01213980.tgz",
|
||||
"integrity": "sha512-o+jo8d7ZEiVpcpNWUDh3fj2uPQpBxl79XE9ih9nkogJbhw6P33274SHnqheedZ7PyvPIK/mvU8MLNYgetgXPYw=="
|
||||
"version": "4.3.0-32.c875e43600dfe042452e0b868f7a48b817b9640b",
|
||||
"resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-4.3.0-32.c875e43600dfe042452e0b868f7a48b817b9640b.tgz",
|
||||
"integrity": "sha512-8yWpXkQRmiSfsi2Wb/ZS5D3RFbeu/btL9Pm/gdF4phB0Lo5KGsDFMxFMgaD64mwED2nHc8ZaEJg/+4Jymb9Znw=="
|
||||
},
|
||||
"@protobufjs/aspromise": {
|
||||
"version": "1.1.2",
|
||||
@@ -117804,11 +117807,12 @@
|
||||
"dev": true
|
||||
},
|
||||
"prisma": {
|
||||
"version": "3.12.0",
|
||||
"resolved": "https://registry.npmjs.org/prisma/-/prisma-3.12.0.tgz",
|
||||
"integrity": "sha512-ltCMZAx1i0i9xuPM692Srj8McC665h6E5RqJom999sjtVSccHSD8Z+HSdBN2183h9PJKvC5dapkn78dd0NWMBg==",
|
||||
"version": "4.3.1",
|
||||
"resolved": "https://registry.npmjs.org/prisma/-/prisma-4.3.1.tgz",
|
||||
"integrity": "sha512-90xo06wtqil76Xsi3mNpc4Js3SdDRR5g4qb9h+4VWY4Y8iImJY6xc3PX+C9xxTSt1lr0Q89A0MLkJjd8ax6KiQ==",
|
||||
"devOptional": true,
|
||||
"requires": {
|
||||
"@prisma/engines": "3.12.0-37.22b822189f46ef0dc5c5b503368d1bee01213980"
|
||||
"@prisma/engines": "4.3.1"
|
||||
}
|
||||
},
|
||||
"prismjs": {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"@apollo/client": "^3.6.9",
|
||||
"@hookform/resolvers": "^2.8.8",
|
||||
"@noble/secp256k1": "^1.6.3",
|
||||
"@prisma/client": "^3.12.0",
|
||||
"@prisma/client": "^4.3.1",
|
||||
"@react-hookz/web": "^13.2.1",
|
||||
"@react-spring/web": "^9.4.4",
|
||||
"@reduxjs/toolkit": "^1.8.1",
|
||||
@@ -63,7 +63,6 @@
|
||||
"nostr-tools": "^0.23.4",
|
||||
"passport": "^0.6.0",
|
||||
"passport-lnurl-auth": "^1.5.0",
|
||||
"prisma": "^3.12.0",
|
||||
"qrcode.react": "^3.0.2",
|
||||
"react": "^18.0.0",
|
||||
"react-accessible-accordion": "^5.0.0",
|
||||
@@ -188,6 +187,7 @@
|
||||
"msw": "^0.39.2",
|
||||
"netlify-cli": "^10.0.0",
|
||||
"postcss": "^8.4.12",
|
||||
"prisma": "^4.3.1",
|
||||
"readable-stream": "^4.1.0",
|
||||
"serverless": "^3.22.0",
|
||||
"serverless-offline": "^8.7.0",
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "Project" ADD COLUMN "contact_email" TEXT;
|
||||
@@ -1,6 +1,6 @@
|
||||
datasource db {
|
||||
provider = "postgresql"
|
||||
url = env("DATABASE_URL")
|
||||
url = env("DATABASE_PROXY_URL")
|
||||
}
|
||||
|
||||
generator client {
|
||||
@@ -137,6 +137,7 @@ model Project {
|
||||
github String?
|
||||
telegram String?
|
||||
slack String?
|
||||
contact_email String?
|
||||
thumbnail_image String?
|
||||
thumbnail_image_id Int? @unique
|
||||
thumbnail_image_rel HostedImage? @relation("Project_Thumbnail", fields: [thumbnail_image_id], references: [id])
|
||||
|
||||
4
public/assets/icons/join-discord.svg
Normal file
4
public/assets/icons/join-discord.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<svg width="175" height="48" viewBox="0 0 175 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M25.5464 20.1655C24.176 20.1655 23.0942 21.3435 23.0942 22.81C23.0942 24.2765 24.2001 25.4545 25.5464 25.4545C26.9167 25.4545 27.9985 24.2765 27.9985 22.81C27.9985 21.3435 26.8927 20.1655 25.5464 20.1655ZM16.7715 20.1655C15.4012 20.1655 14.3193 21.3435 14.3193 22.81C14.3193 24.2765 15.4252 25.4545 16.7715 25.4545C18.1418 25.4545 19.2236 24.2765 19.2236 22.81C19.2477 21.3435 18.1418 20.1655 16.7715 20.1655Z" fill="white"/>
|
||||
<path d="M37.2302 0.163574H5.01558C2.29897 0.163574 0.0872192 2.37532 0.0872192 5.09193V37.3065C0.0872192 40.0231 2.29897 42.2349 5.01558 42.2349H32.2778L31.0036 37.8354L34.0809 40.6722L36.9898 43.3408L42.1826 47.8364V5.09193C42.1586 2.37532 39.9468 0.163574 37.2302 0.163574ZM27.9505 31.2964C27.9505 31.2964 27.085 30.2626 26.3638 29.3731C29.5131 28.4836 30.7152 26.5363 30.7152 26.5363C29.7295 27.1854 28.7919 27.6422 27.9505 27.9547C26.7484 28.4595 25.5945 28.7721 24.4646 28.9884C22.1566 29.4212 20.0411 29.301 18.238 28.9644C16.8677 28.7 15.6897 28.3393 14.704 27.9306C14.1511 27.7143 13.55 27.4498 12.949 27.1133C12.8769 27.0652 12.8048 27.0411 12.7327 26.9931C12.6846 26.969 12.6605 26.945 12.6365 26.945C12.2038 26.7046 11.9634 26.5363 11.9634 26.5363C11.9634 26.5363 13.1173 28.4355 16.1705 29.3491C15.4493 30.2626 14.5598 31.3204 14.5598 31.3204C9.24675 31.1521 7.22733 27.6902 7.22733 27.6902C7.22733 20.0212 10.6892 13.7947 10.6892 13.7947C14.1511 11.2223 17.4206 11.2944 17.4206 11.2944L17.661 11.5829C13.3337 12.809 11.3623 14.7082 11.3623 14.7082C11.3623 14.7082 11.8912 14.4197 12.7807 14.0351C15.3531 12.9052 17.3966 12.6167 18.238 12.5205C18.3822 12.4965 18.5024 12.4724 18.6467 12.4724C20.1132 12.2801 21.772 12.232 23.5029 12.4244C25.7868 12.6888 28.239 13.3619 30.7392 14.7082C30.7392 14.7082 28.84 12.9052 24.753 11.6791L25.0896 11.2944C25.0896 11.2944 28.3832 11.2223 31.821 13.7947C31.821 13.7947 35.2829 20.0212 35.2829 27.6902C35.2829 27.6662 33.2635 31.1281 27.9505 31.2964ZM64.252 10.453H56.2705V19.4202L61.5835 24.2043V15.5016H64.4203C66.2234 15.5016 67.1129 16.367 67.1129 17.7614V24.4207C67.1129 25.8151 66.2714 26.7526 64.4203 26.7526H56.2465V31.8252H64.228C68.5072 31.8493 72.522 29.7097 72.522 24.8053V17.6412C72.5461 12.6407 68.5313 10.453 64.252 10.453V10.453ZM106.083 24.8053V17.4489C106.083 14.8044 110.843 14.2034 112.285 16.8479L116.685 15.0688C114.954 11.2704 111.805 10.1645 109.184 10.1645C104.905 10.1645 100.674 12.6407 100.674 17.4489V24.8053C100.674 29.6616 104.905 32.0897 109.088 32.0897C111.781 32.0897 115.002 30.7675 116.781 27.3056L112.069 25.1419C110.915 28.0989 106.083 27.3777 106.083 24.8053V24.8053ZM91.5383 18.4586C89.8795 18.098 88.7736 17.497 88.7015 16.4632C88.7976 13.987 92.6201 13.8908 94.8559 16.2709L98.3899 13.5543C96.1782 10.8617 93.6779 10.1405 91.1056 10.1405C87.1869 10.1405 83.3885 12.3522 83.3885 16.5353C83.3885 20.5982 86.5138 22.7859 89.9516 23.3148C91.7066 23.5552 93.6539 24.2524 93.6058 25.4544C93.4616 27.7383 88.7496 27.6181 86.6099 25.0217L83.1962 28.2191C85.1915 30.7915 87.9081 32.0897 90.4565 32.0897C94.3751 32.0897 98.7265 29.8299 98.8948 25.6949C99.1352 20.478 95.3367 19.1558 91.5383 18.4586V18.4586ZM75.431 31.8012H80.8161V10.453H75.431V31.8012ZM166.233 10.453H158.251V19.4202L163.564 24.2043V15.5016H166.401C168.204 15.5016 169.094 16.367 169.094 17.7614V24.4207C169.094 25.8151 168.252 26.7526 166.401 26.7526H158.227V31.8252H166.233C170.512 31.8493 174.527 29.7097 174.527 24.8053V17.6412C174.527 12.6407 170.512 10.453 166.233 10.453V10.453ZM127.071 10.1645C122.647 10.1645 118.248 12.5686 118.248 17.497V24.7813C118.248 29.6616 122.671 32.1137 127.119 32.1137C131.542 32.1137 135.942 29.6616 135.942 24.7813V17.497C135.942 12.5926 131.494 10.1645 127.071 10.1645V10.1645ZM130.532 24.7813C130.532 26.3199 128.801 27.1133 127.095 27.1133C125.364 27.1133 123.633 26.368 123.633 24.7813V17.497C123.633 15.9343 125.316 15.0929 126.998 15.0929C128.753 15.0929 130.532 15.8381 130.532 17.497V24.7813ZM155.27 17.497C155.15 12.4965 151.736 10.4771 147.337 10.4771H138.802V31.8252H144.26V25.0458H145.221L150.174 31.8252H156.905L151.087 24.4928C153.66 23.6754 155.27 21.4396 155.27 17.497V17.497ZM147.433 20.3818H144.26V15.5016H147.433C150.823 15.5016 150.823 20.3818 147.433 20.3818Z" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.2 KiB |
BIN
public/assets/images/join-discord-card.jpg
Normal file
BIN
public/assets/images/join-discord-card.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
@@ -41,6 +41,7 @@
|
||||
content="%PUBLIC_URL%/assets/images/og-thumbnail.jpg"
|
||||
data-react-helmet="true"
|
||||
/>
|
||||
<script defer data-domain="makers.bolt.fun" src="https://plausible.io/js/plausible.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
|
||||
@@ -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