|
|
@ -11,51 +11,9 @@ import { BackButton } from '@components/back-button'; |
|
|
|
import Head from 'next/head'; |
|
|
|
import { MDContents } from '@components/mdx/md-contents'; |
|
|
|
export { getStaticProps, getStaticPaths } from '@common/data/faq'; |
|
|
|
import { slugify } from '@common/utils'; |
|
|
|
import { slugify, getSlug } from '@common/utils'; |
|
|
|
import { PageTop } from '@components/page-top'; |
|
|
|
|
|
|
|
const getBetterNames = (id: number) => { |
|
|
|
switch (id) { |
|
|
|
case 360007620914: |
|
|
|
return { |
|
|
|
title: 'General information', |
|
|
|
description: 'General questions about Blockstack and the Stacks network', |
|
|
|
img: '/images/pages/testnet.svg', |
|
|
|
}; |
|
|
|
case 360007411853: |
|
|
|
return { |
|
|
|
title: 'Stacks Token', |
|
|
|
description: 'Questions relating to the native token of Stacks 2.0', |
|
|
|
img: '/images/pages/mining.svg', |
|
|
|
}; |
|
|
|
case 360007760554: |
|
|
|
return { |
|
|
|
title: 'Stacks blockchain', |
|
|
|
description: 'Learn about the blockchain and details of Stacks 2.0', |
|
|
|
img: '/images/pages/hello-world.svg', |
|
|
|
}; |
|
|
|
case 360007781533: |
|
|
|
return { |
|
|
|
title: 'Ecosystem details', |
|
|
|
description: 'Questions related to the age of the project and the contributors', |
|
|
|
img: '/images/pages/data-storage.svg', |
|
|
|
}; |
|
|
|
case 360007780033: |
|
|
|
return { |
|
|
|
title: 'Building apps', |
|
|
|
description: 'Learn about the platform and questions related to decentralized applications', |
|
|
|
img: '/images/pages/connect.svg', |
|
|
|
}; |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
const getSlug = (asPath: string) => { |
|
|
|
if (asPath.includes('#')) { |
|
|
|
const slug = asPath.split('#')[1]; |
|
|
|
return slug; |
|
|
|
} |
|
|
|
return; |
|
|
|
}; |
|
|
|
import { getBetterNames } from '@common/utils/faqs'; |
|
|
|
|
|
|
|
const FAQItem = React.memo(({ faq, ...rest }: any) => { |
|
|
|
const id = slugify(faq.title); |
|
|
@ -80,7 +38,7 @@ const FAQItem = React.memo(({ faq, ...rest }: any) => { |
|
|
|
}, |
|
|
|
})} |
|
|
|
> |
|
|
|
<Components.h4 my="0px !important" color="currentColor"> |
|
|
|
<Components.h4 my="0px !important" id={id} color="currentColor"> |
|
|
|
{faq.title} |
|
|
|
</Components.h4> |
|
|
|
<Box color={color('text-caption')} pl={space('base-loose')}> |
|
|
|