mirror of
https://github.com/aljazceru/landscape-template.git
synced 2026-01-19 14:24:28 +01:00
fix; markdown in faqs, makers filters for contacts
This commit is contained in:
@@ -5,18 +5,19 @@ import { MEDIA_QUERIES } from "src/utils/theme/media_queries";
|
||||
import CustomDot from "./CustomDot/CustomDot";
|
||||
import useEmblaCarousel from 'embla-carousel-react'
|
||||
import { useCallback, useEffect, useState } from "react";
|
||||
import { createRoute } from "src/utils/routing";
|
||||
|
||||
const headerLinks = [
|
||||
{
|
||||
title:
|
||||
<>
|
||||
<p className="text-body1 font-bolder text-white">The Long Night tournament is coming!!!</p>
|
||||
<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://imagedelivery.net/wyrwp3c-j0gDDUWgnE7lig/1d5d2c86-fe46-4478-6909-bb3c425c0d00/public",
|
||||
link: {
|
||||
content: "Register Now",
|
||||
url: "/tournaments/12",
|
||||
url: createRoute({ type: "tournament", id: 1, tab: 'overview' }),
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import DOMPurify from 'dompurify';
|
||||
import { marked } from 'marked';
|
||||
import React, { useMemo } from 'react'
|
||||
import Accordion from 'src/Components/Accordion/Accordion';
|
||||
import { Tournament } from 'src/graphql'
|
||||
@@ -7,6 +9,7 @@ interface Props {
|
||||
}
|
||||
|
||||
|
||||
|
||||
export default function FAQsSection({ faqs }: Props) {
|
||||
|
||||
|
||||
@@ -14,7 +17,13 @@ export default function FAQsSection({ faqs }: Props) {
|
||||
<div>
|
||||
<h2 className='text-body1 font-bolder text-gray-900 mb-4'>FAQs</h2>
|
||||
<Accordion
|
||||
items={faqs.map(faq => ({ heading: faq.question, content: <p className='whitespace-pre-line'>{faq.answer}</p> }))}
|
||||
items={faqs.map(faq => ({
|
||||
heading: faq.question, content: <div
|
||||
className={`text-gray-600 prose `}
|
||||
dangerouslySetInnerHTML={{ __html: DOMPurify.sanitize(marked.parse(faq.answer)) }}
|
||||
>
|
||||
</div>
|
||||
}))}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -47,10 +47,10 @@ export default function RegisterCard({ makers_count, start_date, avatars, isRegi
|
||||
return (
|
||||
<Card onlyMd className='flex flex-col gap-24'>
|
||||
<div>
|
||||
<p className="text-body5 text-gray-600 flex">
|
||||
{makers_count > 4 && <p className="text-body5 text-gray-600 flex">
|
||||
{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>
|
||||
</p>}
|
||||
<Button color='primary' disabled={isRegistered} fullWidth className='mt-16' onClick={onRegister}>{isRegistered ? "Registered!" : "Register Now"}</Button>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
@@ -47,7 +47,7 @@ export default function Navigation() {
|
||||
<div className="w-full bg-white py-16 border-b border-gray-200 sticky-top-element z-10">
|
||||
<div className="relative group content-container">
|
||||
<div className="overflow-hidden" ref={viewportRef}>
|
||||
<div className="select-none w-full flex gap-16">
|
||||
<div className="select-none w-full flex gap-8 md:gap-16">
|
||||
{links.map((link) => <NavLink
|
||||
key={link.path}
|
||||
to={link.path}
|
||||
|
||||
@@ -706,6 +706,7 @@ export type Vote = {
|
||||
|
||||
export type WalletKey = {
|
||||
__typename?: 'WalletKey';
|
||||
createdAt: Scalars['Date'];
|
||||
is_current: Scalars['Boolean'];
|
||||
key: Scalars['String'];
|
||||
name: Scalars['String'];
|
||||
|
||||
@@ -164,12 +164,14 @@ export const users: (User & MyProfile)[] = [{
|
||||
{
|
||||
key: "1645h234j2421zxvertw",
|
||||
name: "My Alby wallet key",
|
||||
is_current: true
|
||||
is_current: true,
|
||||
createdAt: new Date(2022, 6, 2).toISOString(),
|
||||
},
|
||||
{
|
||||
key: "66345134234235",
|
||||
name: "My Phoenix wallet key",
|
||||
is_current: false
|
||||
is_current: false,
|
||||
createdAt: new Date(2022, 6, 2).toISOString()
|
||||
},],
|
||||
roles: randomItems(3, ...allMakersRoles).map(role => ({ ...role, level: randomItem(...Object.values(RoleLevelEnum)) })),
|
||||
skills: randomItems(7, ...allMakersSkills),
|
||||
@@ -200,12 +202,14 @@ export const users: (User & MyProfile)[] = [{
|
||||
{
|
||||
key: "1645h234j2421zxvertw",
|
||||
name: "My Alby wallet key",
|
||||
is_current: true
|
||||
is_current: true,
|
||||
createdAt: new Date(2022, 6, 2).toISOString(),
|
||||
},
|
||||
{
|
||||
key: "66345134234235",
|
||||
name: "My Phoenix wallet key",
|
||||
is_current: false
|
||||
is_current: false,
|
||||
createdAt: new Date(2022, 6, 2).toISOString()
|
||||
},],
|
||||
roles: randomItems(3, ...allMakersRoles).map(role => ({ ...role, level: randomItem(...Object.values(RoleLevelEnum)) })),
|
||||
skills: randomItems(7, ...allMakersSkills),
|
||||
@@ -235,12 +239,14 @@ export const users: (User & MyProfile)[] = [{
|
||||
{
|
||||
key: "1645h234j2421zxvertw",
|
||||
name: "My Alby wallet key",
|
||||
is_current: true
|
||||
is_current: true,
|
||||
createdAt: new Date(2022, 6, 2).toISOString(),
|
||||
},
|
||||
{
|
||||
key: "66345134234235",
|
||||
name: "My Phoenix wallet key",
|
||||
is_current: false
|
||||
is_current: false,
|
||||
createdAt: new Date(2022, 6, 2).toISOString()
|
||||
},],
|
||||
roles: randomItems(3, ...allMakersRoles).map(role => ({ ...role, level: randomItem(...Object.values(RoleLevelEnum)) })),
|
||||
skills: randomItems(7, ...allMakersSkills),
|
||||
@@ -270,12 +276,14 @@ export const users: (User & MyProfile)[] = [{
|
||||
{
|
||||
key: "1645h234j2421zxvertw",
|
||||
name: "My Alby wallet key",
|
||||
is_current: true
|
||||
is_current: true,
|
||||
createdAt: new Date(2022, 6, 2).toISOString(),
|
||||
},
|
||||
{
|
||||
key: "66345134234235",
|
||||
name: "My Phoenix wallet key",
|
||||
is_current: false
|
||||
is_current: false,
|
||||
createdAt: new Date(2022, 6, 2).toISOString()
|
||||
},],
|
||||
roles: randomItems(3, ...allMakersRoles).map(role => ({ ...role, level: randomItem(...Object.values(RoleLevelEnum)) })),
|
||||
skills: randomItems(7, ...allMakersSkills),
|
||||
|
||||
Reference in New Issue
Block a user