[#754,landing page][s]: fix build errors
This commit is contained in:
parent
b3293625a4
commit
43cc641d1d
@ -47,8 +47,11 @@ export default function Features() {
|
||||
CKAN.
|
||||
</p>
|
||||
<div className="not-prose my-12 grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3">
|
||||
{features.map((feature) => (
|
||||
<div className="group relative rounded-xl border border-slate-200 dark:border-slate-800">
|
||||
{features.map((feature, i) => (
|
||||
<div
|
||||
key={`feature-${i}`}
|
||||
className="group relative rounded-xl border border-slate-200 dark:border-slate-800"
|
||||
>
|
||||
<div className="absolute -inset-px rounded-xl border-2 border-transparent opacity-0 [background:linear-gradient(var(--quick-links-hover-bg,theme(colors.sky.50)),var(--quick-links-hover-bg,theme(colors.sky.50)))_padding-box,linear-gradient(to_top,theme(colors.blue.300),theme(colors.blue.400),theme(colors.blue.500))_border-box] group-hover:opacity-100 dark:[--quick-links-hover-bg:theme(colors.slate.800)]" />
|
||||
<div className="relative overflow-hidden rounded-xl p-6">
|
||||
<img src={feature.icon} alt="" className="h-24 w-auto" />
|
||||
|
||||
@ -57,7 +57,7 @@ export default function Layout({
|
||||
title?: string;
|
||||
tableOfContents?;
|
||||
}) {
|
||||
const { toc } = children.props;
|
||||
// const { toc } = children.props;
|
||||
|
||||
const currentSection = useTableOfContents(tableOfContents);
|
||||
|
||||
@ -94,7 +94,7 @@ export default function Layout({
|
||||
</a>
|
||||
</footer>
|
||||
{/** TABLE OF CONTENTS */}
|
||||
{tableOfContents.length > 0 && (toc ?? siteConfig.tableOfContents) && (
|
||||
{tableOfContents.length > 0 && (siteConfig.tableOfContents) && (
|
||||
<div className="hidden xl:fixed xl:right-0 xl:top-[4.5rem] xl:block xl:w-1/5 xl:h-[calc(100vh-4.5rem)] xl:flex-none xl:overflow-y-auto xl:py-16 xl:pr-6 xl:mb-16">
|
||||
<nav aria-labelledby="on-this-page-title" className="w-56">
|
||||
<h2 className="font-display text-md font-medium text-slate-900 dark:text-white">
|
||||
|
||||
@ -58,15 +58,13 @@ export default function NavItem({ item }) {
|
||||
onMouseLeave={closeDropdown}
|
||||
>
|
||||
{item.subItems.map((subItem) => (
|
||||
// TODO: check the onClick error below
|
||||
// onClick does not exist on Menu.Item
|
||||
<Menu.Item
|
||||
key={subItem.name}
|
||||
onClick={() => setshowDropdown(false)}
|
||||
>
|
||||
>
|
||||
<BaseLink
|
||||
href={subItem.href}
|
||||
className="text-slate-500 inline-flex items-center mt-2 px-1 pt-1 text-sm font-medium hover:text-slate-600"
|
||||
onClick={() => setshowDropdown(false)}
|
||||
>
|
||||
{subItem.name}
|
||||
</BaseLink>
|
||||
|
||||
@ -19,12 +19,13 @@ export default function DRDPage({ source, frontMatter }) {
|
||||
const [tableOfContents, setTableOfContents] = useState([]);
|
||||
|
||||
useEffect(() => {
|
||||
const headingNodes = document.querySelectorAll('h2,h3');
|
||||
const headingNodes = document.querySelectorAll(
|
||||
'h2,h3'
|
||||
) as NodeListOf<HTMLHeadingElement>;
|
||||
const toc = collectHeadings(headingNodes);
|
||||
setTableOfContents(toc ?? []);
|
||||
}, [router.asPath]); // update table of contents on route change with next/link
|
||||
|
||||
|
||||
return (
|
||||
<Layout tableOfContents={tableOfContents} title={frontMatter.title}>
|
||||
<MDXPage source={source} frontMatter={frontMatter} />
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user