From 9f309d3f75d16838d76f88953a43f3bced134363 Mon Sep 17 00:00:00 2001 From: Aman Varshney Date: Fri, 27 Mar 2026 01:17:33 +0530 Subject: [PATCH 1/3] feat: DR-7746 terms of service page Add static terms of service page to apps/site migrated from the old website. Uses Eclipse accordion UI primitives with expand all / print controls in a sticky sidebar layout matching the original design. --- .../app/terms/_components/terms-accordion.tsx | 114 +++ apps/site/src/app/terms/page.tsx | 35 + apps/site/src/data/terms.tsx | 674 ++++++++++++++++++ 3 files changed, 823 insertions(+) create mode 100644 apps/site/src/app/terms/_components/terms-accordion.tsx create mode 100644 apps/site/src/app/terms/page.tsx create mode 100644 apps/site/src/data/terms.tsx diff --git a/apps/site/src/app/terms/_components/terms-accordion.tsx b/apps/site/src/app/terms/_components/terms-accordion.tsx new file mode 100644 index 0000000000..848c85da7b --- /dev/null +++ b/apps/site/src/app/terms/_components/terms-accordion.tsx @@ -0,0 +1,114 @@ +"use client"; + +import { useState } from "react"; +import type { ReactNode } from "react"; +import { cn } from "@/lib/cn"; + +type Section = { + title: string; + content: ReactNode; +}; + +function AccordionItem({ + section, + isOpen, + onToggle, +}: { + section: Section; + isOpen: boolean; + onToggle: () => void; +}) { + const anchorId = section.title.trim().toLowerCase().replace(/\s+/g, "-"); + + return ( +
+ + {isOpen && ( +
+ {section.content} +
+ )} +
+ ); +} + +export function TermsAccordion({ sections }: { sections: Section[] }) { + const [expandAll, setExpandAll] = useState(false); + const [selected, setSelected] = useState(0); + + const toggleAll = () => { + if (expandAll) { + setSelected(-1); + setExpandAll(false); + } else { + setExpandAll(true); + } + }; + + const toggleItem = (idx: number) => { + if (expandAll) setExpandAll(false); + setSelected(selected === idx ? -1 : idx); + }; + + const printPage = () => { + setExpandAll(true); + setTimeout(() => window.print(), 50); + }; + + return ( + <> + {/* Controls — sticky sidebar on desktop, horizontal row on mobile */} +
+ + +
+ + {/* Accordion content */} +
+ {sections.map((section, idx) => ( + toggleItem(idx)} + /> + ))} +
+ + ); +} diff --git a/apps/site/src/app/terms/page.tsx b/apps/site/src/app/terms/page.tsx new file mode 100644 index 0000000000..73c4818647 --- /dev/null +++ b/apps/site/src/app/terms/page.tsx @@ -0,0 +1,35 @@ +import type { Metadata } from "next"; +import { termsSections, termsLastUpdated } from "@/data/terms"; +import { TermsAccordion } from "./_components/terms-accordion"; + +export const metadata: Metadata = { + title: "Terms of Service | Prisma", + description: + "Read the Prisma Terms of Service governing your use of Prisma products and services.", +}; + +export default function TermsPage() { + return ( +
+ {/* Hero */} +
+

+ Terms of Service +

+

+ Last updated: {termsLastUpdated} +

+
+ + {/* Separator */} +
+
+
+ + {/* Content */} +
+ +
+
+ ); +} diff --git a/apps/site/src/data/terms.tsx b/apps/site/src/data/terms.tsx new file mode 100644 index 0000000000..de3339ecbd --- /dev/null +++ b/apps/site/src/data/terms.tsx @@ -0,0 +1,674 @@ +import type { ReactNode } from "react"; + +export const termsLastUpdated = "October 15, 2024"; + +type TermsSection = { + title: string; + content: ReactNode; +}; + +export const termsSections: TermsSection[] = [ + { + title: "1. Your Agreement with Prisma", + content: ( + <> +

+ Your use of the Prisma service is governed by this agreement (the + "Terms"). "Prisma" means Prisma Data, Inc and its + subsidiaries or affiliates involved in providing the Prisma Service. + The "Prisma Service" means the services Prisma makes + available through this website, including the website itself, the + Prisma cloud computing platform, the Prisma API, add-ons, and any + other software or services offered by Prisma, including Early Access + releases. +

+

+ "Free Tier" refers to the no-cost access tier of the Prisma + Services, which provides limited usage and features as detailed on the + pricing page. Prisma reserves the right to modify the scope, + availability, and features of the Free Tier at any time without prior + notice. +

+

+ In order to use the Prisma Services, you must first agree to the + Terms. You can agree to the Terms by actually using the Prisma + Services. You understand and agree that Prisma will treat your use of + the Prisma Services as acceptance of the Terms from that point onwards. +

+

+ You may not use the Prisma Services if (a) you are not of legal age to + form a binding contract with Prisma, or (b) you are a person barred + from receiving the Prisma Services under the laws of the United States + or other countries including the country in which you are resident or + from which you use the Prisma Services. +

+

+ You acknowledge that any purchases made are not contingent upon the + delivery of any future functionality or features. +

+

+ Early Access products or features are provided "as is" and + may contain bugs, errors, or other issues. They are subject to + significant changes during the development period, and any data stored + during this period may be wiped upon the conclusion of the Early Access + phase. Prisma Optimize is intended for testing and development purposes + only and should not be used in production environments due to potential + data loss risks. +

+ + ), + }, + { + title: "2. Your Account and Use of the Prisma Services", + content: ( + <> +

+ You must provide accurate and complete registration information any + time you register to use the Prisma Services. You are responsible for + the security of your passwords and for any use of your account. If you + become aware of any unauthorized use of your password or of your + account, you agree to notify Prisma immediately. +

+

+ Your use of the Prisma Services must comply with all applicable laws, + regulations and ordinances, including any laws regarding the export of + data or software. +

+

+ You agree not to (a) access the administrative interface of the Prisma + Services by any means other than through the interface that is provided + by Prisma in connection with the Prisma Services, unless you have been + specifically allowed to do so in a separate agreement with Prisma, or + (b) engage in any activity that interferes with or disrupts the Prisma + Services (or the servers and networks which are connected to the + Service). +

+

+ You may use the Prisma Services only to develop and run applications + on the Prisma infrastructure. You may not use the Prisma Services for + the purpose of bringing an intellectual property infringement claim + against Prisma or for the purpose of creating a product or service + competitive with the Prisma Services. +

+ + ), + }, + { + title: "3. Service Policies and Privacy", + content: ( + <> +

+ The Prisma Services shall be subject to the privacy policy. You agree + to the use of your data in accordance with Prisma's privacy + policies. +

+

+ You agree to protect the privacy and legal rights of the end users of + your application. You must obtain necessary consents under applicable + data protection laws, and provide adequate privacy notices disclosing + information about end-user data visibility to your applications and to + Prisma. +

+

+ Usage data from Early Access products may be used to support + improvements and bug fixes. +

+ + ), + }, + { + title: "4. Fees for Use of the Prisma Services", + content: ( + <> +

+ Subject to the Terms, the Prisma Services are provided to you without + charge up to certain limits. Usage over these limits requires your + purchase of additional resources or services. The pricing for + additional resources and services can be found on the Prisma pricing + page. +

+

+ For all purchased resources and services, Prisma will bill your credit + card on a monthly basis. Late payments bear interest at the rate of + 1.5% per month (or the highest rate permitted by law, if less). Charges + are exclusive of taxes. You are responsible for paying all taxes and + government charges. Prisma reserves the right to discontinue service + for late payment. +

+

+ Any refunds remain at Prisma's sole discretion and are provided + in credit form only. Card information may be shared with payment + processors and credit agencies. +

+

+ Prisma may change its fees and payment policies by notifying you at + least fifteen (15) days before the beginning of the billing cycle in + which such change will take effect. Free Tier and Starter Plan + modifications take immediate effect via pricing page updates. +

+

+ You may not create multiple accounts to avoid fees or bypass usage + limits. Prisma may consolidate accounts or require upgrades in such + cases. +

+

+ Annual subscriptions run for 12 months with automatic renewal absent + 30-day cancellation notice. Annual plans require full upfront payment + with no refunds. Reminder emails arrive 35-45 days before renewal. + Cancellation requires notice 30 days before the renewal date. + Subscription term modifications receive 60 days' email notice. +

+

+ Free Tier access depends on usage limits and feature availability. + Prisma may suspend abusive users and restrict support or premium + features to paid plans. +

+ + ), + }, + { + title: "5. Content on the Prisma Services and Take Down Obligations", + content: ( + <> +

+ You understand that all information (such as data files, written text, + computer software, music, audio files or other sounds, photographs, + videos or other images) which you may have access to as part of, or + through your use of, the Prisma Services are the sole responsibility + of the person from which such content originated. All such information + is referred to as the "Content." +

+

+ Prisma reserves the right (but shall have no obligation) to remove any + or all Content from the Prisma Services. You agree to immediately take + down any Content that violates the Acceptable Use Policy, including + pursuant to a take down request from Prisma. In the event that you + elect not to comply with a request from Prisma to take down certain + Content, Prisma reserves the right to directly take down such Content + or to disable Applications. +

+

+ You agree that you are solely responsible for (and that Prisma has no + responsibility to you or to any third party for) the Application or + any Content that you create, transmit or display while using the Prisma + Services and for the consequences of your actions (including any loss + or damage which Prisma may suffer) by doing so. +

+

+ You agree that Prisma has no responsibility or liability for the + deletion or failure to store any Content and other communications + maintained or transmitted through use of the Service. You are solely + responsible for securing and backing up your applications and any data. +

+ + ), + }, + { + title: "6. Proprietary Rights", + content: ( + <> +

+ You acknowledge and agree that Prisma (or Prisma's licensors) own + all legal right, title and interest in and to the Prisma Services, + including any intellectual property rights which subsist in the Prisma + Services (whether those rights happen to be registered or not, and + wherever in the world those rights may exist). +

+

+ Prisma acknowledges and agrees that it obtains no right, title or + interest from you (or your licensors) under these Terms in or to any + Content or Applications that you create, submit, post, transmit or + display on, or through, the Prisma Services, including any intellectual + property rights which subsist in that Content and the Application + (whether those rights happen to be registered or not, and wherever in + the world those rights may exist). Unless you have agreed otherwise in + writing with Prisma, you agree that you are responsible for protecting + and enforcing those rights and that Prisma has no obligation to do so + on your behalf. +

+ + ), + }, + { + title: "7. License from Prisma and Restrictions", + content: ( + <> +

+ Prisma gives you a personal, worldwide, royalty-free, non-assignable + and non-exclusive license to use the software provided to you by Prisma + as part of the Prisma Services as provided to you by Prisma. This + license is for the sole purpose of enabling you to use and enjoy the + benefit of the Prisma Services as provided by Prisma, in the manner + permitted by the Terms. +

+

+ You may not (and you may not permit anyone else to): (a) copy, modify, + create a derivative work of, reverse engineer, decompile or otherwise + attempt to extract the source code of the Prisma Services or any part + thereof, unless this is expressly permitted or required by law, or + unless you have been specifically told that you may do so by Prisma, in + writing; (b) attempt to disable or circumvent any security mechanisms + used by the Prisma Services or any applications running on the Prisma + Services; or (c) use the Prisma Services in any manner that would + subject Prisma's intellectual property or technology to any other + license terms. +

+

+ Open source software licenses for components of the Prisma Services + released under an open source license constitute separate written + agreements. To the limited extent that the open source software + licenses expressly supersede these Terms, the open source licenses + govern your agreement with Prisma for the use of the components of the + Prisma Services released under an open source license. +

+ + ), + }, + { + title: "8. License from You", + content: ( + <> +

+ Prisma claims no ownership or control over any Content or Application. + You retain copyright and any other rights you already hold in the + Content and/or Application, and you are responsible for protecting + those rights, as appropriate. +

+

+ By submitting, posting or displaying the Content on or through the + Prisma Services you give Prisma a worldwide, royalty-free, and + non-exclusive license to reproduce, adapt, modify, translate, publish, + publicly perform, publicly display and distribute such Content for the + sole purpose of enabling Prisma to provide you with the Prisma + Services. +

+

+ By adding a collaborator to your Application, you hereby grant to that + user a non-exclusive, royalty-free, non-transferable license, with no + right to sub-license, to use, display, perform, reproduce, modify, + publish, distribute, list information regarding, edit, translate and + analyze such Application(s) and Content as permitted by the relevant + Prisma Services functionality or features for the sole purpose of + collaborating on development of the Application(s). +

+

+ You may choose to or we may invite you to submit comments or ideas + about the Prisma Services, including without limitation about how to + improve the Prisma Services or our products ("Ideas"). By + submitting any Idea, you agree that your disclosure is gratuitous, + unsolicited and without restriction and will not place Prisma under any + fiduciary or other obligation, and that we are free to use the Idea + without any additional compensation to you, and/or to disclose the Idea + on a non-confidential basis or otherwise to anyone. +

+

+ Prisma, in its sole discretion, may use your trade names, trademarks, + service marks, logos, domain names and other distinctive brand features + in presentations, marketing materials, customer lists, financial + reports and website listings for the purposes of advertising and + publicizing your use of the Prisma Services. +

+ + ), + }, + { + title: "9. Modification and Termination of the Prisma Services", + content: ( + <> +

+ Prisma is constantly innovating in order to provide the best possible + experience for its users. You acknowledge and agree that the form and + nature of the Prisma Services which Prisma provides may change from + time to time without prior notice to you, subject to the terms in + Section 4.3. Changes to the form and nature of the Prisma Services + will be effective with respect to all versions of the Prisma Services; + examples of changes to the form and nature of the Prisma Services + include without limitation changes to fee and payment policies, + security patches, added functionality, and other enhancements. +

+

+ You may terminate these Terms at any time by canceling your account on + the Prisma Services. You will not receive any refunds if you cancel + your account. +

+

+ You agree that Prisma, in its sole discretion and for any or no + reason, may terminate your account or any part thereof. You agree that + any termination of your access to the Prisma Services may be without + prior notice, and you agree that Prisma will not be liable to you or + any third party for such termination. +

+

+ For Free Tier users, Prisma may discontinue access with reasonable + opportunities for upgrade or data export. You are solely responsible + for exporting your Content prior to termination of your account for any + reason, provided that if Prisma terminates your account, Prisma will + provide you a reasonable opportunity to retrieve your Content. +

+

+ Upon any termination of the Prisma Services or your account these + Terms will also terminate, but Sections 6.1, 9, 10, 11, 12, and 16 + shall continue to be effective after these Terms are terminated. +

+ + ), + }, + { + title: "10. Exclusion of Warranties", + content: ( + <> +

+ Nothing in these Terms, including Sections 10 and 11, shall exclude or + limit Prisma's warranty or liability for losses which may not be + lawfully excluded or limited by applicable law. +

+

+ You expressly understand and agree that your use of the Prisma + Services is at your sole risk and that the Prisma Services are provided + "as is" and "as available." +

+

+ Prisma, its subsidiaries and affiliates, and its licensors make no + express warranties and disclaim all implied warranties regarding the + Prisma Services, including implied warranties of merchantability, + fitness for a particular purpose and non-infringement. Without limiting + the generality of the foregoing, Prisma, its subsidiaries and + affiliates, and its licensors do not represent or warrant to you that + (a) your use of the Prisma Services will meet your requirements, (b) + your use of the Prisma Services will be uninterrupted, timely, secure + or free from error, or (c) data provided through the Prisma Services + will be accurate. +

+

+ Free Tier users receive no guaranteed support response times, uptime, + or feature availability. The service is provided "as is" and + may be deprioritized during periods of high load or maintenance. Early + Access products are provided "as is" and may have bugs or + issues. +

+ + ), + }, + { + title: "11. Limitation of Liability", + content: ( + <> +

+ You expressly understand and agree that Prisma, its subsidiaries and + affiliates, and its licensors shall not be liable to you for any + direct, indirect, incidental, special consequential or exemplary + damages which may be incurred by you, however caused and under any + theory of liability. This shall include, but not be limited to, any + loss of profit (whether incurred directly or indirectly), any loss of + goodwill or business reputation, any loss of data suffered, cost of + procurement of substitute goods or services, or other intangible loss. +

+

+ The limitations on Prisma's liability to you shall apply whether + or not Prisma has been advised of or should have been aware of the + possibility of any such losses arising. +

+

+ Third-party infrastructure provider outages exempt Prisma from + liability. Refunds or credits do not apply when downtime stems from + third-party failures. +

+ + ), + }, + { + title: "12. Indemnification", + content: ( +

+ You agree to hold harmless, defend and indemnify Prisma, and its + subsidiaries, affiliates, officers, agents, employees, advertisers, + licensors, suppliers or partners from and against any third party claim + arising from or in any way related to (a) your breach of the Terms, (b) + your use of the Prisma Services, (c) your violation of applicable laws, + rules or regulations in connection with the Prisma Services, or (d) your + Content or your Application, including any liability or expense arising + from all claims, losses, damages (actual and consequential), suits, + judgments, litigation costs and attorneys' fees, of every kind and + nature. +

+ ), + }, + { + title: "13. Copyright Policy", + content: ( + <> +

+ You agree to set up a process to respond to notices of alleged + infringement that comply with the United States' Digital + Millennium Copyright Act (DMCA). +

+

+ It is Prisma's policy to respond to notices of alleged + infringement that comply with the DMCA or other applicable copyright + laws and to terminate the accounts of repeat infringers. Prisma + reserves the right to remove content or disable applications upon + receiving valid DMCA notices. +

+ + ), + }, + { + title: "14. Acceptable Use", + content: ( + <> +

+ You agree not to use the Prisma Services to host or transmit any + content that is unlawful, harmful, or otherwise objectionable. Prisma + reserves the right to terminate accounts that violate this acceptable + use policy, which may change at Prisma's discretion. +

+

Prohibited Content includes, but is not limited to:

+
    +
  • Content that infringes third-party intellectual property
  • +
  • Excessively profane content
  • +
  • Content promoting hate, violence, or racial intolerance
  • +
  • Content advancing hacking or cracking
  • +
  • Content furthering illegal activity
  • +
  • Drug paraphernalia content
  • +
  • Phishing or malicious content
  • +
  • + Any other material that violates criminal laws or third-party rights +
  • +
+

Prohibited Actions include:

+
    +
  • Violating the legal rights of others
  • +
  • Promoting illegal activity
  • +
  • + Using the service for unlawful, invasive, infringing, defamatory, or + fraudulent purposes +
  • +
  • Intentional distribution of viruses or malware
  • +
  • Interfering with or disrupting the Prisma Services
  • +
  • Circumventing security measures
  • +
  • Generating spam
  • +
+

Early Access products are also subject to these restrictions.

+ + ), + }, + { + title: "15. Fair Use", + content: ( + <> +

+ Fair Use guidelines ensure equitable access for all customers, applying + to primary account holders, administrators, and end-users. Usage limits + may apply to API calls, storage, user accounts, and data processing to + optimize performance. +

+

Prohibited activities include:

+
    +
  • Circumventing account limitations
  • +
  • Sharing credentials beyond authorized users
  • +
  • Using the service for illegal purposes
  • +
  • Deliberately degrading service performance
  • +
+

+ Automated scripts or bots accessing the Service must be approved in + advance and comply with our API usage guidelines. +

+

+ Prisma monitors usage to enforce compliance. Enforcement responses may + include usage discussions, feature limitations, suspension, plan + upgrade requirements, and Free Tier access restriction or termination + for abuse. Repeated or severe violations may result in account + termination. +

+

+ Policy updates appear on the website and users receive notifications. + Questions may be directed to{" "} + legal@prisma.io. +

+ + ), + }, + { + title: "16. Other Content", + content: ( + <> +

+ The Prisma Services may include hyperlinks to other web sites or + content or resources. Prisma may have no control over any web sites or + resources which are provided by companies or persons other than Prisma. +

+

+ You acknowledge and agree that Prisma is not responsible for the + availability of any such external sites or resources, and does not + endorse any advertising, products or other materials on or available + from such web sites or resources. +

+

+ You acknowledge and agree that Prisma is not liable for any loss or + damage which may be incurred by you as a result of the availability of + those external sites or resources, or as a result of any reliance + placed by you on the completeness, accuracy or existence of any + advertising, products or other materials on, or available from, such + web sites or resources. +

+ + ), + }, + { + title: "17. Changes to the Terms", + content: ( + <> +

+ Prisma may make changes to the Terms from time to time. When these + changes are made, Prisma will make a new copy of these Terms available + on this page. +

+

+ You understand and agree that if you use the Prisma Services after the + date on which the Terms have changed, Prisma will treat your use as + acceptance of the updated Terms. +

+

+ If a modification is material, Prisma will provide at least seven (7) + days' notice before the new terms take effect. What constitutes a + material modification will be determined at Prisma's sole + discretion. If you do not agree to the modified Terms, you should + discontinue your use of the Prisma Services. +

+ + ), + }, + { + title: "18. General Legal Terms", + content: ( + <> +

+ The Terms constitute the whole legal agreement between you and Prisma + and govern your use of the Prisma Services (but excluding any services + which Prisma may provide to you under a separate written agreement), + and completely replace any prior agreements between you and Prisma in + relation to the Prisma Services. +

+

+ There are no third party beneficiaries to these Terms. The parties are + independent contractors. The Terms do not create an agency, partnership + or joint venture. +

+

+ If Prisma provides you with a translation of the English language + version of these Terms, the English language version of these Terms + will control if there is any conflict. +

+

+ You agree that Prisma may provide you with notices, including those + regarding changes to the Terms, by email, regular mail, or postings on + the Prisma Services. By providing Prisma your email address, you + consent to our using the email address to send you any notices. +

+

+ You agree that if Prisma does not exercise or enforce any legal right + or remedy which is contained in the Terms (or which Prisma has the + benefit of under any applicable law), this will not be taken to be a + formal waiver of Prisma's rights and that those rights or + remedies will still be available to Prisma. +

+

+ Prisma shall not be liable for failing or delaying performance of its + obligations resulting from any condition beyond its reasonable control, + including but not limited to, governmental action, acts of terrorism, + earthquake, fire, flood or other acts of God, labor conditions, power + failures, and Internet disturbances. +

+

+ The Terms, and your relationship with Prisma under the Terms, shall be + governed by the laws of the State of California without regard to its + conflict of laws provisions. You and Prisma agree to submit to the + exclusive jurisdiction of the courts located within the county of Santa + Clara, California to resolve any legal matter arising from the Terms. +

+

+ Neither party may assign any of its rights or obligations under these + Terms, whether by operation of law or otherwise, without the prior + written consent of the other party (not to be unreasonably withheld). +

+ + ), + }, + { + title: "19. Embeddable Prisma Studio", + content: ( + <> +

+ The free version of Embeddable Prisma Studio is licensed under the + Apache 2.0 License and may be used in both development and production + environments. Prisma branding must remain visible in the free version. + Removal of branding requires a paid commercial license. +

+

+ Paid versions of Embeddable Prisma Studio require a separate + subscription agreement with terms distinct from standard Prisma + billing. +

+

+ Embeddable Prisma Studio operates as client-side software. Prisma will + have no liability or responsibility for any loss, corruption, + unauthorized disclosure, or misuse of data arising from user or + end-user misuse. +

+

+ Users bear sole responsibility for regulatory compliance, especially in + regulated sectors. Prisma disclaims all compliance-related warranties. + Users acknowledge that Embeddable Prisma Studio is not designed for + regulated industries (such as healthcare or finance) and assume full + compliance responsibility. +

+

+ The free version includes telemetry collection to support service + improvements. Repository contributors license their contributions under + Apache 2.0, granting Prisma usage, modification, and distribution + rights. +

+ + ), + }, +]; From bb3c23686fc6be75fb19ee94dacfb32460601042 Mon Sep 17 00:00:00 2001 From: Aman Varshney Date: Fri, 27 Mar 2026 01:34:05 +0530 Subject: [PATCH 2/3] feat: add SLA, privacy, event code of conduct, and partners TOS pages - Extract shared accordion into @/components/legal-accordion - Fix accordion state to track individual items via Set - Add fixed-height gradient for consistent look across pages - All pages start collapsed by default - /sla, /privacy, /event-code-of-conduct, /partners/tos --- .../src/app/event-code-of-conduct/page.tsx | 42 +++ apps/site/src/app/partners/tos/page.tsx | 35 +++ apps/site/src/app/privacy/page.tsx | 35 +++ apps/site/src/app/sla/page.tsx | 35 +++ apps/site/src/app/terms/page.tsx | 6 +- .../legal-accordion.tsx} | 39 ++- apps/site/src/data/event-code-of-conduct.tsx | 82 ++++++ apps/site/src/data/partners-tos.tsx | 264 ++++++++++++++++++ apps/site/src/data/privacy.tsx | 238 ++++++++++++++++ apps/site/src/data/sla.tsx | 138 +++++++++ 10 files changed, 896 insertions(+), 18 deletions(-) create mode 100644 apps/site/src/app/event-code-of-conduct/page.tsx create mode 100644 apps/site/src/app/partners/tos/page.tsx create mode 100644 apps/site/src/app/privacy/page.tsx create mode 100644 apps/site/src/app/sla/page.tsx rename apps/site/src/{app/terms/_components/terms-accordion.tsx => components/legal-accordion.tsx} (78%) create mode 100644 apps/site/src/data/event-code-of-conduct.tsx create mode 100644 apps/site/src/data/partners-tos.tsx create mode 100644 apps/site/src/data/privacy.tsx create mode 100644 apps/site/src/data/sla.tsx diff --git a/apps/site/src/app/event-code-of-conduct/page.tsx b/apps/site/src/app/event-code-of-conduct/page.tsx new file mode 100644 index 0000000000..0be2c11682 --- /dev/null +++ b/apps/site/src/app/event-code-of-conduct/page.tsx @@ -0,0 +1,42 @@ +import type { Metadata } from "next"; +import { + cocSections, + cocLastUpdated, + cocDescription, +} from "@/data/event-code-of-conduct"; +import { LegalAccordion } from "@/components/legal-accordion"; + +export const metadata: Metadata = { + title: "Event Code of Conduct | Prisma", + description: + "All attendees, speakers, sponsors, and volunteers at Prisma events are required to agree to this code of conduct.", +}; + +export default function EventCodeOfConductPage() { + return ( +
+ {/* Hero */} +
+

+ Event Code of Conduct +

+

+ {cocDescription} +

+

+ Last updated: {cocLastUpdated} +

+
+ + {/* Separator */} +
+
+
+ + {/* Content */} +
+ +
+
+ ); +} diff --git a/apps/site/src/app/partners/tos/page.tsx b/apps/site/src/app/partners/tos/page.tsx new file mode 100644 index 0000000000..da9e4d5bab --- /dev/null +++ b/apps/site/src/app/partners/tos/page.tsx @@ -0,0 +1,35 @@ +import type { Metadata } from "next"; +import { partnersTosSections, partnersTosLastUpdated } from "@/data/partners-tos"; +import { LegalAccordion } from "@/components/legal-accordion"; + +export const metadata: Metadata = { + title: "Partner Network Terms of Service | Prisma", + description: + "Terms of Service for the Prisma Partner Network covering affiliates, technology partners, and resellers.", +}; + +export default function PartnersTosPage() { + return ( +
+ {/* Hero */} +
+

+ Terms of Service Prisma Partner Network +

+

+ Last updated: {partnersTosLastUpdated} +

+
+ + {/* Separator */} +
+
+
+ + {/* Content */} +
+ +
+
+ ); +} diff --git a/apps/site/src/app/privacy/page.tsx b/apps/site/src/app/privacy/page.tsx new file mode 100644 index 0000000000..c69665af71 --- /dev/null +++ b/apps/site/src/app/privacy/page.tsx @@ -0,0 +1,35 @@ +import type { Metadata } from "next"; +import { privacySections, privacyLastUpdated } from "@/data/privacy"; +import { LegalAccordion } from "@/components/legal-accordion"; + +export const metadata: Metadata = { + title: "Privacy Policy | Prisma", + description: + "Read the Prisma Privacy Policy covering how we collect, use, and protect your data.", +}; + +export default function PrivacyPage() { + return ( +
+ {/* Hero */} +
+

+ Privacy Policy +

+

+ Last updated: {privacyLastUpdated} +

+
+ + {/* Separator */} +
+
+
+ + {/* Content */} +
+ +
+
+ ); +} diff --git a/apps/site/src/app/sla/page.tsx b/apps/site/src/app/sla/page.tsx new file mode 100644 index 0000000000..af517729c4 --- /dev/null +++ b/apps/site/src/app/sla/page.tsx @@ -0,0 +1,35 @@ +import type { Metadata } from "next"; +import { slaSections, slaLastUpdated } from "@/data/sla"; +import { LegalAccordion } from "@/components/legal-accordion"; + +export const metadata: Metadata = { + title: "Service Level Agreement | Prisma", + description: + "Read the Prisma Service Level Agreement covering uptime commitments and service credits.", +}; + +export default function SlaPage() { + return ( +
+ {/* Hero */} +
+

+ Prisma Service Level Agreement +

+

+ Last updated: {slaLastUpdated} +

+
+ + {/* Separator */} +
+
+
+ + {/* Content */} +
+ +
+
+ ); +} diff --git a/apps/site/src/app/terms/page.tsx b/apps/site/src/app/terms/page.tsx index 73c4818647..b1e0e92b56 100644 --- a/apps/site/src/app/terms/page.tsx +++ b/apps/site/src/app/terms/page.tsx @@ -1,6 +1,6 @@ import type { Metadata } from "next"; import { termsSections, termsLastUpdated } from "@/data/terms"; -import { TermsAccordion } from "./_components/terms-accordion"; +import { LegalAccordion } from "@/components/legal-accordion"; export const metadata: Metadata = { title: "Terms of Service | Prisma", @@ -10,7 +10,7 @@ export const metadata: Metadata = { export default function TermsPage() { return ( -
+
{/* Hero */}

@@ -28,7 +28,7 @@ export default function TermsPage() { {/* Content */}
- +

); diff --git a/apps/site/src/app/terms/_components/terms-accordion.tsx b/apps/site/src/components/legal-accordion.tsx similarity index 78% rename from apps/site/src/app/terms/_components/terms-accordion.tsx rename to apps/site/src/components/legal-accordion.tsx index 848c85da7b..d2c6e31fac 100644 --- a/apps/site/src/app/terms/_components/terms-accordion.tsx +++ b/apps/site/src/components/legal-accordion.tsx @@ -47,26 +47,35 @@ function AccordionItem({ ); } -export function TermsAccordion({ sections }: { sections: Section[] }) { - const [expandAll, setExpandAll] = useState(false); - const [selected, setSelected] = useState(0); +export function LegalAccordion({ + sections, + defaultExpand = false, +}: { + sections: Section[]; + defaultExpand?: boolean; +}) { + const allIndices = sections.map((_, i) => i); + const [openItems, setOpenItems] = useState>( + () => new Set(defaultExpand ? allIndices : []), + ); + + const isAllExpanded = openItems.size === sections.length; const toggleAll = () => { - if (expandAll) { - setSelected(-1); - setExpandAll(false); - } else { - setExpandAll(true); - } + setOpenItems(new Set(isAllExpanded ? [] : allIndices)); }; const toggleItem = (idx: number) => { - if (expandAll) setExpandAll(false); - setSelected(selected === idx ? -1 : idx); + setOpenItems((prev) => { + const next = new Set(prev); + if (next.has(idx)) next.delete(idx); + else next.add(idx); + return next; + }); }; const printPage = () => { - setExpandAll(true); + setOpenItems(new Set(allIndices)); setTimeout(() => window.print(), 50); }; @@ -80,10 +89,10 @@ export function TermsAccordion({ sections }: { sections: Section[] }) { onClick={toggleAll} > - {expandAll ? "Collapse" : "Expand"} all + {isAllExpanded ? "Collapse" : "Expand"} all