From 0d937e10ba895f8ffc5347ce53bf39c623097391 Mon Sep 17 00:00:00 2001 From: Sosokker Date: Sun, 17 Nov 2024 19:54:26 +0700 Subject: [PATCH] feat: add legal-related page --- src/app/(legal)/NavigationSidebar.tsx | 44 ++++++++ src/app/(legal)/Toc.tsx | 31 ++++++ src/app/{ => (legal)}/about/page.tsx | 0 src/app/(legal)/privacy/page.tsx | 101 +++++++++++++++++++ src/app/(legal)/risks/page.tsx | 105 +++++++++++++++++++ src/app/(legal)/terms/page.tsx | 108 ++++++++++++++++++++ src/app/auth/page.tsx | 14 ++- src/app/auth/signup/page.tsx | 16 ++- src/components/siteFooter.tsx | 12 +-- src/components/ui/sheet.tsx | 140 ++++++++++++++++++++++++++ src/hooks/use-mobile.tsx | 19 ++++ src/middleware.ts | 2 +- 12 files changed, 582 insertions(+), 10 deletions(-) create mode 100644 src/app/(legal)/NavigationSidebar.tsx create mode 100644 src/app/(legal)/Toc.tsx rename src/app/{ => (legal)}/about/page.tsx (100%) create mode 100644 src/app/(legal)/privacy/page.tsx create mode 100644 src/app/(legal)/risks/page.tsx create mode 100644 src/app/(legal)/terms/page.tsx create mode 100644 src/components/ui/sheet.tsx create mode 100644 src/hooks/use-mobile.tsx diff --git a/src/app/(legal)/NavigationSidebar.tsx b/src/app/(legal)/NavigationSidebar.tsx new file mode 100644 index 0000000..8e52d5f --- /dev/null +++ b/src/app/(legal)/NavigationSidebar.tsx @@ -0,0 +1,44 @@ +"use client"; + +import { Separator } from "@/components/ui/separator"; +import Link from "next/link"; + +export function NavSidebar() { + return ( +
+ +
+ ); +} diff --git a/src/app/(legal)/Toc.tsx b/src/app/(legal)/Toc.tsx new file mode 100644 index 0000000..96ed95f --- /dev/null +++ b/src/app/(legal)/Toc.tsx @@ -0,0 +1,31 @@ +"use client"; + +import Link from "next/link"; + +interface Section { + id: string; + title: string; +} + +interface TableOfContentProps { + sections: Section[]; +} + +const TableOfContent = ({ sections }: TableOfContentProps) => { + return ( +
+

Table of Contents

+ +
+ ); +}; + +export default TableOfContent; diff --git a/src/app/about/page.tsx b/src/app/(legal)/about/page.tsx similarity index 100% rename from src/app/about/page.tsx rename to src/app/(legal)/about/page.tsx diff --git a/src/app/(legal)/privacy/page.tsx b/src/app/(legal)/privacy/page.tsx new file mode 100644 index 0000000..e1c437b --- /dev/null +++ b/src/app/(legal)/privacy/page.tsx @@ -0,0 +1,101 @@ +"use client"; + +import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "@/components/ui/card"; +import TableOfContent from "../Toc"; +import { NavSidebar } from "../NavigationSidebar"; + +const PrivacyPolicy = () => { + const sections = [ + { id: "introduction", title: "Introduction" }, + { id: "data-collection", title: "Data Collection" }, + { id: "data-usage", title: "Data Usage" }, + { id: "data-sharing", title: "Data Sharing" }, + { id: "data-security", title: "Data Security" }, + { id: "user-rights", title: "User Rights" }, + { id: "changes", title: "Changes to Privacy Policy" }, + { id: "contact", title: "Contact Information" }, + ]; + + return ( +
+
+ + +
+ +
+ + + Privacy Policy + + Last Updated: November 17, 2024 + + + +
+

+ This Privacy Policy ("Policy") describes how we collect, use, and share your personal + information when you access and use our Website. +

+ +

1. Introduction

+

+ We value your privacy. This Policy explains how we collect, use, and protect your personal data when you + use our services. +

+ +

2. Data Collection

+

+ We collect various types of information when you use our Website, including personal information, + technical data, and usage data. This includes your name, email address, IP address, and device + information. +

+ +

3. Data Usage

+

+ The data we collect is used to improve our services, personalize your experience, and ensure the + functionality of our Website. We may also use your data for marketing purposes and to communicate with + you. +

+ +

4. Data Sharing

+

+ We do not sell your personal data to third parties. However, we may share your data with trusted + partners for the purpose of providing our services, complying with legal obligations, or protecting our + rights. +

+ +

5. Data Security

+

+ We take reasonable measures to secure your personal data and protect it from unauthorized access, + alteration, disclosure, or destruction. However, no data transmission over the Internet can be + guaranteed as 100% secure. +

+ +

6. User Rights

+

+ You have the right to access, update, or delete your personal information. You may also object to the + processing of your data or request a restriction on how we process your data. +

+ +

7. Changes to Privacy Policy

+

+ We may update this Privacy Policy from time to time. Any changes will be posted on this page, and the + updated date will be reflected at the top of the page. We encourage you to review this Policy regularly. +

+ +

8. Contact Information

+

+ If you have any questions about this Privacy Policy or wish to exercise your rights, please contact us + at privacy@b2dventure.com. +

+
+
+ +
+
+
+ ); +}; + +export default PrivacyPolicy; diff --git a/src/app/(legal)/risks/page.tsx b/src/app/(legal)/risks/page.tsx new file mode 100644 index 0000000..fc0f304 --- /dev/null +++ b/src/app/(legal)/risks/page.tsx @@ -0,0 +1,105 @@ +"use client"; + +import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "@/components/ui/card"; +import TableOfContent from "../Toc"; +import { NavSidebar } from "../NavigationSidebar"; + +const InvestmentRisks = () => { + const sections = [ + { id: "investment-risk", title: "Investment Risk" }, + { id: "business-closure", title: "Business Closure" }, + { id: "no-return", title: "No Return on Investment" }, + { id: "market-conditions", title: "Market Conditions" }, + { id: "regulatory-risk", title: "Regulatory Risk" }, + { id: "liquidity-risk", title: "Liquidity Risk" }, + { id: "economic-factors", title: "Economic Factors" }, + { id: "mitigation-strategies", title: "Mitigation Strategies" }, + ]; + + return ( +
+
+ + +
+ +
+ + + Investment Risks + + Last Updated: November 17, 2024 + + + +
+

+ Investing in opportunities through our platform carries inherent risks. It is important that you fully + understand these risks before proceeding with any investment. This page outlines some of the potential + risks associated with investing in businesses listed on our platform. +

+ +

1. Investment Risk

+

+ All investments carry risk. The value of your investment may fluctuate, and there is a possibility that + you could lose the entire amount invested. You should only invest money that you can afford to lose. +

+ +

2. Business Closure

+

+ The businesses listed on our platform may face financial difficulties or other challenges that could + lead to their closure. In the event of a business closing, investors may lose their entire investment, + and there may be no recourse for recovering the invested funds. +

+ +

3. No Return on Investment

+

+ While some businesses may generate returns, there is no guarantee that you will receive a return on your + investment. If a business does not succeed or fails to generate profits, you may not receive any return + on your investment. +

+ +

4. Market Conditions

+

+ Economic and market conditions can affect the success of a business. Factors such as changes in demand, + competition, or overall market downturns can negatively impact the business’s ability to generate + revenue and, consequently, affect your investment return. +

+ +

5. Regulatory Risk

+

+ Changes in laws or regulations could affect the operations of a business and impact its ability to + operate successfully. Businesses may face additional compliance costs or regulatory restrictions, which + can negatively impact their profitability and the value of your investment. +

+ +

6. Liquidity Risk

+

+ Investment opportunities on our platform may lack liquidity. This means you may not be able to easily + sell or exit your investment when you wish. The inability to quickly liquidate an investment may impact + your ability to access your funds. +

+ +

7. Economic Factors

+

+ Broader economic factors, such as inflation, unemployment, and interest rates, can influence business + performance and impact your investment. Negative economic shifts can lead to a decline in investment + value. +

+ +

8. Mitigation Strategies

+

+ While we cannot eliminate all risks, we recommend conducting thorough due diligence before investing. + Additionally, diversifying your investment portfolio and staying informed about market trends and + business performance can help mitigate some of these risks. +

+
+
+ +
+
+
+ ); +}; + +export default InvestmentRisks; diff --git a/src/app/(legal)/terms/page.tsx b/src/app/(legal)/terms/page.tsx new file mode 100644 index 0000000..64995ff --- /dev/null +++ b/src/app/(legal)/terms/page.tsx @@ -0,0 +1,108 @@ +"use client"; + +import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "@/components/ui/card"; +import TableOfContent from "../Toc"; +import { NavSidebar } from "../NavigationSidebar"; + +const TermsOfService = () => { + const sections = [ + { id: "eligibility", title: "Eligibility" }, + { id: "user-accounts", title: "User Accounts" }, + { id: "user-content", title: "User Content" }, + { id: "investment-activity", title: "Investment Activity" }, + { id: "disclaimers", title: "Disclaimers" }, + { id: "limitation-of-liability", title: "Limitation of Liability" }, + { id: "indemnification", title: "Indemnification" }, + { id: "termination", title: "Termination" }, + ]; + + return ( +
+
+ + +
+ +
+ + + Terms of Service + + Last Updated: November 17, 2024 + + + +
+

+ These Terms of Service ("Terms") govern your access to and use of the Website, which is owned + and operated by B2DVenture Company LLC ("B2DVenture", "we", "us", or + "our"). +

+ +

1. Eligibility

+

+ You must be at least 18 years old and have the legal capacity to enter into a binding agreement in order + to use the Website. You may not access or use the Website if you are not qualified. +

+ +

2. User Accounts

+

+ In order to access certain features of the Website, such as uploading investment opportunities or making + investments, you may be required to create an account. +

+

+ You are responsible for maintaining the confidentiality of your account information, including your + username and password. You are also responsible for all activity that occurs under your account. +

+ +

3. User Content

+

+ The Website allows users to upload content, including images, videos, and text (collectively, "User + Content"). You retain all ownership rights in your User Content. However, by uploading User Content + to the Website, you grant B2DVenture a non-exclusive, royalty-free, worldwide license to use, reproduce, + modify, publish, and distribute your User Content in connection with the Website and our business. +

+ +

4. Investment Activity

+

+ The Website is a platform that connects businesses seeking funding (the "Issuers") with + potential investors (the "Investors"). B2DVenture does not act as a financial advisor, broker, + or dealer. We do not recommend or endorse any particular investment opportunity. +

+ +

5. Disclaimers

+

+ The Website and the information contained herein are provided for informational purposes only and should + not be considered as investment advice. +

+ +

6. Limitation of Liability

+

+ B2DVenture shall not be liable for any damages arising out of or in connection with your use of the + Website, including but not limited to, direct, indirect, incidental, consequential, or punitive damages. +

+ +

7. Indemnification

+

+ You agree to indemnify and hold harmless B2DVenture, its officers, directors, employees, agents, and + licensors from and against any and all claims, demands, losses, liabilities, costs, or expenses + (including attorneys" fees) arising out of or in connection with your use of the Website or your + violation of these Terms. +

+ +

8. Termination

+

+ We may terminate your access to the Website for any reason, at any time, without notice. This includes + if you violate any of these Terms, or if we believe that your use of the Website is harmful to us or to + any other user. +

+
+
+ +
+
+
+ ); +}; + +export default TermsOfService; diff --git a/src/app/auth/page.tsx b/src/app/auth/page.tsx index 9ef133a..bc663aa 100644 --- a/src/app/auth/page.tsx +++ b/src/app/auth/page.tsx @@ -3,6 +3,8 @@ import { Card, CardContent, CardFooter, CardDescription, CardHeader, CardTitle } import { LoginButton } from "@/components/auth/loginButton"; import { LoginForm } from "@/components/auth/loginForm"; +import Link from "next/link"; + export default function Login() { return (
- By signing up, you agree to the Terms of Service and acknowledge you’ve read our Privacy Policy. + + By signing in, you agree to the{" "} + + Terms of Service + {" "} + and acknowledge you’ve read our{" "} + + Privacy Policy + + . +
diff --git a/src/app/auth/signup/page.tsx b/src/app/auth/signup/page.tsx index cca3993..fc9fccd 100644 --- a/src/app/auth/signup/page.tsx +++ b/src/app/auth/signup/page.tsx @@ -3,11 +3,13 @@ import { Card, CardContent, CardFooter, CardDescription, CardHeader, CardTitle } import { SignupButton } from "@/components/auth/signupButton"; import { SignupForm } from "@/components/auth/signupForm"; +import Link from "next/link"; + export default function Signup() { return (
@@ -23,7 +25,17 @@ export default function Signup() { - By signing up, you agree to the Terms of Service and acknowledge you’ve read our Privacy Policy. + + By signing up, you agree to the{" "} + + Terms of Service + {" "} + and acknowledge you’ve read our{" "} + + Privacy Policy + + . + {" "}
diff --git a/src/components/siteFooter.tsx b/src/components/siteFooter.tsx index 007d663..f7bf49c 100644 --- a/src/components/siteFooter.tsx +++ b/src/components/siteFooter.tsx @@ -18,13 +18,13 @@ export function SiteFooter() { About Us - - Services + + Privacy - + + Terms and Service + + Contact diff --git a/src/components/ui/sheet.tsx b/src/components/ui/sheet.tsx new file mode 100644 index 0000000..a37f17b --- /dev/null +++ b/src/components/ui/sheet.tsx @@ -0,0 +1,140 @@ +"use client" + +import * as React from "react" +import * as SheetPrimitive from "@radix-ui/react-dialog" +import { cva, type VariantProps } from "class-variance-authority" +import { X } from "lucide-react" + +import { cn } from "@/lib/utils" + +const Sheet = SheetPrimitive.Root + +const SheetTrigger = SheetPrimitive.Trigger + +const SheetClose = SheetPrimitive.Close + +const SheetPortal = SheetPrimitive.Portal + +const SheetOverlay = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +SheetOverlay.displayName = SheetPrimitive.Overlay.displayName + +const sheetVariants = cva( + "fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500", + { + variants: { + side: { + top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top", + bottom: + "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom", + left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm", + right: + "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm", + }, + }, + defaultVariants: { + side: "right", + }, + } +) + +interface SheetContentProps + extends React.ComponentPropsWithoutRef, + VariantProps {} + +const SheetContent = React.forwardRef< + React.ElementRef, + SheetContentProps +>(({ side = "right", className, children, ...props }, ref) => ( + + + + {children} + + + Close + + + +)) +SheetContent.displayName = SheetPrimitive.Content.displayName + +const SheetHeader = ({ + className, + ...props +}: React.HTMLAttributes) => ( +
+) +SheetHeader.displayName = "SheetHeader" + +const SheetFooter = ({ + className, + ...props +}: React.HTMLAttributes) => ( +
+) +SheetFooter.displayName = "SheetFooter" + +const SheetTitle = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +SheetTitle.displayName = SheetPrimitive.Title.displayName + +const SheetDescription = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) +SheetDescription.displayName = SheetPrimitive.Description.displayName + +export { + Sheet, + SheetPortal, + SheetOverlay, + SheetTrigger, + SheetClose, + SheetContent, + SheetHeader, + SheetFooter, + SheetTitle, + SheetDescription, +} diff --git a/src/hooks/use-mobile.tsx b/src/hooks/use-mobile.tsx new file mode 100644 index 0000000..2b0fe1d --- /dev/null +++ b/src/hooks/use-mobile.tsx @@ -0,0 +1,19 @@ +import * as React from "react" + +const MOBILE_BREAKPOINT = 768 + +export function useIsMobile() { + const [isMobile, setIsMobile] = React.useState(undefined) + + React.useEffect(() => { + const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`) + const onChange = () => { + setIsMobile(window.innerWidth < MOBILE_BREAKPOINT) + } + mql.addEventListener("change", onChange) + setIsMobile(window.innerWidth < MOBILE_BREAKPOINT) + return () => mql.removeEventListener("change", onChange) + }, []) + + return !!isMobile +} diff --git a/src/middleware.ts b/src/middleware.ts index 7729b2b..def9ff9 100644 --- a/src/middleware.ts +++ b/src/middleware.ts @@ -14,6 +14,6 @@ export const config = { * - favicon.ico (favicon file) * Feel free to modify this pattern to include more paths. */ - "/((?!_next/static|_next/image|$|favicon.ico|payment-success|verify|.*\\.(?:svg|png|jpg|jpeg|gif|webp)$).*)", + "/((?!_next/static|_next/image|$|favicon.ico|payment-success|verify|terms|contact|risks|about|privacy|.*\\.(?:svg|png|jpg|jpeg|gif|webp)$).*)", ], };