diff --git a/faq.mdx b/faq.mdx index aef3c89d..ba7ef443 100644 --- a/faq.mdx +++ b/faq.mdx @@ -1,11 +1,11 @@ - + We strongly prefer joining an existing reputable foundation over creating a new one. Stay tuned for additional details in the coming week. - + Under a well-known and widely-accepted license that companies can trus, that won’t suddenly change in the future, and isn’t subhect to the whims of a singe @@ -15,7 +15,7 @@ of a singe vendor. - + How do you know you're not competing with HashiCorp? @@ -31,7 +31,7 @@ In short, the BUSL is a poison pill for the entire Terraform community. - + Terraform was under the MPL license for ~9 years. This created an understanding—an implicit contract—that Terraform is open-source and you can use it for just about anything you want. Based on that understanding, tens of thousands of developers adopted the tool and contributed back to it. HashiCorp even had all contributors sign a CLA which explicitly said ([link to the CLA in the Internet Archive as HashiCorp](https://web.archive.org/web/20230610041432/https://www.hashicorp.com/cla) has of course removed this wording): @@ -45,7 +45,7 @@ The OpenTF manifesto is about _undoing_ those changes! It's about going back to - + When any company releases their tool as open source, the contract with the community is always the same: Anyone can use this code, but we the creators hold a privileged position of being at the epicenter of the ecosystem. Vendors then compete to offer the best solution, and the creators enjoy a unique competitive advantage. diff --git a/src/components/Accordion/Item.tsx b/src/components/Accordion/Item.tsx index a8346f6f..64871391 100644 --- a/src/components/Accordion/Item.tsx +++ b/src/components/Accordion/Item.tsx @@ -6,12 +6,13 @@ type AccordionItemProps = { summary: string; open?: boolean; highlight?: boolean; + id: string }; -const AccordionItem = ({ summary, open, children }: AccordionItemProps) => { +const AccordionItem = ({ summary, open, children, id }: AccordionItemProps) => { const detailsRef = useRef(null); const location = useLocation(); - + const hashEnabled = location.pathname === '/faq' const handleItemClick = () => { document.querySelectorAll("details.accordion-item").forEach((item) => { if (item !== detailsRef.current) { @@ -19,16 +20,20 @@ const AccordionItem = ({ summary, open, children }: AccordionItemProps) => { } }); + if(!hashEnabled) { + return; + } + if (decodeURI(location.hash) === `#${summary}`) { // Hash at the end disables ability to open automaticaly first FAQ item window.location.replace(`${location.pathname}#`); } else { - window.location.replace(`${location.pathname}#${encodeURI(summary)}`); + window.location.replace(`${location.pathname}#${encodeURI(id)}`); } }; useEffect(() => { - if (decodeURI(location.hash) === `#${summary}`) { + if (decodeURI(location.hash) === `#${id}` && hashEnabled) { document.querySelectorAll("details.accordion-item").forEach((item) => { if (item !== detailsRef.current) { item.removeAttribute("open");