Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

chore: run prettier format

Marc Seitz385ef2a5934b
diff --git a/app/(auth)/layout.tsx b/app/(auth)/layout.tsx
index 50a75745..ba4b8758 100644
--- a/app/(auth)/layout.tsx
+++ b/app/(auth)/layout.tsx
@@ -1,9 +1,12 @@
-import "@/styles/globals.css";
import { Inter } from "next/font/google";
-import { Toaster } from "sonner";
import Head from "next/head";
+
+import { Toaster } from "sonner";
+
import { ThemeProvider } from "@/components/theme-provider";
+import "@/styles/globals.css";
+
const inter = Inter({ subsets: ["latin"] });
export default function Layout({ children }: { children: React.ReactNode }) {
diff --git a/app/(auth)/login/page.tsx b/app/(auth)/login/page.tsx
index 8af533a6..ab307298 100644
--- a/app/(auth)/login/page.tsx
+++ b/app/(auth)/login/page.tsx
@@ -1,17 +1,20 @@
"use client";
-import { Button } from "@/components/ui/button";
-import { signIn } from "next-auth/react";
-import { signInWithPasskey } from "@teamhanko/passkeys-next-auth-provider/client";
import Link from "next/link";
-import { Input } from "@/components/ui/input";
import { useParams } from "next/navigation";
-import Passkey from "@/components/shared/icons/passkey";
+
import { useState } from "react";
-import { toast } from "sonner";
-import LinkedIn from "@/components/shared/icons/linkedin";
+
+import { signInWithPasskey } from "@teamhanko/passkeys-next-auth-provider/client";
import { Loader } from "lucide-react";
+import { signIn } from "next-auth/react";
+import { toast } from "sonner";
+
import Google from "@/components/shared/icons/google";
+import LinkedIn from "@/components/shared/icons/linkedin";
+import Passkey from "@/components/shared/icons/passkey";
+import { Button } from "@/components/ui/button";
+import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
export default function Login() {
@@ -34,19 +37,19 @@ export default function Login() {
className="absolute inset-x-0 top-10 -z-10 flex transform-gpu justify-center overflow-hidden blur-3xl"
aria-hidden="true"
></div>
- <div className="z-10 mt-[calc(20vh)] h-fit w-full mx-5 sm:mx-0 max-w-md overflow-hidden rounded-lg">
+ <div className="z-10 mx-5 mt-[calc(20vh)] h-fit w-full max-w-md overflow-hidden rounded-lg sm:mx-0">
<div className="flex flex-col items-center justify-center space-y-3 px-4 py-6 pt-8 text-center sm:px-16">
<Link href="/">
- <span className=" text-2xl font-semibold text-gray-800 text-balance ">
+ <span className=" text-balance text-2xl font-semibold text-gray-800 ">
Welcome to Papermark
</span>
</Link>
- <h3 className="text-sm text-gray-800 text-balance ">
+ <h3 className="text-balance text-sm text-gray-800 ">
Share documents. Not attachments.
</h3>
</div>
<form
- className="flex flex-col px-4 pt-8 sm:px-16 gap-4"
+ className="flex flex-col gap-4 px-4 pt-8 sm:px-16"
onSubmit={(e) => {
e.preventDefault();
setIsLoginWithEmail(true);
@@ -86,7 +89,7 @@ export default function Login() {
disabled={isLoginWithEmail}
value={email}
onChange={(e) => setEmail(e.target.value)}
- className="flex h-10 w-full rounded-md border-0 ring-1 ring-gray-200 bg-background px-3 py-2 text-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 bg-white text-gray-900"
+ className="flex h-10 w-full rounded-md border-0 bg-background bg-white px-3 py-2 text-sm text-gray-900 ring-1 ring-gray-200 transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50"
/>
{/* <Button type="submit" disabled={isLoginWithEmail}>
{isLoginWithEmail && (
@@ -99,13 +102,13 @@ export default function Login() {
loading={isLoginWithEmail}
className={`${
isLoginWithEmail ? "bg-black" : "bg-gray-800 hover:bg-gray-900 "
- } text-white py-2 px-4 rounded focus:outline-none focus:shadow-outline transform transition-colors duration-300 ease-in-out`}
+ } focus:shadow-outline transform rounded px-4 py-2 text-white transition-colors duration-300 ease-in-out focus:outline-none`}
>
{emailButtonText}
</Button>
</form>
- <p className="text-center py-4">or</p>
- <div className="flex flex-col px-4 sm:px-16 space-y-2">
+ <p className="py-4 text-center">or</p>
+ <div className="flex flex-col space-y-2 px-4 sm:px-16">
<Button
onClick={() => {
setIsLoginWithGoogle(true);
@@ -118,12 +121,12 @@ export default function Login() {
});
}}
disabled={isLoginWithGoogle}
- className="flex justify-center items-center space-x-2 font-normal bg-gray-100 text-gray-900 border border-gray-200 hover:bg-gray-200 "
+ className="flex items-center justify-center space-x-2 border border-gray-200 bg-gray-100 font-normal text-gray-900 hover:bg-gray-200 "
>
{isLoginWithGoogle ? (
- <Loader className="w-5 h-5 mr-2 animate-spin" />
+ <Loader className="mr-2 h-5 w-5 animate-spin" />
) : (
- <Google className="w-5 h-5" />
+ <Google className="h-5 w-5" />
)}
<span>Continue with Google</span>
</Button>
@@ -139,10 +142,10 @@ export default function Login() {
});
}}
disabled={isLoginWithLinkedIn}
- className="flex justify-center items-center space-x-2 font-normal bg-gray-100 text-gray-900 border border-gray-200 hover:bg-gray-200"
+ className="flex items-center justify-center space-x-2 border border-gray-200 bg-gray-100 font-normal text-gray-900 hover:bg-gray-200"
>
{isLoginWithLinkedIn ? (
- <Loader className="w-5 h-5 mr-2 animate-spin " />
+ <Loader className="mr-2 h-5 w-5 animate-spin " />
) : (
<LinkedIn />
)}
@@ -155,13 +158,13 @@ export default function Login() {
})
}
variant="outline"
- className="flex justify-center items-center space-x-2 border border-gray-200 hover:bg-gray-200 font-normal bg-gray-100 text-gray-900 hover:text-gray-900"
+ className="flex items-center justify-center space-x-2 border border-gray-200 bg-gray-100 font-normal text-gray-900 hover:bg-gray-200 hover:text-gray-900"
>
- <Passkey className="w-4 h-4 " />
+ <Passkey className="h-4 w-4 " />
<span>Continue with a passkey</span>
</Button>
</div>
- <p className=" mt-10 text-xs text-muted-foreground w-full max-w-md px-4 sm:px-16">
+ <p className=" mt-10 w-full max-w-md px-4 text-xs text-muted-foreground sm:px-16">
By clicking continue, you acknowledge that you have read and agree
to Papermark&apos;s{" "}
<Link href="/terms" className="underline">
@@ -176,23 +179,23 @@ export default function Login() {
</div>
</div>
<div className="hidden w-full justify-center bg-gray-800 md:flex md:w-1/2 lg:w-3/5">
- <div className="flex w-full max-w-5xl px-4 md:px-8 py-20">
+ <div className="flex w-full max-w-5xl px-4 py-20 md:px-8">
<div
- className="flex w-full mx-auto max-w-5xl px-4 md:px-8 py-20 bg-gray-800 rounded-3xl justify-center"
+ className="mx-auto flex w-full max-w-5xl justify-center rounded-3xl bg-gray-800 px-4 py-20 md:px-8"
id="features"
>
<div className="flex flex-col items-center">
{/* Image container */}
- <div className="w-64 h-64 mb-4">
+ <div className="mb-4 h-64 w-64">
<img
- className="object-cover w-full h-full rounded-2xl shadow-2xl"
+ className="h-full w-full rounded-2xl object-cover shadow-2xl"
src="https://www.papermark.io/_static/testimonials/jaski.jpeg"
alt="Jaski"
/>
</div>
{/* Text content */}
<div className="max-w-xl text-center">
- <blockquote className="text-l leading-8 text-gray-100 sm:text-xl sm:leading-9 text-balance">
+ <blockquote className="text-l text-balance leading-8 text-gray-100 sm:text-xl sm:leading-9">
<p>
True builders listen to their users and build what they
need. Thanks Papermark team for solving a big pain point.
@@ -200,10 +203,10 @@ export default function Login() {
</p>
</blockquote>
<figcaption className="mt-4">
- <div className="font-semibold text-white text-balance ">
+ <div className="text-balance font-semibold text-white ">
Jaski
</div>
- <div className="text-gray-400 text-balance ">
+ <div className="text-balance text-gray-400 ">
Founder, Townhall Network
</div>
</figcaption>
diff --git a/app/(auth)/register/page.tsx b/app/(auth)/register/page.tsx
index 56b8f9d3..c88e69d3 100644
--- a/app/(auth)/register/page.tsx
+++ b/app/(auth)/register/page.tsx
@@ -1,15 +1,18 @@
"use client";
-import { Button } from "@/components/ui/button";
-import { signIn } from "next-auth/react";
+import Image from "next/image";
import Link from "next/link";
import { useParams } from "next/navigation";
-import { Input } from "@/components/ui/input";
+
import { useState } from "react";
+
+import PapermarkLogo from "@/public/_static/papermark-logo.svg";
+import { signIn } from "next-auth/react";
import { toast } from "sonner";
+
import LinkedIn from "@/components/shared/icons/linkedin";
-import PapermarkLogo from "@/public/_static/papermark-logo.svg";
-import Image from "next/image";
+import { Button } from "@/components/ui/button";
+import { Input } from "@/components/ui/input";
export default function Register() {
const { next } = useParams as { next?: string };
@@ -30,7 +33,7 @@ export default function Register() {
}}
/>
</div>
- <div className="z-10 mt-[calc(20vh)] h-fit w-full mx-5 sm:mx-0 max-w-md overflow-hidden border border-border bg-gray-50 dark:bg-gray-900 rounded-lg sm:shadow-xl">
+ <div className="z-10 mx-5 mt-[calc(20vh)] h-fit w-full max-w-md overflow-hidden rounded-lg border border-border bg-gray-50 dark:bg-gray-900 sm:mx-0 sm:shadow-xl">
<div className="flex flex-col items-center justify-center space-y-3 px-4 py-6 pt-8 text-center sm:px-16">
<Link href="/">
<Image
@@ -40,12 +43,12 @@ export default function Register() {
alt="Papermark Logo"
/>
</Link>
- <h3 className="text-2xl text-foreground font-medium">
+ <h3 className="text-2xl font-medium text-foreground">
Start sharing documents
</h3>
</div>
<form
- className="flex flex-col p-4 pt-8 sm:px-16 gap-4"
+ className="flex flex-col gap-4 p-4 pt-8 sm:px-16"
onSubmit={(e) => {
e.preventDefault();
signIn("email", {
@@ -71,14 +74,14 @@ export default function Register() {
<Button type="submit">Continue with Email</Button>
</form>
<p className="text-center">or</p>
- <div className="flex flex-col px-4 py-8 sm:px-16 space-y-2">
+ <div className="flex flex-col space-y-2 px-4 py-8 sm:px-16">
<Button
onClick={() => {
signIn("google", {
...(next && next.length > 0 ? { callbackUrl: next } : {}),
});
}}
- className="flex justify-center items-center space-x-2"
+ className="flex items-center justify-center space-x-2"
>
<svg
xmlns="http://www.w3.org/2000/svg"
@@ -96,7 +99,7 @@ export default function Register() {
...(next && next.length > 0 ? { callbackUrl: next } : {}),
});
}}
- className="flex justify-center items-center space-x-2"
+ className="flex items-center justify-center space-x-2"
>
<LinkedIn />
<span>Continue with LinkedIn</span>
diff --git a/app/(static)/(legal)/privacy/page.tsx b/app/(static)/(legal)/privacy/page.tsx
index 4308d902..0e2b92a3 100644
--- a/app/(static)/(legal)/privacy/page.tsx
+++ b/app/(static)/(legal)/privacy/page.tsx
@@ -1,6 +1,6 @@
export default function PrivacyPage() {
return (
- <div className="relative pt-48 pb-14 mx-auto px-4 lg:px-8 bg-white text-black">
+ <div className="relative mx-auto bg-white px-4 pb-14 pt-48 text-black lg:px-8">
<article className="prose prose-slate mx-auto">
<h1>Privacy Policy</h1>
<p>Effective date: 09/04/2023</p>
diff --git a/app/(static)/(legal)/terms/page.tsx b/app/(static)/(legal)/terms/page.tsx
index 66414f33..eda6b43a 100644
--- a/app/(static)/(legal)/terms/page.tsx
+++ b/app/(static)/(legal)/terms/page.tsx
@@ -1,6 +1,6 @@
export default function TermsPage() {
return (
- <div className="relative pt-48 pb-14 mx-auto px-4 lg:px-8 bg-white text-black">
+ <div className="relative mx-auto bg-white px-4 pb-14 pt-48 text-black lg:px-8">
<article className="prose prose-slate mx-auto">
<h1>Terms of Service</h1>
<p>Effective date: 26/04/2024</p>
diff --git a/app/(static)/alternatives/[slug]/page.tsx b/app/(static)/alternatives/[slug]/page.tsx
index c54aaf77..18e6fefb 100644
--- a/app/(static)/alternatives/[slug]/page.tsx
+++ b/app/(static)/alternatives/[slug]/page.tsx
@@ -1,15 +1,15 @@
import { type Metadata } from "next";
+import Link from "next/link";
+import { notFound } from "next/navigation";
-import Testimonials from "@/components/web/testimonials";
-import Features from "@/components/web/alternatives/features";
-import FAQ from "@/components/web/faq";
-import { Button } from "@/components/ui/button";
import { CheckIcon, XIcon } from "lucide-react";
-import Link from "next/link";
+import { Button } from "@/components/ui/button";
+import Features from "@/components/web/alternatives/features";
+import FAQ from "@/components/web/faq";
+import Testimonials from "@/components/web/testimonials";
import { getAlternative, getAlternatives } from "@/lib/content/alternative";
-import { notFound } from "next/navigation";
import { constructMetadata } from "@/lib/utils";
export async function generateStaticParams() {
@@ -44,8 +44,8 @@ export default async function AlternativePage({
if (!alternative) return notFound();
return (
- <div className="flex flex-1 flex-col bg-white text-black justify-center">
- <div className="max-w-5xl w-full mx-auto px-4 md:px-8 text-center">
+ <div className="flex flex-1 flex-col justify-center bg-white text-black">
+ <div className="mx-auto w-full max-w-5xl px-4 text-center md:px-8">
<div className="pt-32">
<div className=" pb-4">
<img
@@ -59,19 +59,19 @@ export default async function AlternativePage({
{/* <div className="relative rounded-full px-3 py-1 text-sm leading-6 text-black ring-black/10 hover:ring-white/20">
Free {alternative.name} alternative
</div> */}
- <h1 className="text-6xl text-balance">{alternative.title}</h1>
- <p className="text-xl mt-8 text-balance max-w-3xl mx-auto md:text-2xl">
+ <h1 className="text-balance text-6xl">{alternative.title}</h1>
+ <p className="mx-auto mt-8 max-w-3xl text-balance text-xl md:text-2xl">
{alternative.description}
</p>
- <div className="pt-8 space-x-2">
+ <div className="space-x-2 pt-8">
<Link href="/login">
- <Button className="text-white bg-gray-900 rounded-3xl hover:bg-gray-500 justify-center">
+ <Button className="justify-center rounded-3xl bg-gray-900 text-white hover:bg-gray-500">
Send Document
</Button>
</Link>
</div>
</div>
- <div className="mt-24 mx-auto w-full">
+ <div className="mx-auto mt-24 w-full">
<video
width="100%"
id="video1"
@@ -91,33 +91,33 @@ export default async function AlternativePage({
</div>
</div>
{/* Comparison section */}
- <div className="max-w-5xl w-full mx-auto px-4 md:px-8">
- <div className="pt-32 pb-2">
- <h2 className="text-5xl text-balance">
+ <div className="mx-auto w-full max-w-5xl px-4 md:px-8">
+ <div className="pb-2 pt-32">
+ <h2 className="text-balance text-5xl">
{alternative.subtitlecompare}
</h2>
- <p className="text-xl mt-8 text-balance max-w-3xl">
+ <p className="mt-8 max-w-3xl text-balance text-xl">
{alternative.descriptioncompare}
</p>
</div>
<div className="bg-white py-16">
<div className="mx-auto max-w-5xl ">
- <div className="isolate grid grid-cols-1 md:grid-cols-2 border border-black rounded-xl overflow-hidden">
+ <div className="isolate grid grid-cols-1 overflow-hidden rounded-xl border border-black md:grid-cols-2">
{/* Column 1 - Papermark */}
- <div className="border-black border-r-0 md:odd:border-r xl:even:border-r xl:last:!border-r-0 flex flex-col justify-between">
+ <div className="flex flex-col justify-between border-r-0 border-black md:odd:border-r xl:last:!border-r-0 xl:even:border-r">
<div>
- <div className="border-b border-black p-6 bg-gray-100">
- <h3 className="text-balance text-gray-800 text-xl leading-8">
+ <div className="border-b border-black bg-gray-100 p-6">
+ <h3 className="text-balance text-xl leading-8 text-gray-800">
Papermark
</h3>
</div>
<div className="p-6">
- <p className="mt-4 text-sm leading-6 text-gray-500 text-balance">
+ <p className="mt-4 text-balance text-sm leading-6 text-gray-500">
Papermark plans start from freemium
</p>
<div className="flex flex-col justify-between"></div>
- <p className="mt-4 text-2xl text-balance font-semibold leading-6 text-gray-900">
+ <p className="mt-4 text-balance text-2xl font-semibold leading-6 text-gray-900">
$0
</p>
<ul className="mt-8 space-y-3 text-sm leading-6 text-gray-500">
@@ -176,7 +176,7 @@ export default async function AlternativePage({
>
<Button
variant="outline"
- className="text-balance rounded-3xl bg-transparent bg-[#fb7a00] hover:bg-gray-500"
+ className="text-balance rounded-3xl bg-[#fb7a00] bg-transparent hover:bg-gray-500"
>
Start for free
</Button>
@@ -186,7 +186,7 @@ export default async function AlternativePage({
{/* Column 2 - Docsend */}
<div className="flex flex-col justify-between">
<div>
- <div className="border-b border-black p-6 bg-gray-100">
+ <div className="border-b border-black bg-gray-100 p-6">
<h3 className="text-xl leading-8 text-gray-800">
{alternative.name}
</h3>
@@ -195,7 +195,7 @@ export default async function AlternativePage({
<p className="mt-4 text-sm leading-6 text-gray-500">
{`${alternative.name} feature description`}
</p>
- <p className="mt-4 text-2xl text-balance font-semibold leading-6 text-gray-900">
+ <p className="mt-4 text-balance text-2xl font-semibold leading-6 text-gray-900">
{alternative.price}
</p>
<ul className="mt-8 space-y-3 text-sm leading-6 text-gray-500">
@@ -254,7 +254,7 @@ export default async function AlternativePage({
>
<Button
variant="outline"
- className="text-balance rounded-3xl bg-transparent border-black"
+ className="text-balance rounded-3xl border-black bg-transparent"
>
{`Start with ${alternative.name} alternative`}
</Button>
@@ -267,10 +267,10 @@ export default async function AlternativePage({
{/* Features*/}
<div
- className="w-full mx-auto max-w-5xl px-4 md:px-8 py-20"
+ className="mx-auto w-full max-w-5xl px-4 py-20 md:px-8"
id="features"
>
- <h2 className="text-4xl text-balance pt-12 pb-20 max-w-3xl">
+ <h2 className="max-w-3xl text-balance pb-20 pt-12 text-4xl">
{alternative.subtitlefeatures}{" "}
<span className="text-gray-500">
{alternative.descriptionfeatures}
@@ -283,10 +283,10 @@ export default async function AlternativePage({
{/* FAQ section */}
<div
- className="w-full mx-auto max-w-5xl px-4 md:px-8 py-32"
+ className="mx-auto w-full max-w-5xl px-4 py-32 md:px-8"
id="features"
>
- <h2 className="text-4xl text-balance pt-6 max-w-3xl">
+ <h2 className="max-w-3xl text-balance pt-6 text-4xl">
FAQ{" "}
<span className="text-gray-500">{alternative.descriptionfaq}</span>
</h2>
@@ -295,10 +295,10 @@ export default async function AlternativePage({
{/* CTA */}
<div className="bg-[#fb7a00]">
- <div className="w-full mx-auto max-w-5xl py-32 px-4 md:px-8">
- <h2 className="text-4xl text-balance">{alternative.subtitlecta}</h2>
+ <div className="mx-auto w-full max-w-5xl px-4 py-32 md:px-8">
+ <h2 className="text-balance text-4xl">{alternative.subtitlecta}</h2>
- <div className="pt-8 space-x-2">
+ <div className="space-x-2 pt-8">
<Link href="/login">
<Button className="text-balance rounded-3xl">
Start sending documents for free
diff --git a/app/(static)/blog/[slug]/page.tsx b/app/(static)/blog/[slug]/page.tsx
index 7a58e08c..c51ede25 100644
--- a/app/(static)/blog/[slug]/page.tsx
+++ b/app/(static)/blog/[slug]/page.tsx
@@ -1,12 +1,14 @@
-import { getPostsRemote as getPosts, getPost } from "@/lib/content/blog";
-import { ContentBody } from "@/components/mdx/post-body";
-import { notFound } from "next/navigation";
+import { Metadata } from "next";
import Link from "next/link";
+import { notFound } from "next/navigation";
+
import BlurImage from "@/components/blur-image";
-import { constructMetadata, formatDate } from "@/lib/utils";
-import { Metadata } from "next";
+import { ContentBody } from "@/components/mdx/post-body";
import TableOfContents from "@/components/mdx/table-of-contents";
+import { getPost, getPostsRemote as getPosts } from "@/lib/content/blog";
+import { constructMetadata, formatDate } from "@/lib/utils";
+
export async function generateStaticParams() {
const posts = await getPosts();
return posts.map((post) => ({ slug: post?.data.slug }));
@@ -41,19 +43,19 @@ export default async function BlogPage({
return (
<>
- <div className="max-w-7xl w-full mx-auto px-4 md:px-8 mb-10">
+ <div className="mx-auto mb-10 w-full max-w-7xl px-4 md:px-8">
<div className="flex max-w-screen-sm flex-col space-y-4 pt-16">
<div className="flex items-center space-x-4">
<time dateTime={post.data.publishedAt} className="text-sm">
{formatDate(post.data.publishedAt)}
</time>
</div>
- <h1 className="text-4xl md:text-6xl text-balance">
+ <h1 className="text-balance text-4xl md:text-6xl">
{post.data.title}
</h1>
<p className="text-xl text-gray-600">{post.data.summary}</p>
- <div className="items-center space-x-4 flex flex-col self-start">
+ <div className="flex flex-col items-center space-x-4 self-start">
<Link
href={`https://twitter.com/mfts0`}
className="group flex items-center space-x-3"
@@ -77,11 +79,11 @@ export default async function BlogPage({
</div>
<div className="relative">
- <div className="grid grid-cols-4 gap-10 py-10 max-w-7xl w-full mx-auto px-4 md:px-8">
- <div className="relative col-span-4 mb-10 flex flex-col space-y-8 bg-white md:col-span-3 sm:border-r sm:border-orange-500">
+ <div className="mx-auto grid w-full max-w-7xl grid-cols-4 gap-10 px-4 py-10 md:px-8">
+ <div className="relative col-span-4 mb-10 flex flex-col space-y-8 bg-white sm:border-r sm:border-orange-500 md:col-span-3">
<div
data-mdx-container
- className="prose prose-h2:mb-2 first:prose-h2:mt-0 prose-h2:mt-10 prose-headings:font-medium sm:max-w-screen-md sm:pr-2 md:pr-0"
+ className="prose prose-headings:font-medium prose-h2:mb-2 prose-h2:mt-10 first:prose-h2:mt-0 sm:max-w-screen-md sm:pr-2 md:pr-0"
>
<ContentBody>{post.body}</ContentBody>
</div>
diff --git a/app/(static)/blog/page.tsx b/app/(static)/blog/page.tsx
index bc69092a..e0d7ac70 100644
--- a/app/(static)/blog/page.tsx
+++ b/app/(static)/blog/page.tsx
@@ -1,4 +1,5 @@
import Link from "next/link";
+
import { getPostsRemote as getPosts } from "@/lib/content/blog";
export default async function BlogIndex() {
@@ -7,10 +8,10 @@ export default async function BlogIndex() {
<div className="bg-white py-24 sm:py-32">
<div className="mx-auto max-w-7xl px-6 lg:px-8">
<div className="mx-auto max-w-2xl lg:mx-0">
- <h2 className="text-6xl text-balance text-gray-900 sm:text-6xl">
+ <h2 className="text-balance text-6xl text-gray-900 sm:text-6xl">
Papermark Blog
</h2>
- <p className="mt-2 text-lg leading-8 text-gray-500 text-balance">
+ <p className="mt-2 text-balance text-lg leading-8 text-gray-500">
All insights on secure document sharing in 2024
</p>
</div>
@@ -21,11 +22,11 @@ export default async function BlogIndex() {
className="flex max-w-xl flex-col items-start justify-between"
>
<div className="flex items-center gap-x-4 text-xs">
- <h1 className="text-2xl md:text-2xl text-balance">
+ <h1 className="text-balance text-2xl md:text-2xl">
{post?.data.title}
</h1>
</div>
- <p className="mt-1 text-xs md:text-xs text-balance text-gray-500">
+ <p className="mt-1 text-balance text-xs text-gray-500 md:text-xs">
{post?.data.summary}
</p>
@@ -33,7 +34,7 @@ export default async function BlogIndex() {
<h3 className="mt-4 text-lg font-semibold leading-6 text-gray-900 group-hover:text-gray-600">
<Link
href={`/blog/${post?.data.slug}`}
- className="text-gray-500 text-balance font-light text-xs rounded-3xl bg-transparent border border-gray-500 px-4 py-2"
+ className="text-balance rounded-3xl border border-gray-500 bg-transparent px-4 py-2 text-xs font-light text-gray-500"
target="_blank"
rel="noopener noreferrer"
>
diff --git a/app/(static)/help/article/[slug]/page.tsx b/app/(static)/help/article/[slug]/page.tsx
index 8d3829d8..37fd5c23 100644
--- a/app/(static)/help/article/[slug]/page.tsx
+++ b/app/(static)/help/article/[slug]/page.tsx
@@ -1,10 +1,10 @@
-import { getHelpArticles, getHelpArticle } from "@/lib/content/help";
-import { ContentBody } from "@/components/mdx/post-body";
-import { notFound } from "next/navigation";
+import { Metadata } from "next";
import Link from "next/link";
+import { notFound } from "next/navigation";
+
import BlurImage from "@/components/blur-image";
-import { constructMetadata, formatDate } from "@/lib/utils";
-import { Metadata } from "next";
+import { ContentBody } from "@/components/mdx/post-body";
+import TableOfContents from "@/components/mdx/table-of-contents";
import {
Breadcrumb,
BreadcrumbItem,
@@ -13,7 +13,9 @@ import {
BreadcrumbPage,
BreadcrumbSeparator,
} from "@/components/ui/breadcrumb";
-import TableOfContents from "@/components/mdx/table-of-contents";
+
+import { getHelpArticle, getHelpArticles } from "@/lib/content/help";
+import { constructMetadata, formatDate } from "@/lib/utils";
export async function generateStaticParams() {
const articles = await getHelpArticles();
@@ -51,7 +53,7 @@ export default async function BlogPage({
return (
<>
- <div className="max-w-7xl w-full mx-auto px-4 md:px-8 mb-10">
+ <div className="mx-auto mb-10 w-full max-w-7xl px-4 md:px-8">
<div className="flex max-w-screen-sm flex-col space-y-4 pt-16">
<div className="flex items-center space-x-4">
<Breadcrumb>
@@ -72,12 +74,12 @@ export default async function BlogPage({
</BreadcrumbList>
</Breadcrumb>
</div>
- <h1 className="text-4xl md:text-5xl text-balance">
+ <h1 className="text-balance text-4xl md:text-5xl">
{article.data.title}
</h1>
<p className="text-lg text-gray-600">{article.data.summary}</p>
- <div className="items-center space-x-4 flex flex-col self-start">
+ <div className="flex flex-col items-center space-x-4 self-start">
<Link
href={`https://twitter.com/mfts0`}
className="group flex items-center space-x-3"
@@ -106,11 +108,11 @@ export default async function BlogPage({
</div>
<div className="relative">
- <div className="grid grid-cols-4 gap-10 py-10 max-w-7xl w-full mx-auto px-4 md:px-8">
- <div className="relative col-span-4 mb-10 flex flex-col space-y-8 bg-white md:col-span-3 sm:border-r sm:border-orange-500">
+ <div className="mx-auto grid w-full max-w-7xl grid-cols-4 gap-10 px-4 py-10 md:px-8">
+ <div className="relative col-span-4 mb-10 flex flex-col space-y-8 bg-white sm:border-r sm:border-orange-500 md:col-span-3">
<div
data-mdx-container
- className="prose prose-h2:mb-2 first:prose-h2:mt-0 prose-h2:mt-10 prose-headings:font-medium sm:max-w-screen-md sm:pr-2 md:pr-0"
+ className="prose prose-headings:font-medium prose-h2:mb-2 prose-h2:mt-10 first:prose-h2:mt-0 sm:max-w-screen-md sm:pr-2 md:pr-0"
>
<ContentBody>{article.body}</ContentBody>
</div>
diff --git a/app/(static)/investors/ClientPage.tsx b/app/(static)/investors/ClientPage.tsx
index 16e6dea6..d539b43f 100644
--- a/app/(static)/investors/ClientPage.tsx
+++ b/app/(static)/investors/ClientPage.tsx
@@ -1,15 +1,17 @@
"use client";
-import Fuse from "fuse.js";
-
+import Image from "next/image";
+import Link from "next/link";
import { useSearchParams } from "next/navigation";
+
import { useMemo, useState } from "react";
-import { GlobeIcon, SearchIcon } from "lucide-react";
-import classNames from "clsx";
-import Link from "next/link";
-import Image from "next/image";
-import PlaceholderImg from "@/public/_static/placeholder.png";
+
import PapermarkPImg from "@/public/_static/papermark-p.svg";
+import PlaceholderImg from "@/public/_static/placeholder.png";
+import classNames from "clsx";
+import Fuse from "fuse.js";
+import { GlobeIcon, SearchIcon } from "lucide-react";
+
import { Button } from "@/components/ui/button";
const searchOptions = {
@@ -112,8 +114,8 @@ export default function Dashboard({ data }: any) {
return (
<>
- <div className="sm:flex flex-col md:flex-row justify-between mt-4">
- <span className="isolate mt-5 inline-flex rounded-md shadow-sm w-fit px-2 md:px-0">
+ <div className="mt-4 flex-col justify-between sm:flex md:flex-row">
+ <span className="isolate mt-5 inline-flex w-fit rounded-md px-2 shadow-sm md:px-0">
{stages.map((stage) => (
<Link
href={
@@ -126,7 +128,7 @@ export default function Dashboard({ data }: any) {
category === stage.id || (!category && stage.id === "7")
? "bg-gray-200"
: "bg-white hover:bg-gray-50",
- "relative inline-flex items-center first-of-type:rounded-l-md last-of-type:rounded-r-md border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 focus:z-10 focus:outline-none focus:ring-gray-500 -ml-px first-of-type:-ml-0",
+ "relative -ml-px inline-flex items-center border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 first-of-type:-ml-0 first-of-type:rounded-l-md last-of-type:rounded-r-md focus:z-10 focus:outline-none focus:ring-gray-500",
)}
>
{stage.label}
@@ -135,7 +137,7 @@ export default function Dashboard({ data }: any) {
</span>
<div className="relative mt-5 px-2 md:px-0">
<SearchIcon
- className="h-5 w-5 absolute z-20 left-3 bottom-2 ml-1 md:ml-0"
+ className="absolute bottom-2 left-3 z-20 ml-1 h-5 w-5 md:ml-0"
aria-hidden="true"
/>
<input
@@ -144,21 +146,21 @@ export default function Dashboard({ data }: any) {
name="search"
value={search}
onChange={(e) => setSearch(e.target.value)}
- className="w-full rounded-xl shadow-sm inline-flex relative items-center border border-gray-300 px-4 py-2 text-sm text-gray-700 placeholder:text-gray-400 focus:z-10 focus:outline-none focus:ring-gray-500 md:w-72 pl-10 xs:pl-12"
+ className="xs:pl-12 relative inline-flex w-full items-center rounded-xl border border-gray-300 px-4 py-2 pl-10 text-sm text-gray-700 shadow-sm placeholder:text-gray-400 focus:z-10 focus:outline-none focus:ring-gray-500 md:w-72"
placeholder="Search by name or country"
/>
</div>
</div>
<div className="mt-8 flex flex-col">
- <div className="-my-2 -mx-4 overflow-x-auto sm:-mx-6 lg:-mx-8">
- <div className="inline-block min-w-full py-2 align-middle px-6 lg:px-8">
+ <div className="-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
+ <div className="inline-block min-w-full px-6 py-2 align-middle lg:px-8">
<div className="py-2">
<span className="font-bold">{currentInvestors.length}</span>{" "}
investors
</div>
- <div className="overflow-hidden md:shadow md:ring-1 md:ring-black md:ring-opacity-5 rounded-lg">
- <table className="min-w-full md:divide-y bg-gray-100 md:bg-transparent divide-gray-300 rounded-lg overflow-hidden md:rounded-none">
- <thead className="bg-gray-50 hidden md:table-header-group">
+ <div className="overflow-hidden rounded-lg md:shadow md:ring-1 md:ring-black md:ring-opacity-5">
+ <table className="min-w-full divide-gray-300 overflow-hidden rounded-lg bg-gray-100 md:divide-y md:rounded-none md:bg-transparent">
+ <thead className="hidden bg-gray-50 md:table-header-group">
<tr>
<th
scope="col"
@@ -193,20 +195,20 @@ export default function Dashboard({ data }: any) {
</tr>
</thead>
- <tbody className="md:divide-y divide-gray-200 md:bg-white grid grid-cols-1 gap-3 sm:grid-cols-2 md:table-row-group">
+ <tbody className="grid grid-cols-1 gap-3 divide-gray-200 sm:grid-cols-2 md:table-row-group md:divide-y md:bg-white">
{paginatedInvestors.map((investor: any) => (
// Assuming you have a slug or some unique identifier for each investor
<tr
key={investor.id}
- className="hover:bg-gray-100 group grid grid-cols-3 gap-1 md:table-row bg-white rounded-lg md:rounded-none md:bg-transparent shadow md:shadow-none border border-gray-200 md:border-x-0 py-3 px-2 md:p-0"
+ className="group grid grid-cols-3 gap-1 rounded-lg border border-gray-200 bg-white px-2 py-3 shadow hover:bg-gray-100 md:table-row md:rounded-none md:border-x-0 md:bg-transparent md:p-0 md:shadow-none"
>
- <td className="col-span-3 whitespace-nowrap pl-3 md:py-2 md:pl-6 text-sm sm:pl-6 md:h-24">
+ <td className="col-span-3 whitespace-nowrap pl-3 text-sm sm:pl-6 md:h-24 md:py-2 md:pl-6">
<div className="flex items-center space-x-2">
<div className="h-10 w-10 flex-shrink-0">
{investor.imageUrl ? (
<img
- className="rounded-full h-10 w-10 object-contain"
+ className="h-10 w-10 rounded-full object-contain"
width={40}
height={40}
src={
@@ -218,7 +220,7 @@ export default function Dashboard({ data }: any) {
/>
) : (
<Image
- className="rounded-full h-10 w-10 object-contain"
+ className="h-10 w-10 rounded-full object-contain"
width={40}
height={40}
src={PlaceholderImg}
@@ -230,7 +232,7 @@ export default function Dashboard({ data }: any) {
<div className="font-medium text-gray-900">
{investor.name}
</div>
- <div className="flex space-x-2 items-center">
+ <div className="flex items-center space-x-2">
{investor.website && (
<a
className="text-black"
@@ -239,7 +241,7 @@ export default function Dashboard({ data }: any) {
rel="noopener"
>
<span className="sr-only">Website</span>
- <GlobeIcon className="w-4 h-4" />
+ <GlobeIcon className="h-4 w-4" />
</a>
)}
<Link
@@ -250,27 +252,27 @@ export default function Dashboard({ data }: any) {
width={18}
height={18}
alt="Papermark"
- className="block ring-1 ring-gray-300 rounded-full"
+ className="block rounded-full ring-1 ring-gray-300"
/>
</Link>
</div>
</div>
</div>
</td>
- <td className="col-span-1 row-start-2 whitespace-nowrap px-3 md:px-2 md:py-3 text-sm text-gray-500 font-bold md:font-normal">
+ <td className="col-span-1 row-start-2 whitespace-nowrap px-3 text-sm font-bold text-gray-500 md:px-2 md:py-3 md:font-normal">
{investor.round ? investor.round : "Unknown"}
</td>
- <td className="col-span-3 whitespace-nowrap px-3 md:px-2 md:py-3 text-sm text-gray-500 md:mt-0">
+ <td className="col-span-3 whitespace-nowrap px-3 text-sm text-gray-500 md:mt-0 md:px-2 md:py-3">
{investor.location ? investor.location : "Unknown"}
</td>
- <td className="col-span-3 md:max-w-xs px-3 md:px-2 md:py-3 text-sm text-gray-500 truncate w-40">
+ <td className="col-span-3 w-40 truncate px-3 text-sm text-gray-500 md:max-w-xs md:px-2 md:py-3">
{investor.sector ? investor.sector : "Unknown"}
</td>
- <td className="col-span-3 md:max-w-xs px-3 md:px-2 md:py-3 text-sm text-gray-500 truncate w-40">
+ <td className="col-span-3 w-40 truncate px-3 text-sm text-gray-500 md:max-w-xs md:px-2 md:py-3">
<a
href={`/investors/${encodeURIComponent(investor.slug)}`}
>
- <Button className="rounded-3xl bg-gray-200 text-xs text-gray-800 hover:bg-[#fb7a00]]">
+ <Button className="hover:bg-[#fb7a00]] rounded-3xl bg-gray-200 text-xs text-gray-800">
Learn more
</Button>
</a>
@@ -279,27 +281,27 @@ export default function Dashboard({ data }: any) {
))}
</tbody>
</table>
- <div className="flex justify-between items-center w-full my-4 px-4">
+ <div className="my-4 flex w-full items-center justify-between px-4">
<button
onClick={() => goToPage(currentPage - 1)}
disabled={currentPage === 1}
- className="px-2 py-2 rounded border text-xs"
+ className="rounded border px-2 py-2 text-xs"
>
Previous
</button>
- <div className="px-2 py-2 rounded text-xs">
+ <div className="rounded px-2 py-2 text-xs">
Page {currentPage} of {totalPages}
</div>
<button
onClick={() => goToPage(currentPage + 1)}
disabled={currentPage === totalPages}
- className="px-2 py-2 rounded border text-xs"
+ className="rounded border px-2 py-2 text-xs"
>
Next
</button>
</div>
{currentInvestors.length === 0 && (
- <div className="text-center my-10">No results found</div>
+ <div className="my-10 text-center">No results found</div>
)}
</div>
</div>
diff --git a/app/(static)/investors/Fallback.tsx b/app/(static)/investors/Fallback.tsx
index 3279cd13..6ff38609 100644
--- a/app/(static)/investors/Fallback.tsx
+++ b/app/(static)/investors/Fallback.tsx
@@ -1,10 +1,12 @@
-import Link from "next/link";
-import { cn } from "@/lib/utils";
import Image from "next/image";
-import PlaceholderImg from "@/public/_static/placeholder.png";
+import Link from "next/link";
+
import PapermarkPImg from "@/public/_static/papermark-p.svg";
+import PlaceholderImg from "@/public/_static/placeholder.png";
import { GlobeIcon } from "lucide-react";
+import { cn } from "@/lib/utils";
+
const stages = [
{ id: "7", label: "All" },
{ id: "5", label: "Pre-Seed" },
@@ -14,8 +16,11 @@ const stages = [
{ id: "4", label: "Series C" },
];
-export const FallbackInvestors = async ({allInvestors}: {allInvestors: any[]}) => {
-
+export const FallbackInvestors = async ({
+ allInvestors,
+}: {
+ allInvestors: any[];
+}) => {
const category = "7";
const pageSize = 10; // Showing 10 investors per page
@@ -32,8 +37,8 @@ export const FallbackInvestors = async ({allInvestors}: {allInvestors: any[]}) =
return (
<>
- <div className="sm:flex flex-col md:flex-row justify-between mt-4">
- <span className="isolate mt-5 inline-flex rounded-md shadow-sm w-fit px-2 lg:px-2 ">
+ <div className="mt-4 flex-col justify-between sm:flex md:flex-row">
+ <span className="isolate mt-5 inline-flex w-fit rounded-md px-2 shadow-sm lg:px-2 ">
{stages.map((stage) => (
<Link
href={
@@ -46,7 +51,7 @@ export const FallbackInvestors = async ({allInvestors}: {allInvestors: any[]}) =
category === stage.id || (!category && stage.id === "7")
? "bg-gray-200"
: "bg-white hover:bg-gray-50",
- "relative inline-flex items-center first-of-type:rounded-l-md last-of-type:rounded-r-md border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 focus:z-10 focus:outline-none focus:ring-gray-500 -ml-px first-of-type:-ml-0",
+ "relative -ml-px inline-flex items-center border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 first-of-type:-ml-0 first-of-type:rounded-l-md last-of-type:rounded-r-md focus:z-10 focus:outline-none focus:ring-gray-500",
)}
>
{stage.label}
@@ -55,15 +60,14 @@ export const FallbackInvestors = async ({allInvestors}: {allInvestors: any[]}) =
</span>
</div>
<div className="mt-8 flex flex-col">
- <div className="-my-2 -mx-4 overflow-x-auto sm:-mx-6 lg:-mx-8">
- <div className="inline-block min-w-full py-2 align-middle px-6 lg:px-8">
+ <div className="-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
+ <div className="inline-block min-w-full px-6 py-2 align-middle lg:px-8">
<div className="py-2">
- <span className="font-bold">{allInvestors.length}</span>{" "}
- investors
+ <span className="font-bold">{allInvestors.length}</span> investors
</div>
- <div className="overflow-hidden md:shadow md:ring-1 md:ring-black md:ring-opacity-5 rounded-lg">
- <table className="min-w-full md:divide-y bg-gray-100 md:bg-transparent divide-gray-300 rounded-lg overflow-hidden md:rounded-none">
- <thead className="bg-gray-50 hidden md:table-header-group">
+ <div className="overflow-hidden rounded-lg md:shadow md:ring-1 md:ring-black md:ring-opacity-5">
+ <table className="min-w-full divide-gray-300 overflow-hidden rounded-lg bg-gray-100 md:divide-y md:rounded-none md:bg-transparent">
+ <thead className="hidden bg-gray-50 md:table-header-group">
<tr>
<th
scope="col"
@@ -91,18 +95,18 @@ export const FallbackInvestors = async ({allInvestors}: {allInvestors: any[]}) =
</th>
</tr>
</thead>
- <tbody className="md:divide-y divide-gray-200 md:bg-white grid grid-cols-1 gap-3 sm:grid-cols-2 md:table-row-group">
+ <tbody className="grid grid-cols-1 gap-3 divide-gray-200 sm:grid-cols-2 md:table-row-group md:divide-y md:bg-white">
{paginatedInvestors.map((investor: any) => (
<tr
key={investor.id}
- className="group grid grid-cols-3 gap-1 md:table-row bg-white rounded-lg md:rounded-none md:bg-transparent shadow md:shadow-none border border-gray-200 md:border-x-0 py-3 px-2 md:p-0"
+ className="group grid grid-cols-3 gap-1 rounded-lg border border-gray-200 bg-white px-2 py-3 shadow md:table-row md:rounded-none md:border-x-0 md:bg-transparent md:p-0 md:shadow-none"
>
- <td className="col-span-3 whitespace-nowrap pl-3 md:py-2 md:pl-6 text-sm sm:pl-6 md:h-24">
+ <td className="col-span-3 whitespace-nowrap pl-3 text-sm sm:pl-6 md:h-24 md:py-2 md:pl-6">
<div className="flex items-center space-x-2">
<div className="h-10 w-10 flex-shrink-0">
{investor.imageUrl ? (
<img
- className="rounded-full h-10 w-10 object-contain"
+ className="h-10 w-10 rounded-full object-contain"
width={40}
height={40}
src={
@@ -114,7 +118,7 @@ export const FallbackInvestors = async ({allInvestors}: {allInvestors: any[]}) =
/>
) : (
<Image
- className="rounded-full h-10 w-10 object-contain"
+ className="h-10 w-10 rounded-full object-contain"
width={40}
height={40}
src={PlaceholderImg}
@@ -126,7 +130,7 @@ export const FallbackInvestors = async ({allInvestors}: {allInvestors: any[]}) =
<div className="font-medium text-gray-900">
{investor.name}
</div>
- <div className="flex space-x-2 items-center">
+ <div className="flex items-center space-x-2">
{investor.website && (
<a
className="text-black"
@@ -135,7 +139,7 @@ export const FallbackInvestors = async ({allInvestors}: {allInvestors: any[]}) =
rel="noopener"
>
<span className="sr-only">Website</span>
- <GlobeIcon className="w-4 h-4" />
+ <GlobeIcon className="h-4 w-4" />
</a>
)}
<Link
@@ -146,45 +150,45 @@ export const FallbackInvestors = async ({allInvestors}: {allInvestors: any[]}) =
width={18}
height={18}
alt="Papermark"
- className="block ring-1 ring-gray-300 rounded-full"
+ className="block rounded-full ring-1 ring-gray-300"
/>
</Link>
</div>
</div>
</div>
</td>
- <td className="col-span-1 row-start-2 whitespace-nowrap px-3 md:px-2 md:py-3 text-sm text-gray-500 font-bold md:font-normal">
+ <td className="col-span-1 row-start-2 whitespace-nowrap px-3 text-sm font-bold text-gray-500 md:px-2 md:py-3 md:font-normal">
{investor.round ? investor.round : "Unknown"}
</td>
- <td className="col-span-3 whitespace-nowrap px-3 md:px-2 md:py-3 text-sm text-gray-500 md:mt-0">
+ <td className="col-span-3 whitespace-nowrap px-3 text-sm text-gray-500 md:mt-0 md:px-2 md:py-3">
{investor.location ? investor.location : "Unknown"}
</td>
- <td className="col-span-3 md:max-w-xs px-3 md:px-2 md:py-3 text-sm text-gray-500 truncate w-40">
+ <td className="col-span-3 w-40 truncate px-3 text-sm text-gray-500 md:max-w-xs md:px-2 md:py-3">
{investor.sector ? investor.sector : "Unknown"}
</td>
</tr>
))}
</tbody>
</table>
- <div className="flex justify-between items-center w-full my-4 px-4">
+ <div className="my-4 flex w-full items-center justify-between px-4">
<button
disabled={currentPage === 1}
- className="px-2 py-2 rounded border text-xs"
+ className="rounded border px-2 py-2 text-xs"
>
Previous
</button>
- <div className="px-2 py-2 rounded text-xs">
+ <div className="rounded px-2 py-2 text-xs">
Page {currentPage} of {totalPages}
</div>
<button
disabled={currentPage === totalPages}
- className="px-2 py-2 rounded border text-xs"
+ className="rounded border px-2 py-2 text-xs"
>
Next
</button>
</div>
{allInvestors.length === 0 && (
- <div className="text-center my-10">No results found</div>
+ <div className="my-10 text-center">No results found</div>
)}
</div>
</div>
@@ -192,4 +196,4 @@ export const FallbackInvestors = async ({allInvestors}: {allInvestors: any[]}) =
</div>
</>
);
-}
\ No newline at end of file
+};
diff --git a/app/(static)/investors/[slug]/page.tsx b/app/(static)/investors/[slug]/page.tsx
index b649ff49..26ca6732 100644
--- a/app/(static)/investors/[slug]/page.tsx
+++ b/app/(static)/investors/[slug]/page.tsx
@@ -1,27 +1,30 @@
-import { getInvestor } from "@/lib/content/investor";
-import { notFound } from "next/navigation";
import Head from "next/head";
-import Footer from "@/components/web/footer";
+import Link from "next/link";
+import { notFound } from "next/navigation";
+
import { Disclosure } from "@headlessui/react";
import { CheckIcon } from "lucide-react";
import { XIcon } from "lucide-react";
-import { cn } from "@/lib/utils";
import {
- Plus as PlusSmallIcon,
- Minus as MinusSmallIcon,
RefreshCw as ArrowPathIcon,
GitPullRequestArrow as CloudArrowUpIcon,
Settings as Cog6ToothIcon,
Fingerprint as FingerPrintIcon,
Lock as LockClosedIcon,
+ Minus as MinusSmallIcon,
+ Plus as PlusSmallIcon,
HardDrive as ServerIcon,
} from "lucide-react";
-import Link from "next/link";
-import { classNames } from "@/lib/utils";
-import { LogoCloud } from "@/components/web/landing-page/logo-cloud";
+
import { Button } from "@/components/ui/button";
+import Footer from "@/components/web/footer";
+import { LogoCloud } from "@/components/web/landing-page/logo-cloud";
import Navbar from "@/components/web/navbar";
+import { getInvestor } from "@/lib/content/investor";
+import { cn } from "@/lib/utils";
+import { classNames } from "@/lib/utils";
+
export default async function InvestorPage({
params,
}: {
@@ -56,8 +59,8 @@ export default async function InvestorPage({
</Head>
{/* Hero section */}
- <div className="flex flex-1 flex-col bg-white text-black justify-center">
- <div className="max-w-5xl w-full mx-auto px-4 md:px-8 text-center">
+ <div className="flex flex-1 flex-col justify-center bg-white text-black">
+ <div className="mx-auto w-full max-w-5xl px-4 text-center md:px-8">
<div className="pt-32">
{/* <div className=" pb-4">
<img
@@ -68,19 +71,19 @@ export default async function InvestorPage({
height={50}
/>
</div> */}
- <div className="relative rounded-full inline-block my-4 ">
- <span className="px-3 py-1 text-sm leading-6 bg-green-100 text-green-600 border border-green-200 rounded-full text-balance">
+ <div className="relative my-4 inline-block rounded-full ">
+ <span className="text-balance rounded-full border border-green-200 bg-green-100 px-3 py-1 text-sm leading-6 text-green-600">
Active
</span>
</div>
- <h1 className="text-6xl text-balance">{investor.name}</h1>
- <p className="text-xl mt-8 text-balance max-w-3xl mx-auto md:text-2xl">
+ <h1 className="text-balance text-6xl">{investor.name}</h1>
+ <p className="mx-auto mt-8 max-w-3xl text-balance text-xl md:text-2xl">
Venture capital and investor firm
</p>
- <div className="pt-8 space-x-2">
+ <div className="space-x-2 pt-8">
<Link href={investor.website || "/investors"}>
- <Button className="text-white bg-gray-800 rounded-3xl hover:bg-gray-500 justify-center">
+ <Button className="justify-center rounded-3xl bg-gray-800 text-white hover:bg-gray-500">
{investor.name} website link
</Button>
</Link>
@@ -89,20 +92,20 @@ export default async function InvestorPage({
</div>
{/* Comparison section */}
- <div className="max-w-5xl w-full mx-auto px-4 md:px-8"></div>
+ <div className="mx-auto w-full max-w-5xl px-4 md:px-8"></div>
<div className="bg-white py-16">
<div className="mx-auto max-w-5xl px-4 md:px-8">
- <div className="isolate grid grid-cols-1 md:grid-cols-2 border border-black rounded-xl overflow-hidden">
+ <div className="isolate grid grid-cols-1 overflow-hidden rounded-xl border border-black md:grid-cols-2">
{/* First hardcoded tier */}
- <div className="border-black border-r-0 md:odd:border-r xl:even:border-r xl:last:!border-r-0 flex flex-col justify-between">
+ <div className="flex flex-col justify-between border-r-0 border-black md:odd:border-r xl:last:!border-r-0 xl:even:border-r">
<div>
- <div className="border-b border-black p-6 bg-gray-100">
- <h3 className="text-balance text-gray-800 text-xl leading-8">
+ <div className="border-b border-black bg-gray-100 p-6">
+ <h3 className="text-balance text-xl leading-8 text-gray-800">
Rounds {investor.name} invests
</h3>
</div>
<div className="p-6">
- <p className="mt-4 text-sm leading-6 text-gray-500 text-balance">
+ <p className="mt-4 text-balance text-sm leading-6 text-gray-500">
Investor stage information
</p>
<p className="mt-6 flex items-baseline gap-x-1">
@@ -128,15 +131,15 @@ export default async function InvestorPage({
</div>
{/* Second hardcoded tier */}
- <div className="border-black flex flex-col justify-between">
+ <div className="flex flex-col justify-between border-black">
<div>
- <div className="border-b border-black p-6 bg-gray-100">
- <h3 className="text-balance text-gray-800 text-xl leading-8">
+ <div className="border-b border-black bg-gray-100 p-6">
+ <h3 className="text-balance text-xl leading-8 text-gray-800">
Location {investor.name} invests
</h3>
</div>
<div className="p-6">
- <p className="mt-4 text-sm leading-6 text-gray-500 text-balance">
+ <p className="mt-4 text-balance text-sm leading-6 text-gray-500">
Investor primarily location but not limited
</p>
<p className="mt-6 flex items-baseline gap-x-1">
@@ -162,16 +165,16 @@ export default async function InvestorPage({
</div>
</div>
- <div className="my-8 isolate border border-black rounded-xl overflow-hidden">
+ <div className="isolate my-8 overflow-hidden rounded-xl border border-black">
<div className="flex flex-col justify-between">
<div>
- <div className="border-b border-black p-6 bg-gray-100">
- <h3 className="text-balance text-gray-800 text-xl leading-8">
+ <div className="border-b border-black bg-gray-100 p-6">
+ <h3 className="text-balance text-xl leading-8 text-gray-800">
Sector {investor.name} invests
</h3>
</div>
<div className="p-6">
- <p className="mt-4 text-sm leading-6 text-gray-500 text-balance">
+ <p className="mt-4 text-balance text-sm leading-6 text-gray-500">
Sectors primarily invested in
</p>
<p className="mt-6 flex items-baseline gap-x-1">
@@ -199,23 +202,23 @@ export default async function InvestorPage({
</div>
</div>
- <div className="w-full max-w-5xl px-4 md:px-8 mx-auto ">
- <div className="py-12 bg-[#fb7a00] rounded-3xl mx-auto px-6">
- <div className="flex lg:flex-row flex-col item-center justify-between space-y-10 lg:space-y-0">
- <h2 className="text-3xl text-nowrap">
+ <div className="mx-auto w-full max-w-5xl px-4 md:px-8 ">
+ <div className="mx-auto rounded-3xl bg-[#fb7a00] px-6 py-12">
+ <div className="item-center flex flex-col justify-between space-y-10 lg:flex-row lg:space-y-0">
+ <h2 className="text-nowrap text-3xl">
Looking for more investors? <br />
- <p className="text-gray-800 text-xl my-2">
+ <p className="my-2 text-xl text-gray-800">
Access our investor database with 10k+ venture capital firms
</p>
</h2>
- <div className="space-x-2 flex items-center">
+ <div className="flex items-center space-x-2">
<Link
href="/investors"
target="_blank"
rel="noopener noreferrer"
>
- <Button className="text-base rounded-3xl text-gray-200 bg-black hover:bg-gray-900">
+ <Button className="rounded-3xl bg-black text-base text-gray-200 hover:bg-gray-900">
Full investor database
</Button>
</Link>
@@ -226,10 +229,10 @@ export default async function InvestorPage({
{/* /* Feature Section*/}
<div
- className="w-full mx-auto max-w-5xl px-4 md:px-8 py-20"
+ className="mx-auto w-full max-w-5xl px-4 py-20 md:px-8"
id="features"
>
- <h2 className="text-4xl text-balance pt-12 pb-20 max-w-3xl">
+ <h2 className="max-w-3xl text-balance pb-20 pt-12 text-4xl">
Powered by Papermark{" "}
<span className="text-gray-500">
Open Source DocSend alternative to share your pitchdeck and
@@ -239,15 +242,15 @@ export default async function InvestorPage({
{/* Testimonial section */}
<div
- className="w-full mx-auto max-w-5xl px-4 md:px-8 py-20 bg-gray-100 rounded-3xl"
+ className="mx-auto w-full max-w-5xl rounded-3xl bg-gray-100 px-4 py-20 md:px-8"
id="features"
>
<div className="mx-auto flex flex-col items-center gap-x-8 gap-y-10 px-6 sm:gap-y-8 lg:px-8 xl:flex-row xl:items-stretch">
- <div className="-mt-8 w-full max-w-2xl xl:-mb-8 xl:w-96 xl:flex-none flex items-center justify-center my-6">
- <div className="relative w-64 h-64">
+ <div className="my-6 -mt-8 flex w-full max-w-2xl items-center justify-center xl:-mb-8 xl:w-96 xl:flex-none">
+ <div className="relative h-64 w-64">
{" "}
<img
- className="absolute inset-0 object-cover rounded-2xl bg-gray-800 shadow-2xl"
+ className="absolute inset-0 rounded-2xl bg-gray-800 object-cover shadow-2xl"
src="https://www.papermark.io/_static/testimonials/jaski.jpeg"
alt=""
/>
@@ -271,7 +274,7 @@ export default async function InvestorPage({
x={86}
/>
</svg>
- <blockquote className="text-xl font-medium leading-8 text-balance text-gray-800 text-black sm:text-2xl sm:leading-9">
+ <blockquote className="text-balance text-xl font-medium leading-8 text-black text-gray-800 sm:text-2xl sm:leading-9">
<p>
Papermark solved a big pain point for me. DocSend
monopoly will end soon!
@@ -279,13 +282,13 @@ export default async function InvestorPage({
</blockquote>
<figcaption className="mt-8 text-balance ">
<div className="font-semibold text-black ">Jaski</div>
- <div className="mt-1 text-gray-500 my-6 ">
+ <div className="my-6 mt-1 text-gray-500 ">
Founder in web3 space
</div>
</figcaption>
</figure>
<Link href="/login" target="_blank" rel="noopener noreferrer">
- <Button className="text-base rounded-3xl text-gray-800 bg-[#fb7a00] hover:bg-gray-200">
+ <Button className="rounded-3xl bg-[#fb7a00] text-base text-gray-800 hover:bg-gray-200">
Join Jaski now
</Button>
</Link>
diff --git a/app/(static)/investors/page.tsx b/app/(static)/investors/page.tsx
index 71128559..d95fef83 100644
--- a/app/(static)/investors/page.tsx
+++ b/app/(static)/investors/page.tsx
@@ -1,17 +1,19 @@
import { Suspense } from "react";
+
+import { getInvestors } from "@/lib/content/investor";
+
import Dashboard from "./ClientPage";
import { FallbackInvestors } from "./Fallback";
-import { getInvestors } from "@/lib/content/investor";
export default async function HomePage() {
const allInvestors = await getInvestors();
return (
<>
- <div className="mx-auto max-w-6xl pt-4 mb-10">
- <div className="max-w-6xl mx-auto px-4 md:px-8 sm:pt-16 pt-8 text-gray-600">
- <div className="space-y-5 max-w-4xl mx-auto text-center mb-10">
- <h1 className="text-3xl text-gray-800 font-extrabold mx-auto sm:text-6xl max-w-3xl tracking-tighter">
+ <div className="mx-auto mb-10 max-w-6xl pt-4">
+ <div className="mx-auto max-w-6xl px-4 pt-8 text-gray-600 sm:pt-16 md:px-8">
+ <div className="mx-auto mb-10 max-w-4xl space-y-5 text-center">
+ <h1 className="mx-auto max-w-3xl text-3xl font-extrabold tracking-tighter text-gray-800 sm:text-6xl">
Investors Database
</h1>
<p>
diff --git a/app/(static)/layout.tsx b/app/(static)/layout.tsx
index 0a631141..3e267cba 100644
--- a/app/(static)/layout.tsx
+++ b/app/(static)/layout.tsx
@@ -1,6 +1,7 @@
+import { Metadata } from "next";
+
import Footer from "@/components/web/footer";
import Navbar from "@/components/web/navbar";
-import { Metadata } from "next";
const data = {
description:
diff --git a/app/(static)/open-source-investors/ClientPage.tsx b/app/(static)/open-source-investors/ClientPage.tsx
index ff9cd8d7..226f0db0 100644
--- a/app/(static)/open-source-investors/ClientPage.tsx
+++ b/app/(static)/open-source-investors/ClientPage.tsx
@@ -1,12 +1,16 @@
"use client";
-import Fuse from "fuse.js";
+import Link from "next/link";
import { useSearchParams } from "next/navigation";
+
import { useMemo, useState } from "react";
-import InvestorTable from "@/components/investors/table";
+
+import Fuse from "fuse.js";
+
import SearchBar from "@/components/investors/search";
import Stats from "@/components/investors/stats";
-import Link from "next/link";
+import InvestorTable from "@/components/investors/table";
+
import { cn } from "@/lib/utils";
const searchOptions = {
@@ -88,8 +92,8 @@ export default function Dashboard({ data }: any) {
return (
<>
<Stats angelsLength={angels.length} />
- <div className="sm:flex flex-col md:flex-row justify-between mt-4">
- <span className="isolate mt-5 inline-flex rounded-md shadow-sm w-fit">
+ <div className="mt-4 flex-col justify-between sm:flex md:flex-row">
+ <span className="isolate mt-5 inline-flex w-fit rounded-md shadow-sm">
{checkSizes.map((checkSize) => (
<Link
href={
@@ -99,11 +103,10 @@ export default function Dashboard({ data }: any) {
}
key={checkSize.id}
className={cn(
- category === checkSize.id ||
- (!category && checkSize.id === "7")
+ category === checkSize.id || (!category && checkSize.id === "7")
? "bg-gray-200"
: "bg-white hover:bg-gray-50",
- "relative inline-flex items-center first-of-type:rounded-l-md last-of-type:rounded-r-md border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 focus:z-10 focus:outline-none focus:ring-gray-500 -ml-px first-of-type:-ml-0",
+ "relative -ml-px inline-flex items-center border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 first-of-type:-ml-0 first-of-type:rounded-l-md last-of-type:rounded-r-md focus:z-10 focus:outline-none focus:ring-gray-500",
)}
>
{checkSize.label}
@@ -113,9 +116,9 @@ export default function Dashboard({ data }: any) {
<SearchBar search={search} setSearch={setSearch} />
</div>
<div className="mt-8 flex flex-col">
- <div className="-my-2 -mx-4 overflow-x-auto sm:-mx-6 lg:-mx-8">
- <div className="inline-block min-w-full py-2 align-middle px-6 lg:px-8">
- <div className="overflow-hidden md:shadow md:ring-1 md:ring-black md:ring-opacity-5 rounded-lg">
+ <div className="-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
+ <div className="inline-block min-w-full px-6 py-2 align-middle lg:px-8">
+ <div className="overflow-hidden rounded-lg md:shadow md:ring-1 md:ring-black md:ring-opacity-5">
<InvestorTable investors={angels} />
</div>
</div>
diff --git a/app/(static)/open-source-investors/page.tsx b/app/(static)/open-source-investors/page.tsx
index 21b14803..0c7781d9 100644
--- a/app/(static)/open-source-investors/page.tsx
+++ b/app/(static)/open-source-investors/page.tsx
@@ -1,10 +1,14 @@
import { Metadata } from "next";
-import Dashboard from "./ClientPage";
+import Link from "next/link";
+
+import { Suspense } from "react";
+
import Stats from "@/components/investors/stats";
import InvestorTable from "@/components/investors/table";
-import Link from "next/link";
+
import { cn } from "@/lib/utils";
-import { Suspense } from "react";
+
+import Dashboard from "./ClientPage";
export const revalidate = 3600; // revalidate the data at most every 24 hours
@@ -90,8 +94,8 @@ const InvestorFallback = ({ allInvestors }: { allInvestors: Investor[] }) => {
return (
<>
<Stats angelsLength={allInvestors.length} />
- <div className="sm:flex flex-col md:flex-row justify-between mt-4">
- <span className="isolate mt-5 inline-flex rounded-md shadow-sm w-fit">
+ <div className="mt-4 flex-col justify-between sm:flex md:flex-row">
+ <span className="isolate mt-5 inline-flex w-fit rounded-md shadow-sm">
{checkSizes.map((checkSize) => (
<Link
href={
@@ -104,7 +108,7 @@ const InvestorFallback = ({ allInvestors }: { allInvestors: Investor[] }) => {
category === checkSize.id || (!category && checkSize.id === "7")
? "bg-gray-200"
: "bg-white hover:bg-gray-50",
- "relative inline-flex items-center first-of-type:rounded-l-md last-of-type:rounded-r-md border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 focus:z-10 focus:outline-none focus:ring-gray-500 -ml-px first-of-type:-ml-0",
+ "relative -ml-px inline-flex items-center border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 first-of-type:-ml-0 first-of-type:rounded-l-md last-of-type:rounded-r-md focus:z-10 focus:outline-none focus:ring-gray-500",
)}
>
{checkSize.label}
@@ -113,9 +117,9 @@ const InvestorFallback = ({ allInvestors }: { allInvestors: Investor[] }) => {
</span>
</div>
<div className="mt-8 flex flex-col">
- <div className="-my-2 -mx-4 overflow-x-auto sm:-mx-6 lg:-mx-8">
- <div className="inline-block min-w-full py-2 align-middle px-6 lg:px-8">
- <div className="overflow-hidden md:shadow md:ring-1 md:ring-black md:ring-opacity-5 rounded-lg">
+ <div className="-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
+ <div className="inline-block min-w-full px-6 py-2 align-middle lg:px-8">
+ <div className="overflow-hidden rounded-lg md:shadow md:ring-1 md:ring-black md:ring-opacity-5">
<InvestorTable investors={allInvestors} />
</div>
</div>
@@ -131,10 +135,10 @@ export default async function HomePage() {
return (
<>
- <div className="mx-auto max-w-6xl pt-4 mb-10">
- <div className="max-w-6xl mx-auto px-4 md:px-8 sm:pt-16 pt-8 text-gray-600">
- <div className="space-y-5 max-w-4xl mx-auto text-center">
- <h1 className="text-3xl text-gray-800 font-extrabold mx-auto sm:text-6xl max-w-3xl tracking-tighter">
+ <div className="mx-auto mb-10 max-w-6xl pt-4">
+ <div className="mx-auto max-w-6xl px-4 pt-8 text-gray-600 sm:pt-16 md:px-8">
+ <div className="mx-auto max-w-4xl space-y-5 text-center">
+ <h1 className="mx-auto max-w-3xl text-3xl font-extrabold tracking-tighter text-gray-800 sm:text-6xl">
Find the next angel investor for your open-source project
</h1>
</div>
diff --git a/app/(static)/oss-friends/page.tsx b/app/(static)/oss-friends/page.tsx
index 3ca46c5c..0a1876a9 100644
--- a/app/(static)/oss-friends/page.tsx
+++ b/app/(static)/oss-friends/page.tsx
@@ -1,7 +1,8 @@
-import { Button } from "@/components/ui/button";
import { Metadata } from "next";
import Image from "next/image";
+import { Button } from "@/components/ui/button";
+
const data = {
description:
"Meet our fellow open source projects. Papermark is an open-source document infrastructure for sharing and collaboration.",
@@ -190,7 +191,7 @@ export default function Friends() {
{friends.map((friend) => (
<li
key={friend.id}
- className="overflow-hidden rounded-xl border border-gray-200 flex flex-col justify-between"
+ className="flex flex-col justify-between overflow-hidden rounded-xl border border-gray-200"
>
<div>
<div className="flex items-center gap-x-4 p-6">
@@ -202,14 +203,14 @@ export default function Friends() {
className="h-12 w-12 flex-none rounded-lg bg-white object-cover"
/>
</div>
- <div className="text-xl font-medium leading-6 text-gray-900 pb-1 px-6">
+ <div className="px-6 pb-1 text-xl font-medium leading-6 text-gray-900">
{friend.name}
</div>
- <p className="px-6 mt-2 text-gray-600 text-sm ">
+ <p className="mt-2 px-6 text-sm text-gray-600 ">
{friend.description}
</p>
</div>
- <div className="text-left px-6">
+ <div className="px-6 text-left">
<a
href={friend.buttonLink}
target="_blank"
@@ -218,7 +219,7 @@ export default function Friends() {
>
<Button
type="button"
- className="mt-4 mb-6 rounded-md bg-black text-sm font-semibold text-white shadow-sm"
+ className="mb-6 mt-4 rounded-md bg-black text-sm font-semibold text-white shadow-sm"
>
{friend.buttonText}
</Button>
diff --git a/app/(static)/solutions/[slug]/page.tsx b/app/(static)/solutions/[slug]/page.tsx
index 26ea0ec4..e6d597cd 100644
--- a/app/(static)/solutions/[slug]/page.tsx
+++ b/app/(static)/solutions/[slug]/page.tsx
@@ -1,11 +1,11 @@
import { type Metadata } from "next";
-
import Link from "next/link";
+import { notFound } from "next/navigation";
+
import { Button } from "@/components/ui/button";
import Testimonials from "@/components/web/testimonials";
-import { getPage, getPages } from "@/lib/content/page";
-import { notFound } from "next/navigation";
+import { getPage, getPages } from "@/lib/content/page";
import { constructMetadata } from "@/lib/utils";
export async function generateStaticParams() {
@@ -38,8 +38,8 @@ export default async function PagePage({
if (!page) return notFound();
return (
- <div className="flex flex-1 flex-col bg-white text-black justify-center">
- <div className="max-w-5xl w-full mx-auto px-4 md:px-8 text-center">
+ <div className="flex flex-1 flex-col justify-center bg-white text-black">
+ <div className="mx-auto w-full max-w-5xl px-4 text-center md:px-8">
<div className="pt-32">
{/* <div className=" pb-4">
<img
@@ -53,19 +53,19 @@ export default async function PagePage({
{/* <div className="relative rounded-full px-3 py-1 text-sm leading-6 text-black ring-black/10 hover:ring-white/20 text-balance">
Join 1000s happy users
</div> */}
- <h1 className="text-6xl text-balance">{page.title}</h1>
- <p className="text-xl mt-8 text-balance max-w-3xl mx-auto md:text-2xl">
+ <h1 className="text-balance text-6xl">{page.title}</h1>
+ <p className="mx-auto mt-8 max-w-3xl text-balance text-xl md:text-2xl">
{page.description}
</p>
- <div className="pt-8 space-x-2">
+ <div className="space-x-2 pt-8">
<Link href="/login">
- <Button className="text-white text-balance bg-gray-900 rounded-3xl hover:bg-gray-800 justify-center">
+ <Button className="justify-center text-balance rounded-3xl bg-gray-900 text-white hover:bg-gray-800">
{page.button}
</Button>
</Link>
</div>
</div>
- <div className="mt-24 mx-auto w-full">
+ <div className="mx-auto mt-24 w-full">
<video
width="100%"
id="video1"
@@ -90,16 +90,16 @@ export default async function PagePage({
<div className="grid grid-cols-1 gap-x-8 gap-y-16 sm:gap-y-20 lg:grid-cols-2 lg:items-start">
<div className="px-6 lg:px-0 lg:pr-4 lg:pt-4">
<div className="mx-auto max-w-2xl lg:mx-0 lg:max-w-lg">
- <h2 className="mt-2 text-3xl text-gray-900 sm:text-4xl text-balance">
+ <h2 className="mt-2 text-balance text-3xl text-gray-900 sm:text-4xl">
{page.subtitle1}
</h2>
- <p className="mt-6 text-lg leading-8 text-gray-600 text-balance">
+ <p className="mt-6 text-balance text-lg leading-8 text-gray-600">
{page.description1}
</p>
</div>
- <div className="pt-8 space-x-2">
+ <div className="space-x-2 pt-8">
<Link href="/login">
- <Button className="text-white text-balance bg-gray-900 rounded-3xl hover:bg-gray-800 justify-center">
+ <Button className="justify-center text-balance rounded-3xl bg-gray-900 text-white hover:bg-gray-800">
{page.button}
</Button>
</Link>
@@ -162,16 +162,16 @@ export default async function PagePage({
</div>
<div className="px-6 lg:px-0 lg:pr-4 lg:pt-4">
<div className="mx-auto max-w-2xl lg:mx-0 lg:max-w-lg">
- <h2 className="mt-2 text-3xl text-gray-900 sm:text-4xl text-balance">
+ <h2 className="mt-2 text-balance text-3xl text-gray-900 sm:text-4xl">
{page.subtitle2}
</h2>
- <p className="mt-6 text-lg leading-8 text-gray-600 text-balance">
+ <p className="mt-6 text-balance text-lg leading-8 text-gray-600">
{page.description2}
</p>
</div>
- <div className="pt-8 space-x-2">
+ <div className="space-x-2 pt-8">
<Link href="/login">
- <Button className="text-white text-balance bg-gray-900 rounded-3xl hover:bg-gray-800 justify-center">
+ <Button className="justify-center text-balance rounded-3xl bg-gray-900 text-white hover:bg-gray-800">
{page.button}
</Button>
</Link>
@@ -186,10 +186,10 @@ export default async function PagePage({
{/* CTA */}
<div className="bg-[#fb7a00]">
- <div className="w-full mx-auto max-w-5xl py-32 px-4 md:px-8">
- <h2 className="text-4xl text-balance ">{page.cta}</h2>
+ <div className="mx-auto w-full max-w-5xl px-4 py-32 md:px-8">
+ <h2 className="text-balance text-4xl ">{page.cta}</h2>
- <div className="pt-8 space-x-2">
+ <div className="space-x-2 pt-8">
<Link href="/login">
<Button className="text-balance rounded-3xl">
Start for free
diff --git a/app/api/cron/domains/route.ts b/app/api/cron/domains/route.ts
index 24e1e555..156251bf 100644
--- a/app/api/cron/domains/route.ts
+++ b/app/api/cron/domains/route.ts
@@ -1,6 +1,6 @@
import { NextResponse } from "next/server";
+
import { receiver } from "@/lib/cron";
-import { handleDomainUpdates } from "./utils";
import {
getConfigResponse,
getDomainResponse,
@@ -9,6 +9,8 @@ import {
import prisma from "@/lib/prisma";
import { log } from "@/lib/utils";
+import { handleDomainUpdates } from "./utils";
+
/**
* Cron to check if domains are verified.
* If a domain is invalid for more than 14 days, we send a reminder email to the owner.
@@ -116,7 +118,7 @@ export async function POST(req: Request) {
await log({
message: `Domains cron failed. \n\nError: ${(error as Error).message}`,
type: "cron",
- mention: true
+ mention: true,
});
return NextResponse.json({ error: (error as Error).message });
}
diff --git a/app/api/cron/domains/utils.ts b/app/api/cron/domains/utils.ts
index 46806daf..188c4ae9 100644
--- a/app/api/cron/domains/utils.ts
+++ b/app/api/cron/domains/utils.ts
@@ -1,9 +1,9 @@
-import { log } from "@/lib/utils";
import { deleteDomain } from "@/lib/api/domains";
-import prisma from "@/lib/prisma";
import { limiter } from "@/lib/cron";
import { sendDeletedDomainEmail } from "@/lib/emails/send-deleted-domain";
import { sendInvalidDomainEmail } from "@/lib/emails/send-invalid-domain";
+import prisma from "@/lib/prisma";
+import { log } from "@/lib/utils";
export const handleDomainUpdates = async ({
domain,
@@ -19,7 +19,10 @@ export const handleDomainUpdates = async ({
linksCount: number;
}) => {
if (changed) {
- await log({message: `Domain *${domain}* changed status to *${verified}*`, type: "cron"});
+ await log({
+ message: `Domain *${domain}* changed status to *${verified}*`,
+ type: "cron",
+ });
}
if (verified) return;
@@ -111,7 +114,7 @@ export const handleDomainUpdates = async ({
await log({
message: `Domain *${domain}* has been invalid for > 30 days and has links with clicks, skipping.`,
type: "cron",
- mention: true
+ mention: true,
});
return;
}
diff --git a/app/api/cron/upgrade/route.ts b/app/api/cron/upgrade/route.ts
index a06fe916..c40b41fc 100644
--- a/app/api/cron/upgrade/route.ts
+++ b/app/api/cron/upgrade/route.ts
@@ -1,9 +1,10 @@
import { NextResponse } from "next/server";
+
import { limiter, receiver } from "@/lib/cron";
+import { sendTrialEndFinalReminderEmail } from "@/lib/emails/send-trial-end-final-reminder";
+import { sendTrialEndReminderEmail } from "@/lib/emails/send-trial-end-reminder";
import prisma from "@/lib/prisma";
import { calculateDaysLeft, log } from "@/lib/utils";
-import { sendTrialEndReminderEmail } from "@/lib/emails/send-trial-end-reminder";
-import { sendTrialEndFinalReminderEmail } from "@/lib/emails/send-trial-end-final-reminder";
/**
* Cron to check if trial has expired.
diff --git a/app/api/trigger/route.ts b/app/api/trigger/route.ts
index fe3d6ce2..1bc4304a 100644
--- a/app/api/trigger/route.ts
+++ b/app/api/trigger/route.ts
@@ -1,7 +1,6 @@
-import { createAppRoute } from "@trigger.dev/nextjs";
-import { client } from "@/trigger";
-
import "@/jobs";
+import { client } from "@/trigger";
+import { createAppRoute } from "@trigger.dev/nextjs";
// This is the maximum duration of a job in seconds
export const maxDuration = 120;
diff --git a/app/layout.tsx b/app/layout.tsx
index 94d73935..7e49d8d0 100644
--- a/app/layout.tsx
+++ b/app/layout.tsx
@@ -1,8 +1,10 @@
-import "@/styles/globals.css";
import { Metadata } from "next";
-import PlausibleProvider from "next-plausible";
import { Inter } from "next/font/google";
+import PlausibleProvider from "next-plausible";
+
+import "@/styles/globals.css";
+
const inter = Inter({ subsets: ["latin"] });
const data = {
diff --git a/app/page.tsx b/app/page.tsx
index 5b221f8a..1d7dcc0b 100644
--- a/app/page.tsx
+++ b/app/page.tsx
@@ -1,22 +1,23 @@
-import Link from "next/link";
-import TwitterIcon from "@/components/shared/icons/twitter";
-import ProductHuntIcon from "@/components/shared/icons/producthunt";
-import { Button } from "@/components/ui/button";
import Image from "next/image";
-import Navbar from "@/components/web/navbar";
-import Footer from "@/components/web/footer";
-import { LogoCloud } from "@/components/web/landing-page/logo-cloud";
-import Testimonials from "@/components/web/testimonials";
+import Link from "next/link";
import {
RefreshCw as ArrowPathIcon,
+ BarChart3Icon,
Settings as Cog6ToothIcon,
- ServerIcon,
PaletteIcon,
+ ServerIcon,
SlidersIcon,
- BarChart3Icon,
} from "lucide-react";
+import ProductHuntIcon from "@/components/shared/icons/producthunt";
+import TwitterIcon from "@/components/shared/icons/twitter";
+import { Button } from "@/components/ui/button";
+import Footer from "@/components/web/footer";
+import { LogoCloud } from "@/components/web/landing-page/logo-cloud";
+import Navbar from "@/components/web/navbar";
+import Testimonials from "@/components/web/testimonials";
+
const features = [
{
name: "Fine-tune access control",
@@ -60,16 +61,16 @@ export default function Home() {
<div className="flex flex-1 flex-col bg-white text-black">
<Navbar />
- <div className="max-w-7xl w-full mx-auto px-4 md:px-8">
+ <div className="mx-auto w-full max-w-7xl px-4 md:px-8">
<div className="pt-24">
- <h1 className="text-6xl md:text-8xl text-balance">
+ <h1 className="text-balance text-6xl md:text-8xl">
The Open-Source DocSend Alternative
</h1>
- <p className="text-2xl mt-8 text-balance max-w-3xl">
+ <p className="mt-8 max-w-3xl text-balance text-2xl">
Papermark is a modern document sharing infrastructure with
built-in page analytics and full white-labeling
</p>
- <div className="pt-8 space-x-2">
+ <div className="space-x-2 pt-8">
<Link
href="https://cal.com/marcseitz/papermark"
target="_blank"
@@ -77,16 +78,16 @@ export default function Home() {
>
<Button
variant="outline"
- className="text-base rounded-3xl bg-transparent border-black"
+ className="rounded-3xl border-black bg-transparent text-base"
>
Book a demo
</Button>
</Link>
<Link href="/login">
- <Button className="text-base rounded-3xl">Send document</Button>
+ <Button className="rounded-3xl text-base">Send document</Button>
</Link>
</div>
- <div className="mt-24 mx-auto w-full">
+ <div className="mx-auto mt-24 w-full">
<video
width="100%"
id="video1"
@@ -106,16 +107,16 @@ export default function Home() {
</div>
</div>
- <div className="grid gap-16 md:gap-24 lg:gap-32 mt-20">
+ <div className="mt-20 grid gap-16 md:gap-24 lg:gap-32">
<div className="mx-auto mt-4 w-full px-0 lg:px-8 xl:p-0">
<LogoCloud />
</div>
</div>
</div>
- <div className="mt-24 bg-gray-50 w-full overflow-x-hidden">
- <div className="w-full mx-auto max-w-7xl px-4 md:px-8">
- <h2 className="text-4xl text-balance pt-20 pb-20">
+ <div className="mt-24 w-full overflow-x-hidden bg-gray-50">
+ <div className="mx-auto w-full max-w-7xl px-4 md:px-8">
+ <h2 className="text-balance pb-20 pt-20 text-4xl">
Share your documents, securely.{" "}
<span className="text-gray-500">
{/* Fine-tune access control. Receive real-time page analytics.
@@ -124,54 +125,54 @@ export default function Home() {
</span>
</h2>
</div>
- <div className="mx-4 sm:mx-0 sm:flex sm:flex-nowrap gap-6 lg:gap-10 mb-6 lg:mb-10 sm:translate-x-[-30px] text-balance">
- <div className="bg-gray-200 flex-none rounded-xl p-6 mb-6 sm:max-w-[300px] sm:p-6 sm:mb-0 md:max-w-[360px] lg:max-w-[500px] lg:p-8 xl:max-w-[560px] xl:p-10 2xl:max-w-[640px]">
- <p className="text-black/90 font-380 text-base lg:text-base xl:text-base 2xl:text-lg 2xl:-ml-0.5 tracking-tight leading-none">
+ <div className="mx-4 mb-6 gap-6 text-balance sm:mx-0 sm:flex sm:translate-x-[-30px] sm:flex-nowrap lg:mb-10 lg:gap-10">
+ <div className="mb-6 flex-none rounded-xl bg-gray-200 p-6 sm:mb-0 sm:max-w-[300px] sm:p-6 md:max-w-[360px] lg:max-w-[500px] lg:p-8 xl:max-w-[560px] xl:p-10 2xl:max-w-[640px]">
+ <p className="font-380 text-base leading-none tracking-tight text-black/90 lg:text-base xl:text-base 2xl:-ml-0.5 2xl:text-lg">
Real Estate
</p>
- <p className="text-black/90 font-380 text-xl -ml-0.5 md:text-2xl md:-ml-0.5 md:leading-none lg:text-4xl lg:-ml-0.5 xl:text-4xl xl:-ml-0.5 tracking-tighter leading-tight ">
+ <p className="font-380 -ml-0.5 text-xl leading-tight tracking-tighter text-black/90 md:-ml-0.5 md:text-2xl md:leading-none lg:-ml-0.5 lg:text-4xl xl:-ml-0.5 xl:text-4xl ">
Securely share property documents with clients
</p>
</div>
- <div className="bg-black/80 flex-none rounded-xl p-6 mb-6 sm:max-w-[300px] sm:p-6 sm:mb-0 md:max-w-[360px] lg:max-w-[500px] lg:p-8 xl:max-w-[560px] xl:p-10 2xl:max-w-[640px]">
- <p className="text-gray-50 font-380 text-base lg:text-base xl:text-base 2xl:text-lg 2xl:-ml-0.5 tracking-tight leading-none">
+ <div className="mb-6 flex-none rounded-xl bg-black/80 p-6 sm:mb-0 sm:max-w-[300px] sm:p-6 md:max-w-[360px] lg:max-w-[500px] lg:p-8 xl:max-w-[560px] xl:p-10 2xl:max-w-[640px]">
+ <p className="font-380 text-base leading-none tracking-tight text-gray-50 lg:text-base xl:text-base 2xl:-ml-0.5 2xl:text-lg">
Startups
</p>
- <p className="text-gray-50 font-380 text-xl -ml-0.5 md:text-2xl md:-ml-0.5 md:leading-none lg:text-4xl lg:-ml-0.5 xl:text-4xl xl:-ml-0.5 tracking-tighter leading-tight ">
+ <p className="font-380 -ml-0.5 text-xl leading-tight tracking-tighter text-gray-50 md:-ml-0.5 md:text-2xl md:leading-none lg:-ml-0.5 lg:text-4xl xl:-ml-0.5 xl:text-4xl ">
Take ownership of your fundraising process
</p>
</div>
- <div className="bg-gray-200 flex-none rounded-xl p-6 mb-6 sm:max-w-[300px] sm:p-6 sm:mb-0 md:max-w-[360px] lg:max-w-[500px] lg:p-8 xl:max-w-[560px] xl:p-10 2xl:max-w-[640px]">
- <p className="text-black/90 font-380 text-base lg:text-base xl:text-base 2xl:text-lg 2xl:-ml-0.5 tracking-tight leading-none">
+ <div className="mb-6 flex-none rounded-xl bg-gray-200 p-6 sm:mb-0 sm:max-w-[300px] sm:p-6 md:max-w-[360px] lg:max-w-[500px] lg:p-8 xl:max-w-[560px] xl:p-10 2xl:max-w-[640px]">
+ <p className="font-380 text-base leading-none tracking-tight text-black/90 lg:text-base xl:text-base 2xl:-ml-0.5 2xl:text-lg">
Growth
</p>
- <p className="text-black/90 font-380 text-xl -ml-0.5 md:text-2xl md:-ml-0.5 md:leading-none lg:text-4xl lg:-ml-0.5 xl:text-4xl xl:-ml-0.5 tracking-tighter leading-tight ">
+ <p className="font-380 -ml-0.5 text-xl leading-tight tracking-tighter text-black/90 md:-ml-0.5 md:text-2xl md:leading-none lg:-ml-0.5 lg:text-4xl xl:-ml-0.5 xl:text-4xl ">
Capture marketing-qualified leads on social media
</p>
</div>
</div>
- <div className="mx-4 sm:mx-0 sm:flex sm:flex-nowrap gap-6 lg:gap-10 mb-6 lg:mb-10 sm:translate-x-[50px] text-balance">
- <div className="bg-black/80 flex-none rounded-xl p-6 mb-6 sm:max-w-[300px] sm:p-6 sm:mb-0 md:max-w-[360px] lg:max-w-[500px] lg:p-8 xl:max-w-[560px] xl:p-10 2xl:max-w-[640px]">
- <p className="text-gray-50 font-380 text-base lg:text-base xl:text-base 2xl:text-lg 2xl:-ml-0.5 tracking-tight leading-none">
+ <div className="mx-4 mb-6 gap-6 text-balance sm:mx-0 sm:flex sm:translate-x-[50px] sm:flex-nowrap lg:mb-10 lg:gap-10">
+ <div className="mb-6 flex-none rounded-xl bg-black/80 p-6 sm:mb-0 sm:max-w-[300px] sm:p-6 md:max-w-[360px] lg:max-w-[500px] lg:p-8 xl:max-w-[560px] xl:p-10 2xl:max-w-[640px]">
+ <p className="font-380 text-base leading-none tracking-tight text-gray-50 lg:text-base xl:text-base 2xl:-ml-0.5 2xl:text-lg">
Sales
</p>
- <p className="text-gray-50 font-380 text-xl -ml-0.5 md:text-2xl md:-ml-0.5 md:leading-none lg:text-4xl lg:-ml-0.5 xl:text-4xl xl:-ml-0.5 tracking-tighter leading-tight ">
+ <p className="font-380 -ml-0.5 text-xl leading-tight tracking-tighter text-gray-50 md:-ml-0.5 md:text-2xl md:leading-none lg:-ml-0.5 lg:text-4xl xl:-ml-0.5 xl:text-4xl ">
Spend time on only engaged prospects
</p>
</div>
- <div className="bg-gray-200 flex-none rounded-xl p-6 mb-6 sm:max-w-[300px] sm:p-6 sm:mb-0 md:max-w-[360px] lg:max-w-[500px] lg:p-8 xl:max-w-[560px] xl:p-10 2xl:max-w-[640px]">
- <p className="text-black/90 font-380 text-base lg:text-base xl:text-base 2xl:text-lg 2xl:-ml-0.5 tracking-tight leading-none">
+ <div className="mb-6 flex-none rounded-xl bg-gray-200 p-6 sm:mb-0 sm:max-w-[300px] sm:p-6 md:max-w-[360px] lg:max-w-[500px] lg:p-8 xl:max-w-[560px] xl:p-10 2xl:max-w-[640px]">
+ <p className="font-380 text-base leading-none tracking-tight text-black/90 lg:text-base xl:text-base 2xl:-ml-0.5 2xl:text-lg">
Investors
</p>
- <p className="text-black/90 font-380 text-xl -ml-0.5 md:text-2xl md:-ml-0.5 md:leading-none lg:text-4xl lg:-ml-0.5 xl:text-4xl xl:-ml-0.5 tracking-tighter leading-tight">
+ <p className="font-380 -ml-0.5 text-xl leading-tight tracking-tighter text-black/90 md:-ml-0.5 md:text-2xl md:leading-none lg:-ml-0.5 lg:text-4xl xl:-ml-0.5 xl:text-4xl">
Take the guess-work out of LP updates
</p>
</div>
- <div className="bg-black/80 flex-none rounded-xl p-6 mb-6 sm:max-w-[300px] sm:p-6 sm:mb-0 md:max-w-[360px] lg:max-w-[500px] lg:p-8 xl:max-w-[560px] xl:p-10 2xl:max-w-[640px]">
- <p className="text-gray-50 font-380 text-base lg:text-base xl:text-base 2xl:text-lg 2xl:-ml-0.5 tracking-tight leading-none">
+ <div className="mb-6 flex-none rounded-xl bg-black/80 p-6 sm:mb-0 sm:max-w-[300px] sm:p-6 md:max-w-[360px] lg:max-w-[500px] lg:p-8 xl:max-w-[560px] xl:p-10 2xl:max-w-[640px]">
+ <p className="font-380 text-base leading-none tracking-tight text-gray-50 lg:text-base xl:text-base 2xl:-ml-0.5 2xl:text-lg">
Non-Profits
</p>
- <p className="text-gray-50 font-380 text-xl -ml-0.5 md:text-2xl md:-ml-0.5 md:leading-none lg:text-4xl lg:-ml-0.5 xl:text-4xl xl:-ml-0.5 tracking-tighter leading-tight ">
+ <p className="font-380 -ml-0.5 text-xl leading-tight tracking-tighter text-gray-50 md:-ml-0.5 md:text-2xl md:leading-none lg:-ml-0.5 lg:text-4xl xl:-ml-0.5 xl:text-4xl ">
Securely share and track grant applications
</p>
</div>
@@ -179,10 +180,10 @@ export default function Home() {
</div>
<div
- className="w-full mx-auto max-w-7xl px-4 md:px-8 py-20"
+ className="mx-auto w-full max-w-7xl px-4 py-20 md:px-8"
id="features"
>
- <h2 className="text-4xl text-balance pt-12 pb-20 max-w-3xl">
+ <h2 className="max-w-3xl text-balance pb-20 pt-12 text-4xl">
Built for modern teams.{" "}
<span className="text-gray-500">
Share your documents with an impression that lasts.
@@ -199,10 +200,10 @@ export default function Home() {
className="h-10 w-10 text-gray-800"
aria-hidden="true"
/>
- <dt className="inline text-gray-800 text-2xl">
+ <dt className="inline text-2xl text-gray-800">
{feature.name}
</dt>{" "}
- <dd className="inline text-base text-balance">
+ <dd className="inline text-balance text-base">
{feature.description}
</dd>
</div>
@@ -216,11 +217,11 @@ export default function Home() {
</div>
<div className="bg-[#fb7a00]">
- <div className="w-full mx-auto max-w-7xl py-32 px-4 md:px-8">
- <h2 className="text-4xl text-balance ">
+ <div className="mx-auto w-full max-w-7xl px-4 py-32 md:px-8">
+ <h2 className="text-balance text-4xl ">
Sharing with Papermark is secure, fast, and free.
</h2>
- <div className="pt-8 space-x-2">
+ <div className="space-x-2 pt-8">
<Link
href="https://cal.com/marcseitz/papermark"
target="_blank"
@@ -228,13 +229,13 @@ export default function Home() {
>
<Button
variant="outline"
- className="text-base rounded-3xl bg-transparent border-black"
+ className="rounded-3xl border-black bg-transparent text-base"
>
Book a demo
</Button>
</Link>
<Link href="/login">
- <Button className="text-base rounded-3xl">
+ <Button className="rounded-3xl text-base">
Start for free
</Button>
</Link>
diff --git a/app/sitemap.ts b/app/sitemap.ts
index 4b226040..fa2d8458 100644
--- a/app/sitemap.ts
+++ b/app/sitemap.ts
@@ -1,10 +1,11 @@
+import { MetadataRoute } from "next";
+
import {
- getPosts,
getAlternatives,
- getPages,
getHelpArticles,
+ getPages,
+ getPosts,
} from "@/lib/content";
-import { MetadataRoute } from "next";
export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
const posts = await getPosts();
diff --git a/components/EmailForm.tsx b/components/EmailForm.tsx
index 6e173e21..01fe9f44 100644
--- a/components/EmailForm.tsx
+++ b/components/EmailForm.tsx
@@ -1,7 +1,7 @@
export default function EmailForm({ onSubmitHandler, setEmail }: any) {
return (
<>
- <div className="flex h-screen flex-1 flex-col px-6 py-12 lg:px-8 bg-black">
+ <div className="flex h-screen flex-1 flex-col bg-black px-6 py-12 lg:px-8">
<div className="sm:mx-auto sm:w-full sm:max-w-md">
<h2 className="mt-10 text-2xl font-bold leading-9 tracking-tight text-white">
Enter your email to view the document
diff --git a/components/NotionPage.tsx b/components/NotionPage.tsx
index 46d4dbe9..4432aa70 100644
--- a/components/NotionPage.tsx
+++ b/components/NotionPage.tsx
@@ -1,10 +1,12 @@
import { useEffect, useRef, useState } from "react";
+
+import { Brand, DataroomBrand } from "@prisma/client";
import { ExtendedRecordMap } from "notion-types";
import { NotionRenderer } from "react-notion-x";
// core styles shared by all of react-notion-x (required)
import "react-notion-x/src/styles.css";
+
import Nav from "./view/nav";
-import { Brand, DataroomBrand } from "@prisma/client";
export const NotionPage = ({
recordMap,
diff --git a/components/Sidebar.tsx b/components/Sidebar.tsx
index c97fc85c..5864b8d8 100644
--- a/components/Sidebar.tsx
+++ b/components/Sidebar.tsx
@@ -1,38 +1,43 @@
-import { useEffect, useState } from "react";
-import { useSession } from "next-auth/react";
-import SettingsIcon from "@/components/shared/icons/settings";
-import MenuIcon from "@/components/shared/icons/menu";
-import { cn } from "@/lib/utils";
import { useRouter } from "next/router";
-import Banner from "./banner";
-import ProBanner from "./billing/pro-banner";
-import Cookies from "js-cookie";
-import { usePlan } from "@/lib/swr/use-billing";
-import SelectTeam from "./teams/select-team";
+
+import { useEffect, useState } from "react";
+
import { TeamContextType, initialState, useTeam } from "@/context/team-context";
-import { Sheet, SheetContent, SheetTrigger } from "@/components/ui/sheet";
-import ProfileMenu from "./profile-menu";
+import Cookies from "js-cookie";
import {
- PaletteIcon,
FolderIcon as FolderLucideIcon,
FolderOpenIcon,
+ PaletteIcon,
ServerIcon,
} from "lucide-react";
+import { useSession } from "next-auth/react";
+
+import MenuIcon from "@/components/shared/icons/menu";
+import SettingsIcon from "@/components/shared/icons/settings";
+import { Sheet, SheetContent, SheetTrigger } from "@/components/ui/sheet";
+
+import { usePlan } from "@/lib/swr/use-billing";
+import { cn } from "@/lib/utils";
+
+import Banner from "./banner";
+import ProBanner from "./billing/pro-banner";
+import { UpgradePlanModal } from "./billing/upgrade-plan-modal";
+import ProfileMenu from "./profile-menu";
import SiderbarFolders from "./sidebar-folders";
+import SelectTeam from "./teams/select-team";
import { ScrollArea } from "./ui/scroll-area";
-import { UpgradePlanModal } from "./billing/upgrade-plan-modal";
export default function Sidebar() {
return (
<>
<nav>
{/* sidebar for desktop */}
- <SidebarComponent className="hidden lg:fixed lg:inset-y-0 lg:flex lg:z-50" />
+ <SidebarComponent className="hidden lg:fixed lg:inset-y-0 lg:z-50 lg:flex" />
{/* move main screen to the right by width of the sidebar on desktop */}
<div className="lg:pl-72"></div>
{/* sidebar for mobile */}
- <div className="sticky lg:hidden top-0 z-40 mb-1 flex items-center h-14 shrink-0 border-gray-50/90 bg-gray-50 dark:border-black/10 dark:bg-black/95 px-6 sm:px-12 border-b dark:border-none">
+ <div className="sticky top-0 z-40 mb-1 flex h-14 shrink-0 items-center border-b border-gray-50/90 bg-gray-50 px-6 dark:border-none dark:border-black/10 dark:bg-black/95 sm:px-12 lg:hidden">
<Sheet>
<SheetTrigger asChild>
<button className="mt-1 p-0.5 text-muted-foreground lg:hidden">
@@ -41,12 +46,12 @@ export default function Sidebar() {
</SheetTrigger>
<SheetContent
side="left"
- className="w-[280px] sm:w-[300px] lg:hidden p-0 m-0"
+ className="m-0 w-[280px] p-0 sm:w-[300px] lg:hidden"
>
<SidebarComponent className="flex" />
</SheetContent>
</Sheet>
- <div className="flex flex-1 gap-x-4 self-stretch items-center lg:gap-x-6 justify-end">
+ <div className="flex flex-1 items-center justify-end gap-x-4 self-stretch lg:gap-x-6">
<ProfileMenu size="small" className="mr-3 mt-1.5" />
</div>
</div>
@@ -138,17 +143,17 @@ export const SidebarComponent = ({ className }: { className?: string }) => {
<div>
<aside
className={cn(
- "w-full h-screen lg:w-72 flex-shrink-0 flex-col justify-between gap-y-6 bg-gray-50 dark:bg-black px-4 lg:px-6 pt-4 lg:pt-6",
+ "h-screen w-full flex-shrink-0 flex-col justify-between gap-y-6 bg-gray-50 px-4 pt-4 dark:bg-black lg:w-72 lg:px-6 lg:pt-6",
className,
)}
>
{/* Sidebar component, swap this element with another sidebar if you like */}
<div className="flex h-16 shrink-0 items-center space-x-3">
- <p className="text-2xl font-bold text-black dark:text-white tracking-tighter flex items-center">
+ <p className="flex items-center text-2xl font-bold tracking-tighter text-black dark:text-white">
Papermark{" "}
{userPlan && userPlan != "free" ? (
- <span className="bg-background text-foreground ring-1 ring-gray-800 tracking-normal rounded-full px-2.5 py-1 text-xs ml-4">
+ <span className="ml-4 rounded-full bg-background px-2.5 py-1 text-xs tracking-normal text-foreground ring-1 ring-gray-800">
{userPlan.charAt(0).toUpperCase() + userPlan.slice(1)}
</span>
) : null}
@@ -195,9 +200,9 @@ export const SidebarComponent = ({ className }: { className?: string }) => {
disabled={item.disabled}
className={cn(
item.current
- ? "bg-gray-200 dark:bg-secondary text-foreground font-semibold"
- : " hover:bg-gray-200 hover:dark:bg-muted duration-200",
- "group flex gap-x-2 items-center rounded-md px-3 py-2 text-sm leading-6 w-full disabled:hover:bg-transparent disabled:text-muted-foreground disabled:cursor-default",
+ ? "bg-gray-200 font-semibold text-foreground dark:bg-secondary"
+ : " duration-200 hover:bg-gray-200 hover:dark:bg-muted",
+ "group flex w-full items-center gap-x-2 rounded-md px-3 py-2 text-sm leading-6 disabled:cursor-default disabled:text-muted-foreground disabled:hover:bg-transparent",
)}
>
<item.icon
@@ -222,7 +227,7 @@ export const SidebarComponent = ({ className }: { className?: string }) => {
clickedPlan={"Business"}
trigger={"datarooms"}
>
- <div className="group flex gap-x-2 items-center rounded-md px-3 py-2 text-sm leading-6 w-full hover:bg-transparent text-muted-foreground">
+ <div className="group flex w-full items-center gap-x-2 rounded-md px-3 py-2 text-sm leading-6 text-muted-foreground hover:bg-transparent">
<item.icon
className="h-5 w-5 shrink-0"
aria-hidden="true"
@@ -239,9 +244,9 @@ export const SidebarComponent = ({ className }: { className?: string }) => {
disabled={item.disabled}
className={cn(
item.current
- ? "bg-gray-200 dark:bg-secondary text-foreground font-semibold"
- : " hover:bg-gray-200 hover:dark:bg-muted duration-200",
- "group flex gap-x-2 items-center rounded-md px-3 py-2 text-sm leading-6 w-full disabled:hover:bg-transparent disabled:text-muted-foreground disabled:cursor-default",
+ ? "bg-gray-200 font-semibold text-foreground dark:bg-secondary"
+ : " duration-200 hover:bg-gray-200 hover:dark:bg-muted",
+ "group flex w-full items-center gap-x-2 rounded-md px-3 py-2 text-sm leading-6 disabled:cursor-default disabled:text-muted-foreground disabled:hover:bg-transparent",
)}
>
<item.icon
@@ -271,7 +276,7 @@ export const SidebarComponent = ({ className }: { className?: string }) => {
<ProBanner setShowProBanner={setShowProBanner} />
) : null}
- <div className="w-full hidden lg:block">
+ <div className="hidden w-full lg:block">
<ProfileMenu size="large" />
</div>
</div>
diff --git a/components/banner.tsx b/components/banner.tsx
index 79cfa6c8..d9f69e84 100644
--- a/components/banner.tsx
+++ b/components/banner.tsx
@@ -1,9 +1,12 @@
import Link from "next/link";
-import { Button } from "./ui/button";
-import { calculateDaysLeft } from "@/lib/utils";
-import { CustomUser } from "@/lib/types";
+
import { Session } from "next-auth";
+
import { useDomains } from "@/lib/swr/use-domains";
+import { CustomUser } from "@/lib/types";
+import { calculateDaysLeft } from "@/lib/utils";
+
+import { Button } from "./ui/button";
const cutoffDate = new Date("2023-10-12T00:00:00.000Z");
@@ -21,9 +24,9 @@ export default function Banner({ session }: { session: Session | null }) {
domains && !noDomains && domains.every((domain) => domain.verified);
return (
- <aside className="flex flex-col justify-center w-full bg-background text-foreground p-4 mb-2 rounded-lg border border-gray-700">
+ <aside className="mb-2 flex w-full flex-col justify-center rounded-lg border border-gray-700 bg-background p-4 text-foreground">
<div className="flex space-x-2">
- <span className="font-bold text-sm">✨ Pro Trial ✨</span>
+ <span className="text-sm font-bold">✨ Pro Trial ✨</span>
</div>
<p className="my-4 text-sm">
{`You are on the Pro trial for the next ${userDaysLeft} days.`}
diff --git a/components/billing/pro-banner.tsx b/components/billing/pro-banner.tsx
index ee0ff5fd..ac99c3dd 100644
--- a/components/billing/pro-banner.tsx
+++ b/components/billing/pro-banner.tsx
@@ -1,11 +1,15 @@
-import Cookies from "js-cookie";
import { Dispatch, SetStateAction } from "react";
-import { UpgradePlanModal } from "./upgrade-plan-modal";
-import { Button } from "@/components/ui/button";
+
+import Cookies from "js-cookie";
import { usePlausible } from "next-plausible";
+
import X from "@/components/shared/icons/x";
+import { Button } from "@/components/ui/button";
+
import { useAnalytics } from "@/lib/analytics";
+import { UpgradePlanModal } from "./upgrade-plan-modal";
+
export default function ProBanner({
setShowProBanner,
}: {
@@ -23,17 +27,17 @@ export default function ProBanner({
};
return (
- <aside className="flex flex-col justify-center w-full bg-background text-foreground p-4 mb-2 rounded-lg border border-gray-700 relative">
+ <aside className="relative mb-2 flex w-full flex-col justify-center rounded-lg border border-gray-700 bg-background p-4 text-foreground">
<button
type="button"
onClick={handleHideBanner}
className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"
>
- <X className="w-4 h-4" />
+ <X className="h-4 w-4" />
<span className="sr-only">Close</span>
</button>
<div className="flex space-x-2">
- <span className="font-bold text-sm">✨ Papermark Pro ✨</span>
+ <span className="text-sm font-bold">✨ Papermark Pro ✨</span>
</div>
<p className="my-4 text-sm">
Join the Papermark Pro plan to unlock custom domains, team members, and
diff --git a/components/billing/upgrade-plan-modal.tsx b/components/billing/upgrade-plan-modal.tsx
index e7ec6d4a..052dc504 100644
--- a/components/billing/upgrade-plan-modal.tsx
+++ b/components/billing/upgrade-plan-modal.tsx
@@ -1,18 +1,22 @@
import { useEffect, useMemo, useState } from "react";
-import { Dialog, DialogContent, DialogTrigger } from "@/components/ui/dialog";
-import { Button } from "@/components/ui/button";
+import React from "react";
+
+import { useTeam } from "@/context/team-context";
import { motion } from "framer-motion";
+import { CheckIcon } from "lucide-react";
+
+import { Button } from "@/components/ui/button";
+import { Dialog, DialogContent, DialogTrigger } from "@/components/ui/dialog";
+import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs";
+
+import { useAnalytics } from "@/lib/analytics";
import { STAGGER_CHILD_VARIANTS } from "@/lib/constants";
-import { capitalize } from "@/lib/utils";
-import { PLANS } from "@/lib/stripe/utils";
import { getStripe } from "@/lib/stripe/client";
-import { Badge } from "../ui/badge";
-import { useTeam } from "@/context/team-context";
-import { useAnalytics } from "@/lib/analytics";
-import React from "react";
-import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs";
-import { CheckIcon } from "lucide-react";
+import { PLANS } from "@/lib/stripe/utils";
+import { capitalize } from "@/lib/utils";
+
import { DataroomTrialModal } from "../datarooms/dataroom-trial-modal";
+import { Badge } from "../ui/badge";
export function UpgradePlanModal({
clickedPlan,
@@ -111,7 +115,7 @@ export function UpgradePlanModal({
return (
<Dialog open={open} onOpenChange={setOpen}>
<DialogTrigger asChild>{buttonChild}</DialogTrigger>
- <DialogContent className="text-foreground bg-background">
+ <DialogContent className="bg-background text-foreground">
<motion.div
variants={{
show: {
@@ -180,7 +184,7 @@ export function UpgradePlanModal({
PLANS.find((p) => p.name === plan)!.price[period].amount
}/month`}{" "}
{period === "yearly" ? (
- <span className="text-xs ml-1">(billed yearly)</span>
+ <span className="ml-1 text-xs">(billed yearly)</span>
) : null}
</Badge>
</div>
@@ -258,7 +262,7 @@ export function UpgradePlanModal({
{plan === "Business" ? (
<DataroomTrialModal>
<button
- className="text-center text-xs text-muted-foreground underline-offset-4 transition-all hover:text-gray-800 hover:dark:text-muted-foreground/80 hover:underline"
+ className="text-center text-xs text-muted-foreground underline-offset-4 transition-all hover:text-gray-800 hover:underline hover:dark:text-muted-foreground/80"
onClick={() => analytics.capture("Dataroom Trial Clicked")}
>
Looking for a dataroom trial?
@@ -268,7 +272,7 @@ export function UpgradePlanModal({
<a
href="https://cal.com/marcseitz/papermark"
target="_blank"
- className="text-center text-xs text-muted-foreground underline-offset-4 transition-all hover:text-gray-800 hover:dark:text-muted-foreground/80 hover:underline"
+ className="text-center text-xs text-muted-foreground underline-offset-4 transition-all hover:text-gray-800 hover:underline hover:dark:text-muted-foreground/80"
>
Looking for Papermark Enterprise?
</a>
diff --git a/components/blur-image.tsx b/components/blur-image.tsx
index fe6cdb71..04156089 100644
--- a/components/blur-image.tsx
+++ b/components/blur-image.tsx
@@ -1,6 +1,7 @@
"use client";
import Image, { ImageProps } from "next/image";
+
import { useEffect, useState } from "react";
export default function BlurImage(props: ImageProps) {
diff --git a/components/charts/bar-chart-tooltip.tsx b/components/charts/bar-chart-tooltip.tsx
index ebac4860..25ba1026 100644
--- a/components/charts/bar-chart-tooltip.tsx
+++ b/components/charts/bar-chart-tooltip.tsx
@@ -1,7 +1,9 @@
-import { getColorForVersion, timeFormatter } from "./utils";
-import { useDocumentThumbnail } from "@/lib/swr/use-document";
import { useRouter } from "next/router";
+import { useDocumentThumbnail } from "@/lib/swr/use-document";
+
+import { getColorForVersion, timeFormatter } from "./utils";
+
const CustomTooltip = ({
payload,
active,
@@ -23,9 +25,9 @@ const CustomTooltip = ({
return (
<>
- <div className="bg-tremor-background dark:bg-dark-tremor-background border border-tremor-border dark:border-dark-tremor-border rounded-md w-52 text-sm leading-6">
- <div className="py-2 px-2.5 bg-tremor-background dark:bg-dark-tremor-background border-b border-tremor-border dark:border-dark-tremor-border rounded-t-md">
- <p className="text-tremor-content dark:text-dark-tremor-content font-medium">
+ <div className="w-52 rounded-md border border-tremor-border bg-tremor-background text-sm leading-6 dark:border-dark-tremor-border dark:bg-dark-tremor-background">
+ <div className="rounded-t-md border-b border-tremor-border bg-tremor-background px-2.5 py-2 dark:border-dark-tremor-border dark:bg-dark-tremor-background">
+ <p className="font-medium text-tremor-content dark:text-dark-tremor-content">
Page {payload[0].payload.pageNumber}
</p>
{imageUrl ? (
@@ -37,19 +39,19 @@ const CustomTooltip = ({
</div>
{payload.map((item: any, idx: number) => (
<div
- className="py-2 px-2.5 justify-between items-center w-full flex space-x-4"
+ className="flex w-full items-center justify-between space-x-4 px-2.5 py-2"
key={idx}
>
- <div className="whitespace-nowrap overflow-hidden text-overflow-ellipsis items-center flex space-x-2">
+ <div className="text-overflow-ellipsis flex items-center space-x-2 overflow-hidden whitespace-nowrap">
<span
- className={`bg-${getColorForVersion(item.dataKey)}-500 rounded-full flex-shrink-0 w-2.5 h-2.5`}
+ className={`bg-${getColorForVersion(item.dataKey)}-500 h-2.5 w-2.5 flex-shrink-0 rounded-full`}
aria-hidden="true"
></span>
- <p className="text-tremor-content dark:text-dark-tremor-content whitespace-nowrap overflow-hidden text-overflow-ellipsis">
+ <p className="text-overflow-ellipsis overflow-hidden whitespace-nowrap text-tremor-content dark:text-dark-tremor-content">
{item.dataKey}
</p>
</div>
- <p className="text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis font-medium">
+ <p className="font-medium text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis">
{timeFormatter(item.value)}
</p>
</div>
diff --git a/components/charts/bar-chart.tsx b/components/charts/bar-chart.tsx
index df14efde..ead615f1 100644
--- a/components/charts/bar-chart.tsx
+++ b/components/charts/bar-chart.tsx
@@ -1,5 +1,8 @@
-import { BarChart } from "@tremor/react";
import { useState } from "react";
+
+import { BarChart } from "@tremor/react";
+
+import CustomTooltip from "./bar-chart-tooltip";
import {
type Data,
type SumData,
@@ -7,7 +10,6 @@ import {
getColors,
timeFormatter,
} from "./utils";
-import CustomTooltip from "./bar-chart-tooltip";
const renameDummyDurationKey = (data: Data[]): TransformedData[] => {
return data.reduce((acc, { pageNumber, data }) => {
diff --git a/components/chat/chat-input.tsx b/components/chat/chat-input.tsx
index 82e328aa..bccc364f 100644
--- a/components/chat/chat-input.tsx
+++ b/components/chat/chat-input.tsx
@@ -1,10 +1,13 @@
+import { useEffect, useRef } from "react";
+
import { AssistantStatus, type Message } from "ai/react";
+import Textarea from "react-textarea-autosize";
import { Button } from "@/components/ui/button";
-import Textarea from "react-textarea-autosize";
-import { useEffect, useRef } from "react";
+
import { cn } from "@/lib/utils";
import { useEnterSubmit } from "@/lib/utils/use-enter-submit";
+
import ArrowUp from "../shared/icons/arrow-up";
export function ChatInput({
@@ -37,14 +40,14 @@ export function ChatInput({
<div className="mx-auto sm:max-w-3xl sm:px-4">
<div className="space-y-4 bg-background px-4 py-4 md:py-4">
<form onSubmit={submitMessage} ref={formRef}>
- <div className="relative flex max-h-60 w-full flex-col overflow-hidden bg-background pr-8 rounded-xl ring-1 ring-muted-foreground/50 sm:pr-12 focus-within:ring-1 focus-within:ring-foreground">
+ <div className="relative flex max-h-60 w-full flex-col overflow-hidden rounded-xl bg-background pr-8 ring-1 ring-muted-foreground/50 focus-within:ring-1 focus-within:ring-foreground sm:pr-12">
<Textarea
ref={inputRef}
tabIndex={0}
rows={1}
onKeyDown={onKeyDown}
disabled={status !== "awaiting_message"}
- className="min-h-[60px] w-full resize-none bg-transparent px-4 py-[1.3rem] focus:ring-0 sm:text-sm border-none"
+ className="min-h-[60px] w-full resize-none border-none bg-transparent px-4 py-[1.3rem] focus:ring-0 sm:text-sm"
value={input}
placeholder="Message Papermark Assistant..."
onChange={handleInputChange}
@@ -55,7 +58,7 @@ export function ChatInput({
type="submit"
disabled={status === "in_progress" || input === ""}
title="Send message"
- className="rounded-md p-1 md:p-2 h-10 w-10"
+ className="h-10 w-10 rounded-md p-1 md:p-2"
>
<ArrowUp className="h-full w-full" />
<span className="sr-only">Send message</span>
diff --git a/components/chat/chat-list.tsx b/components/chat/chat-list.tsx
index a6434cb1..0d6b77cd 100644
--- a/components/chat/chat-list.tsx
+++ b/components/chat/chat-list.tsx
@@ -1,9 +1,10 @@
import { type Message } from "ai";
import { Separator } from "@/components/ui/separator";
-import { ChatMessage } from "./chat-message";
+
import Skeleton from "../Skeleton";
import PapermarkSparkle from "../shared/icons/papermark-sparkle";
+import { ChatMessage } from "./chat-message";
export interface ChatList {
messages: Message[];
@@ -30,13 +31,13 @@ export function ChatList({ messages, status }: ChatList) {
<Separator className="my-4 bg-background" />
<div
key={"loading-message"}
- className="group relative mb-4 flex items-start ml-5 whitespace-pre-wrap"
+ className="group relative mb-4 ml-5 flex items-start whitespace-pre-wrap"
>
- <div className="flex h-8 w-8 shrink-0 select-none items-center justify-center rounded-md border shadow bg-primary text-primary-foreground">
+ <div className="flex h-8 w-8 shrink-0 select-none items-center justify-center rounded-md border bg-primary text-primary-foreground shadow">
<PapermarkSparkle />
</div>
- <div className="flex-1 px-1 ml-4 space-y-2 overflow-hidden">
- <div className="font-semibold select-none">
+ <div className="ml-4 flex-1 space-y-2 overflow-hidden px-1">
+ <div className="select-none font-semibold">
Papermark Assistant
</div>
<Skeleton className="h-4 w-64" />
diff --git a/components/chat/chat-message-actions.tsx b/components/chat/chat-message-actions.tsx
index 1d573fb7..e19e54d4 100644
--- a/components/chat/chat-message-actions.tsx
+++ b/components/chat/chat-message-actions.tsx
@@ -3,8 +3,10 @@
import { type Message } from "ai";
import { Button } from "@/components/ui/button";
-import { useCopyToClipboard } from "@/lib/utils/use-copy-to-clipboard";
+
import { cn } from "@/lib/utils";
+import { useCopyToClipboard } from "@/lib/utils/use-copy-to-clipboard";
+
import Check from "../shared/icons/check";
import Copy from "../shared/icons/copy";
@@ -27,7 +29,7 @@ export function ChatMessageActions({
return (
<div
className={cn(
- "flex items-center justify-end md:hidden md:absolute md:right-0 md:-top-2",
+ "flex items-center justify-end md:absolute md:-top-2 md:right-0 md:hidden",
className,
)}
{...props}
diff --git a/components/chat/chat-message.tsx b/components/chat/chat-message.tsx
index 43c964d2..2f6f9e65 100644
--- a/components/chat/chat-message.tsx
+++ b/components/chat/chat-message.tsx
@@ -1,10 +1,11 @@
import { type Message } from "ai";
import { cn } from "@/lib/utils";
-import { ChatMessageActions } from "./chat-message-actions";
-import UserRound from "../shared/icons/user-round";
-import PapermarkSparkle from "../shared/icons/papermark-sparkle";
+
import AlertCircle from "../shared/icons/alert-circle";
+import PapermarkSparkle from "../shared/icons/papermark-sparkle";
+import UserRound from "../shared/icons/user-round";
+import { ChatMessageActions } from "./chat-message-actions";
// map role to icon and name
const mapMessageRole = {
@@ -25,7 +26,7 @@ export function ChatMessage({ message, ...props }: ChatMessageProps) {
<div
key={message.id}
className={cn(
- "group relative mb-4 flex items-start md:ml-5 whitespace-pre-wrap",
+ "group relative mb-4 flex items-start whitespace-pre-wrap md:ml-5",
)}
{...props}
>
@@ -41,12 +42,12 @@ export function ChatMessage({ message, ...props }: ChatMessageProps) {
>
{mapMessageRole[message.role].icon}
</div>
- <div className="flex-1 px-1 ml-4 space-y-2 overflow-hidden">
- <div className="relative flex w-[calc(100%-50px)] flex-col group">
- <div className="font-semibold select-none">
+ <div className="ml-4 flex-1 space-y-2 overflow-hidden px-1">
+ <div className="group relative flex w-[calc(100%-50px)] flex-col">
+ <div className="select-none font-semibold">
{mapMessageRole[message.role].name}
</div>
- <div className="prose break-words dark:prose-invert prose-p:leading-relaxed prose-pre:p-0 font-light">
+ <div className="prose break-words font-light dark:prose-invert prose-p:leading-relaxed prose-pre:p-0">
<p className="mb-2 last:mb-0">{message.content}</p>
</div>
</div>
diff --git a/components/chat/chat-scroll-anchor.tsx b/components/chat/chat-scroll-anchor.tsx
index c1c3694c..a5777238 100644
--- a/components/chat/chat-scroll-anchor.tsx
+++ b/components/chat/chat-scroll-anchor.tsx
@@ -1,6 +1,7 @@
"use client";
import * as React from "react";
+
import { useInView } from "react-intersection-observer";
import { useAtBottom } from "@/lib/utils/use-at-bottom";
diff --git a/components/chat/chat.tsx b/components/chat/chat.tsx
index 18def189..1b2a2b3a 100644
--- a/components/chat/chat.tsx
+++ b/components/chat/chat.tsx
@@ -1,18 +1,20 @@
"use client";
+import { useEffect, useState } from "react";
+
import {
- experimental_useAssistant as useAssistant,
type Message,
+ experimental_useAssistant as useAssistant,
} from "ai/react";
+import { nanoid } from "nanoid";
+import { BasePlan } from "@/lib/swr/use-billing";
import { cn } from "@/lib/utils";
-import { ChatList } from "./chat-list";
+
import { ChatInput } from "./chat-input";
+import { ChatList } from "./chat-list";
import { ChatScrollAnchor } from "./chat-scroll-anchor";
import { EmptyScreen } from "./empty-screen";
-import { useEffect, useState } from "react";
-import { nanoid } from "nanoid";
-import { BasePlan } from "@/lib/swr/use-billing";
export interface ChatProps extends React.ComponentProps<"div"> {
initialMessages: Message[];
@@ -93,7 +95,7 @@ export function Chat({
<>
<div
className={cn(
- "pb-[20px] pt-24 h-[calc(100vh-96px)] relative overflow-y-auto",
+ "relative h-[calc(100vh-96px)] overflow-y-auto pb-[20px] pt-24",
className,
)}
>
diff --git a/components/chat/empty-screen.tsx b/components/chat/empty-screen.tsx
index 1ed716c4..cae65808 100644
--- a/components/chat/empty-screen.tsx
+++ b/components/chat/empty-screen.tsx
@@ -1,5 +1,7 @@
-import { Button } from "@/components/ui/button";
import Image from "next/image";
+
+import { Button } from "@/components/ui/button";
+
import Sparkle from "../shared/icons/sparkle";
const exampleMessages = [
@@ -43,7 +45,7 @@ export function EmptyScreen({
{firstPage ? (
firstPage.includes("cloudfront.net") ? (
<img
- className="object-contain rounded-md ring-1 ring-gray-700"
+ className="rounded-md object-contain ring-1 ring-gray-700"
src={firstPage}
alt={`Page 1`}
fetchPriority="high"
@@ -53,13 +55,13 @@ export function EmptyScreen({
src={firstPage}
width={768}
height={100}
- className="object-contain rounded-md ring-1 ring-gray-700"
+ className="rounded-md object-contain ring-1 ring-gray-700"
alt="First page of the document"
/>
)
) : (
- <div className="flex items-center justify-center rounded-md w-full">
- <p className="text-2xl text-center">
+ <div className="flex w-full items-center justify-center rounded-md">
+ <p className="text-center text-2xl">
Chat with{" "}
<span className="text-2xl font-bold tracking-tighter ">
Papermark
@@ -70,13 +72,13 @@ export function EmptyScreen({
)}
</div>
- <div className="flex justify-center text-lg mt-4">
+ <div className="mt-4 flex justify-center text-lg">
What would you like to know?
</div>
</div>
- <div className="mx-auto max-w-2xl px-4 absolute bottom-0 inset-x-0">
- <div className="grid grid-cols-1 sm:grid-cols-2 gap-2">
+ <div className="absolute inset-x-0 bottom-0 mx-auto max-w-2xl px-4">
+ <div className="grid grid-cols-1 gap-2 sm:grid-cols-2">
{exampleMessages.map((message, index) => (
<Button
key={index}
diff --git a/components/datarooms/add-dataroom-document-modal.tsx b/components/datarooms/add-dataroom-document-modal.tsx
index 7e203a59..3d996e5f 100644
--- a/components/datarooms/add-dataroom-document-modal.tsx
+++ b/components/datarooms/add-dataroom-document-modal.tsx
@@ -1,3 +1,12 @@
+import { useRouter } from "next/router";
+
+import { useState } from "react";
+
+import { useTeam } from "@/context/team-context";
+import { toast } from "sonner";
+import { mutate } from "swr";
+
+import { SidebarFolderTreeSelection } from "@/components/sidebar-folders";
import { Button } from "@/components/ui/button";
import {
Dialog,
@@ -7,12 +16,6 @@ import {
DialogHeader,
DialogTitle,
} from "@/components/ui/dialog";
-import { useTeam } from "@/context/team-context";
-import { useState } from "react";
-import { toast } from "sonner";
-import { mutate } from "swr";
-import { SidebarFolderTreeSelection } from "@/components/sidebar-folders";
-import { useRouter } from "next/router";
export function AddDataroomDocumentModal({
open,
@@ -105,7 +108,7 @@ export function AddDataroomDocumentModal({
<DialogFooter>
<Button
onClick={handleSubmit}
- className="w-full h-9"
+ className="h-9 w-full"
loading={loading}
>
Add to dataroom
diff --git a/components/datarooms/add-dataroom-modal.tsx b/components/datarooms/add-dataroom-modal.tsx
index 774535bd..ebb4b414 100644
--- a/components/datarooms/add-dataroom-modal.tsx
+++ b/components/datarooms/add-dataroom-modal.tsx
@@ -1,3 +1,9 @@
+import { useState } from "react";
+
+import { useTeam } from "@/context/team-context";
+import { toast } from "sonner";
+import { mutate } from "swr";
+
import { Button } from "@/components/ui/button";
import {
Dialog,
@@ -10,13 +16,11 @@ import {
} from "@/components/ui/dialog";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
-import { useTeam } from "@/context/team-context";
-import { useState } from "react";
-import { toast } from "sonner";
-import { UpgradePlanModal } from "../billing/upgrade-plan-modal";
-import { usePlan } from "@/lib/swr/use-billing";
+
import { useAnalytics } from "@/lib/analytics";
-import { mutate } from "swr";
+import { usePlan } from "@/lib/swr/use-billing";
+
+import { UpgradePlanModal } from "../billing/upgrade-plan-modal";
export function AddDataroomModal({ children }: { children?: React.ReactNode }) {
const [dataroomName, setDataroomName] = useState<string>("");
@@ -101,11 +105,11 @@ export function AddDataroomModal({ children }: { children?: React.ReactNode }) {
<Input
id="dataroom-name"
placeholder="ACME Aquisition"
- className="w-full mt-1 mb-4"
+ className="mb-4 mt-1 w-full"
onChange={(e) => setDataroomName(e.target.value)}
/>
<DialogFooter>
- <Button type="submit" className="w-full h-9" loading={loading}>
+ <Button type="submit" className="h-9 w-full" loading={loading}>
Add new dataroom
</Button>
</DialogFooter>
diff --git a/components/datarooms/add-viewer-modal.tsx b/components/datarooms/add-viewer-modal.tsx
index 540b6fe2..cd41f5c5 100644
--- a/components/datarooms/add-viewer-modal.tsx
+++ b/components/datarooms/add-viewer-modal.tsx
@@ -1,3 +1,11 @@
+import { useRouter } from "next/router";
+
+import { useState } from "react";
+
+import { useTeam } from "@/context/team-context";
+import { toast } from "sonner";
+import { mutate } from "swr";
+
import { Button } from "@/components/ui/button";
import {
Dialog,
@@ -10,12 +18,8 @@ import {
} from "@/components/ui/dialog";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
-import { useTeam } from "@/context/team-context";
+
import { useAnalytics } from "@/lib/analytics";
-import { useRouter } from "next/router";
-import { useState } from "react";
-import { toast } from "sonner";
-import { mutate } from "swr";
export function AddViewerModal({
dataroomId,
@@ -170,7 +174,7 @@ export function AddViewerModal({
{emails.map((email, index) => (
<div
key={index}
- className="flex items-center gap-2 bg-gray-100 px-2 py-1 rounded"
+ className="flex items-center gap-2 rounded bg-gray-100 px-2 py-1"
>
{email}
<button type="button" onClick={() => removeEmail(index)}>
@@ -195,7 +199,7 @@ export function AddViewerModal({
</div>
<DialogFooter>
- <Button type="submit" className="w-full h-9 mt-8" loading={loading}>
+ <Button type="submit" className="mt-8 h-9 w-full" loading={loading}>
{loading ? "Sending emails..." : "Add members"}
</Button>
</DialogFooter>
diff --git a/components/datarooms/dataroom-breadcrumb.tsx b/components/datarooms/dataroom-breadcrumb.tsx
index 9b32d0d5..7017c15a 100644
--- a/components/datarooms/dataroom-breadcrumb.tsx
+++ b/components/datarooms/dataroom-breadcrumb.tsx
@@ -1,5 +1,8 @@
-import React, { useMemo } from "react";
import Link from "next/link";
+import { useRouter } from "next/router";
+
+import React, { useMemo } from "react";
+
import {
Breadcrumb,
BreadcrumbItem,
@@ -8,7 +11,7 @@ import {
BreadcrumbPage,
BreadcrumbSeparator,
} from "@/components/ui/breadcrumb";
-import { useRouter } from "next/router";
+
import { useDataroomFolderWithParents } from "@/lib/swr/use-dataroom";
function BreadcrumbComponentBase({
diff --git a/components/datarooms/dataroom-document-card.tsx b/components/datarooms/dataroom-document-card.tsx
index a465169d..55afccfe 100644
--- a/components/datarooms/dataroom-document-card.tsx
+++ b/components/datarooms/dataroom-document-card.tsx
@@ -1,11 +1,19 @@
-import { nFormatter, timeAgo } from "@/lib/utils";
+import Image from "next/image";
import Link from "next/link";
-import { type DocumentWithLinksAndLinkCountAndViewCount } from "@/lib/types";
+
+import { useEffect, useRef, useState } from "react";
+
import { TeamContextType } from "@/context/team-context";
+import { FolderInputIcon, MoreVertical, TrashIcon } from "lucide-react";
+import { useTheme } from "next-themes";
+import { toast } from "sonner";
+import { mutate } from "swr";
+
+import { MoveToFolderModal } from "@/components/documents/move-folder-modal";
import BarChart from "@/components/shared/icons/bar-chart";
-import Image from "next/image";
+import Check from "@/components/shared/icons/check";
+import Copy from "@/components/shared/icons/copy";
import NotionIcon from "@/components/shared/icons/notion";
-import { toast } from "sonner";
import { Button } from "@/components/ui/button";
import {
DropdownMenu,
@@ -15,15 +23,12 @@ import {
DropdownMenuSeparator,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
-import { TrashIcon, MoreVertical, FolderInputIcon } from "lucide-react";
-import { mutate } from "swr";
-import { useCopyToClipboard } from "@/lib/utils/use-copy-to-clipboard";
-import Check from "@/components/shared/icons/check";
-import Copy from "@/components/shared/icons/copy";
-import { useEffect, useRef, useState } from "react";
-import { useTheme } from "next-themes";
-import { MoveToFolderModal } from "@/components/documents/move-folder-modal";
+
import { type DataroomFolderDocument } from "@/lib/swr/use-dataroom";
+import { type DocumentWithLinksAndLinkCountAndViewCount } from "@/lib/types";
+import { nFormatter, timeAgo } from "@/lib/utils";
+import { useCopyToClipboard } from "@/lib/utils/use-copy-to-clipboard";
+
import { MoveToDataroomFolderModal } from "./move-dataroom-folder-modal";
type DocumentsCardProps = {
@@ -46,11 +51,11 @@ export default function DataroomDocumentCard({
return (
<>
- <li className="group/row relative rounded-lg p-3 border-0 dark:bg-secondary ring-1 ring-gray-200 dark:ring-gray-700 transition-all hover:ring-gray-300 hover:dark:ring-gray-500 hover:bg-secondary sm:p-4 flex justify-between items-center">
- <div className="min-w-0 flex shrink items-center space-x-2 sm:space-x-4">
- <div className="w-8 mx-0.5 sm:mx-1 text-center flex justify-center items-center">
+ <li className="group/row relative flex items-center justify-between rounded-lg border-0 p-3 ring-1 ring-gray-200 transition-all hover:bg-secondary hover:ring-gray-300 dark:bg-secondary dark:ring-gray-700 hover:dark:ring-gray-500 sm:p-4">
+ <div className="flex min-w-0 shrink items-center space-x-2 sm:space-x-4">
+ <div className="mx-0.5 flex w-8 items-center justify-center text-center sm:mx-1">
{document.document.type === "notion" ? (
- <NotionIcon className="w-8 h-8" />
+ <NotionIcon className="h-8 w-8" />
) : (
<Image
src={`/_icons/${document.document.type}${isLight ? "-light" : ""}.svg`}
@@ -63,10 +68,10 @@ export default function DataroomDocumentCard({
<div className="flex-col">
<div className="flex items-center">
- <h2 className="min-w-0 text-sm font-semibold leading-6 text-foreground truncate max-w-[150px] sm:max-w-md">
+ <h2 className="min-w-0 max-w-[150px] truncate text-sm font-semibold leading-6 text-foreground sm:max-w-md">
<Link
href={`/documents/${document.document.id}`}
- className="truncate w-full"
+ className="w-full truncate"
>
<span>{document.document.name}</span>
<span className="absolute inset-0" />
@@ -91,10 +96,10 @@ export default function DataroomDocumentCard({
e.stopPropagation();
}}
href={`/documents/${document.document.id}`}
- className="flex items-center z-10 space-x-1 rounded-md bg-gray-200 dark:bg-gray-700 px-1.5 sm:px-2 py-0.5 transition-all duration-75 hover:scale-105 active:scale-100"
+ className="z-10 flex items-center space-x-1 rounded-md bg-gray-200 px-1.5 py-0.5 transition-all duration-75 hover:scale-105 active:scale-100 dark:bg-gray-700 sm:px-2"
>
- <BarChart className="h-3 sm:h-4 w-3 sm:w-4 text-muted-foreground" />
- <p className="whitespace-nowrap text-xs sm:text-sm text-muted-foreground">
+ <BarChart className="h-3 w-3 text-muted-foreground sm:h-4 sm:w-4" />
+ <p className="whitespace-nowrap text-xs text-muted-foreground sm:text-sm">
{nFormatter(document.document._count.views)}
<span className="ml-1 hidden sm:inline-block">views</span>
</p>
@@ -105,16 +110,16 @@ export default function DataroomDocumentCard({
<Button
// size="icon"
variant="outline"
- className="h-8 lg:h-9 w-8 lg:w-9 p-0 z-10 bg-transparent border-gray-200 dark:border-gray-700 hover:bg-gray-200 hover:dark:bg-gray-700"
+ className="z-10 h-8 w-8 border-gray-200 bg-transparent p-0 hover:bg-gray-200 dark:border-gray-700 hover:dark:bg-gray-700 lg:h-9 lg:w-9"
>
<span className="sr-only">Open menu</span>
- <MoreVertical className="w-4 h-4" />
+ <MoreVertical className="h-4 w-4" />
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end" ref={dropdownRef}>
<DropdownMenuLabel>Actions</DropdownMenuLabel>
<DropdownMenuItem onClick={() => setMoveFolderOpen(true)}>
- <FolderInputIcon className="w-4 h-4 mr-2" />
+ <FolderInputIcon className="mr-2 h-4 w-4" />
Move to folder
</DropdownMenuItem>
<DropdownMenuSeparator />
diff --git a/components/datarooms/dataroom-header.tsx b/components/datarooms/dataroom-header.tsx
index 4924cc12..c1838fcf 100644
--- a/components/datarooms/dataroom-header.tsx
+++ b/components/datarooms/dataroom-header.tsx
@@ -15,9 +15,9 @@ export const DataroomHeader = ({
}
return (
- <section className="flex items-center justify-between mb-4 md:mb-8 lg:mb-12">
+ <section className="mb-4 flex items-center justify-between md:mb-8 lg:mb-12">
<div className="space-y-1">
- <h1 className="text-xl sm:text-2xl text-foreground font-semibold tracking-tight">
+ <h1 className="text-xl font-semibold tracking-tight text-foreground sm:text-2xl">
{title}
</h1>
{/* <p className="text-xs sm:text-sm text-muted-foreground font-mono">
@@ -28,7 +28,7 @@ export const DataroomHeader = ({
{actionRows.map((row, i) => (
<ul
key={i.toString()}
- className="flex flex-wrap items-center justify-end gap-2 md:gap-4 md:flex-nowrap"
+ className="flex flex-wrap items-center justify-end gap-2 md:flex-nowrap md:gap-4"
>
{row.map((action, i) => (
<li key={i}>{action}</li>
diff --git a/components/datarooms/dataroom-trial-modal.tsx b/components/datarooms/dataroom-trial-modal.tsx
index 33253d0e..c87a1efa 100644
--- a/components/datarooms/dataroom-trial-modal.tsx
+++ b/components/datarooms/dataroom-trial-modal.tsx
@@ -1,3 +1,12 @@
+import { useRouter } from "next/router";
+
+import { useState } from "react";
+
+import { useTeam } from "@/context/team-context";
+import { E164Number } from "libphonenumber-js/types.cjs";
+import { toast } from "sonner";
+import { mutate } from "swr";
+
import { Button } from "@/components/ui/button";
import {
Dialog,
@@ -10,12 +19,11 @@ import {
} from "@/components/ui/dialog";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
-import { useTeam } from "@/context/team-context";
-import { useState } from "react";
-import { toast } from "sonner";
-import { UpgradePlanModal } from "../billing/upgrade-plan-modal";
+
import { useAnalytics } from "@/lib/analytics";
-import { mutate } from "swr";
+
+import { UpgradePlanModal } from "../billing/upgrade-plan-modal";
+import { PhoneInput } from "../ui/phone-input";
import {
Select,
SelectContent,
@@ -23,9 +31,6 @@ import {
SelectTrigger,
SelectValue,
} from "../ui/select";
-import { PhoneInput } from "../ui/phone-input";
-import { E164Number } from "libphonenumber-js/types.cjs";
-import { useRouter } from "next/router";
export function DataroomTrialModal({
children,
@@ -120,7 +125,7 @@ export function DataroomTrialModal({
autoComplete="off"
data-1p-ignore
placeholder="John Doe"
- className="w-full mt-1 mb-4"
+ className="mb-4 mt-1 w-full"
onChange={(e) => setName(e.target.value)}
/>
</div>
@@ -134,7 +139,7 @@ export function DataroomTrialModal({
autoComplete="off"
data-1p-ignore
placeholder="ACME Inc."
- className="w-full mt-1 mb-4"
+ className="mb-4 mt-1 w-full"
onChange={(e) => setCompanyName(e.target.value)}
/>
</div>
@@ -202,7 +207,7 @@ export function DataroomTrialModal({
<div className="flex flex-col space-y-4">
<Button
type="submit"
- className="w-full h-9"
+ className="h-9 w-full"
disabled={
!phoneNumber ||
!companySize ||
diff --git a/components/datarooms/folders/index.tsx b/components/datarooms/folders/index.tsx
index 4d2ddde1..fac2e97e 100644
--- a/components/datarooms/folders/index.tsx
+++ b/components/datarooms/folders/index.tsx
@@ -1,5 +1,5 @@
-import { SidebarFolderTree } from "./sidebar-tree";
import { SidebarFolderTreeSelection } from "./selection-tree";
+import { SidebarFolderTree } from "./sidebar-tree";
import { ViewFolderTree } from "./view-tree";
export { SidebarFolderTree, SidebarFolderTreeSelection, ViewFolderTree };
diff --git a/components/datarooms/folders/selection-tree.tsx b/components/datarooms/folders/selection-tree.tsx
index bfbe4811..d3588bd9 100644
--- a/components/datarooms/folders/selection-tree.tsx
+++ b/components/datarooms/folders/selection-tree.tsx
@@ -1,11 +1,14 @@
-import { FileTree } from "@/components/ui/nextra-filetree";
import { memo, useMemo } from "react";
-import { buildNestedFolderStructure } from "./utils";
+
+import { FileTree } from "@/components/ui/nextra-filetree";
+
import {
DataroomFolderWithDocuments,
useDataroomFoldersTree,
} from "@/lib/swr/use-dataroom";
+import { buildNestedFolderStructure } from "./utils";
+
const FolderComponentSelection = memo(
({
folder,
diff --git a/components/datarooms/folders/sidebar-tree.tsx b/components/datarooms/folders/sidebar-tree.tsx
index 686f3793..220817b1 100644
--- a/components/datarooms/folders/sidebar-tree.tsx
+++ b/components/datarooms/folders/sidebar-tree.tsx
@@ -1,12 +1,16 @@
import { useRouter } from "next/router";
-import { FileTree } from "@/components/ui/nextra-filetree";
+
import { memo, useMemo } from "react";
-import { buildNestedFolderStructure } from "./utils";
+
+import { FileTree } from "@/components/ui/nextra-filetree";
+
import {
DataroomFolderWithDocuments,
useDataroomFoldersTree,
} from "@/lib/swr/use-dataroom";
+import { buildNestedFolderStructure } from "./utils";
+
const FolderComponent = memo(
({
dataroomId,
diff --git a/components/datarooms/folders/utils.ts b/components/datarooms/folders/utils.ts
index 9a4fff18..8b5a016e 100644
--- a/components/datarooms/folders/utils.ts
+++ b/components/datarooms/folders/utils.ts
@@ -1,6 +1,7 @@
-import { DataroomFolderWithDocuments } from "@/lib/swr/use-dataroom";
import { DataroomDocument, DataroomFolder } from "@prisma/client";
+import { DataroomFolderWithDocuments } from "@/lib/swr/use-dataroom";
+
// Helper function to build nested folder structure
export const buildNestedFolderStructure = (
folders: DataroomFolderWithDocuments[],
diff --git a/components/datarooms/folders/view-tree.tsx b/components/datarooms/folders/view-tree.tsx
index a5192ff7..aa6e0a9f 100644
--- a/components/datarooms/folders/view-tree.tsx
+++ b/components/datarooms/folders/view-tree.tsx
@@ -1,9 +1,13 @@
import { useRouter } from "next/router";
-import { FileTree } from "@/components/ui/nextra-filetree";
+
import { memo, useMemo } from "react";
-import { buildNestedFolderStructureWithDocs } from "./utils";
+
import { DataroomDocument, DataroomFolder } from "@prisma/client";
+import { FileTree } from "@/components/ui/nextra-filetree";
+
+import { buildNestedFolderStructureWithDocs } from "./utils";
+
type DataroomDocumentWithVersion = {
dataroomDocumentId: string;
folderId: string | null;
diff --git a/components/datarooms/move-dataroom-folder-modal.tsx b/components/datarooms/move-dataroom-folder-modal.tsx
index 5e08000d..c128b020 100644
--- a/components/datarooms/move-dataroom-folder-modal.tsx
+++ b/components/datarooms/move-dataroom-folder-modal.tsx
@@ -1,3 +1,12 @@
+import { useRouter } from "next/router";
+
+import { useState } from "react";
+
+import { useTeam } from "@/context/team-context";
+import { toast } from "sonner";
+import { mutate } from "swr";
+
+import { SidebarFolderTreeSelection } from "@/components/datarooms/folders";
import { Button } from "@/components/ui/button";
import {
Dialog,
@@ -7,12 +16,6 @@ import {
DialogHeader,
DialogTitle,
} from "@/components/ui/dialog";
-import { useTeam } from "@/context/team-context";
-import { useState } from "react";
-import { toast } from "sonner";
-import { mutate } from "swr";
-import { SidebarFolderTreeSelection } from "@/components/datarooms/folders";
-import { useRouter } from "next/router";
export function MoveToDataroomFolderModal({
open,
@@ -112,7 +115,7 @@ export function MoveToDataroomFolderModal({
</div>
<DialogFooter>
- <Button onClick={handleSubmit} className="w-full h-9">
+ <Button onClick={handleSubmit} className="h-9 w-full">
Move to folder
</Button>
</DialogFooter>
diff --git a/components/datarooms/stats-card.tsx b/components/datarooms/stats-card.tsx
index 01aca310..3a19973f 100644
--- a/components/datarooms/stats-card.tsx
+++ b/components/datarooms/stats-card.tsx
@@ -1,6 +1,8 @@
import ErrorPage from "next/error";
+
import StatsElement from "@/components/documents/stats-element";
import { Skeleton } from "@/components/ui/skeleton";
+
import { useDataroomStats } from "@/lib/swr/use-dataroom-stats";
export default function StatsCard() {
@@ -12,10 +14,10 @@ export default function StatsCard() {
if (loading) {
return (
- <div className="grid grid-cols-1 sm:grid-cols-3 lg:grid-cols-3 border-foreground/5 space-y-2 sm:space-y-0 sm:space-x-2 lg:space-x-3">
+ <div className="grid grid-cols-1 space-y-2 border-foreground/5 sm:grid-cols-3 sm:space-x-2 sm:space-y-0 lg:grid-cols-3 lg:space-x-3">
{Array.from({ length: 3 }).map((_, i) => (
<div
- className="border border-foreground/5 py-6 px-4 sm:px-6 lg:px-8 rounded-lg"
+ className="rounded-lg border border-foreground/5 px-4 py-6 sm:px-6 lg:px-8"
key={i}
>
<Skeleton className="h-6 w-[80%] rounded-sm" />
@@ -55,7 +57,7 @@ export default function StatsCard() {
];
return stats && stats.dataroomViews.length > 0 ? (
- <div className="grid grid-cols-1 sm:grid-cols-3 lg:grid-cols-3 border-foreground/5 space-y-2 sm:space-y-0 sm:space-x-2 lg:space-x-3">
+ <div className="grid grid-cols-1 space-y-2 border-foreground/5 sm:grid-cols-3 sm:space-x-2 sm:space-y-0 lg:grid-cols-3 lg:space-x-3">
{statistics.map((stat, statIdx) => (
<StatsElement key={statIdx} stat={stat} statIdx={statIdx} />
))}
diff --git a/components/document-upload.tsx b/components/document-upload.tsx
index 9e392e95..21ae5905 100644
--- a/components/document-upload.tsx
+++ b/components/document-upload.tsx
@@ -1,35 +1,36 @@
import { useMemo, useState } from "react";
-import { useDropzone } from "react-dropzone";
-import { bytesToSize } from "@/lib/utils";
-import { toast } from "sonner";
+import { useTeam } from "@/context/team-context";
import {
Upload as ArrowUpTrayIcon,
File as DocumentIcon,
FileText as DocumentTextIcon,
- Presentation as PresentationChartBarIcon,
Image as PhotoIcon,
+ Presentation as PresentationChartBarIcon,
} from "lucide-react";
-import { useTeam } from "@/context/team-context";
+import { useDropzone } from "react-dropzone";
+import { toast } from "sonner";
+
import { usePlan } from "@/lib/swr/use-billing";
+import { bytesToSize } from "@/lib/utils";
import { getPagesCount } from "@/lib/utils/get-page-number-count";
function fileIcon(fileType: string) {
switch (fileType) {
case "application/pdf":
- return <DocumentTextIcon className="h-6 w-6 mx-auto" />;
+ return <DocumentTextIcon className="mx-auto h-6 w-6" />;
case "image/png":
case "image/jpeg":
case "image/gif":
case "image/jpg":
- return <PhotoIcon className="h-6 w-6 mx-auto" />;
+ return <PhotoIcon className="mx-auto h-6 w-6" />;
case "application/vnd.openxmlformats-officedocument.wordprocessingml.document":
case "application/vnd.openxmlformats-officedocument.presentationml.presentation":
case "application/vnd.ms-powerpoint":
case "application/msword":
- return <PresentationChartBarIcon className="h-6 w-6 mx-auto" />;
+ return <PresentationChartBarIcon className="mx-auto h-6 w-6" />;
default:
- return <DocumentIcon className="h-6 w-6 mx-auto" />;
+ return <DocumentIcon className="mx-auto h-6 w-6" />;
}
}
@@ -89,13 +90,13 @@ export default function DocumentUpload({
<div className="col-span-full">
<div
{...getRootProps()}
- className="relative cursor-pointer font-semibold text-foreground hover:text-gray-900 hover:bg-gray-100 hover:dark:text-gray-500 hover:dark:bg-gray-900 block group"
+ className="group relative block cursor-pointer font-semibold text-foreground hover:bg-gray-100 hover:text-gray-900 hover:dark:bg-gray-900 hover:dark:text-gray-500"
>
<input {...getInputProps()} name="file" className="sr-only" />
- <div className="flex justify-center rounded-lg border border-dashed border-black/25 dark:border-white/25 px-6 py-10 min-h-[200px] md:min-w-full items-center">
+ <div className="flex min-h-[200px] items-center justify-center rounded-lg border border-dashed border-black/25 px-6 py-10 dark:border-white/25 md:min-w-full">
{currentFile ? (
<div
- className="absolute inset-0 opacity-10 pointer-events-none group-hover:opacity-5 transition-opacity"
+ className="pointer-events-none absolute inset-0 opacity-10 transition-opacity group-hover:opacity-5"
style={{
backgroundImage: `url(${imageBlobUrl})`,
backgroundPosition: "center",
@@ -105,7 +106,7 @@ export default function DocumentUpload({
) : null}
<div className="text-center">
{currentFile ? (
- <div className="flex flex-col sm:flex-row items-center space-y-1 sm:space-x-2 text-foreground">
+ <div className="flex flex-col items-center space-y-1 text-foreground sm:flex-row sm:space-x-2">
<div>{fileIcon(currentFile.type)}</div>
<p>{currentFile.name}</p>
<p className="text-gray-500">{bytesToSize(currentFile.size)}</p>
diff --git a/components/documents/add-document-modal.tsx b/components/documents/add-document-modal.tsx
index 114cd492..c37a62b5 100644
--- a/components/documents/add-document-modal.tsx
+++ b/components/documents/add-document-modal.tsx
@@ -1,4 +1,15 @@
-import { Dialog, DialogContent, DialogTrigger } from "@/components/ui/dialog";
+import { useRouter } from "next/router";
+
+import { FormEvent, useState } from "react";
+
+import { useTeam } from "@/context/team-context";
+import { usePlausible } from "next-plausible";
+import { parsePageId } from "notion-utils";
+import { toast } from "sonner";
+import { mutate } from "swr";
+
+import DocumentUpload from "@/components/document-upload";
+import { Button } from "@/components/ui/button";
import {
Card,
CardContent,
@@ -6,25 +17,18 @@ import {
CardHeader,
CardTitle,
} from "@/components/ui/card";
+import { Dialog, DialogContent, DialogTrigger } from "@/components/ui/dialog";
import { Label } from "@/components/ui/label";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
-import { FormEvent, useState } from "react";
-import { useRouter } from "next/router";
-import DocumentUpload from "@/components/document-upload";
-import { copyToClipboard } from "@/lib/utils";
-import { Button } from "@/components/ui/button";
-import { usePlausible } from "next-plausible";
-import { toast } from "sonner";
-import { useTeam } from "@/context/team-context";
-import { parsePageId } from "notion-utils";
-import { putFile } from "@/lib/files/put-file";
+
+import { useAnalytics } from "@/lib/analytics";
import {
DocumentData,
createDocument,
createNewDocumentVersion,
} from "@/lib/documents/create-document";
-import { useAnalytics } from "@/lib/analytics";
-import { mutate } from "swr";
+import { putFile } from "@/lib/files/put-file";
+import { copyToClipboard } from "@/lib/utils";
export function AddDocumentModal({
newVersion,
@@ -344,7 +348,7 @@ export function AddDocumentModal({
<Dialog open={isOpen} onOpenChange={clearModelStates}>
<DialogTrigger asChild>{children}</DialogTrigger>
<DialogContent
- className="text-foreground bg-transparent border-none shadow-none"
+ className="border-none bg-transparent text-foreground shadow-none"
isDocumentDialog
>
<Tabs defaultValue="document">
@@ -427,7 +431,7 @@ export function AddDocumentModal({
name="notion-link"
id="notion-link"
placeholder="notion.site/..."
- className="flex w-full rounded-md border-0 py-1.5 text-foreground bg-background shadow-sm ring-1 ring-inset ring-input placeholder:text-muted-foreground focus:ring-2 focus:ring-inset focus:ring-gray-400 sm:text-sm sm:leading-6"
+ className="flex w-full rounded-md border-0 bg-background py-1.5 text-foreground shadow-sm ring-1 ring-inset ring-input placeholder:text-muted-foreground focus:ring-2 focus:ring-inset focus:ring-gray-400 sm:text-sm sm:leading-6"
value={notionLink || ""}
onChange={(e) => setNotionLink(e.target.value)}
/>
diff --git a/components/documents/breadcrumb.tsx b/components/documents/breadcrumb.tsx
index 5d56daf9..eae15b57 100644
--- a/components/documents/breadcrumb.tsx
+++ b/components/documents/breadcrumb.tsx
@@ -1,5 +1,10 @@
-import React, { useMemo } from "react";
import Link from "next/link";
+import { useRouter } from "next/router";
+
+import React, { useMemo } from "react";
+
+import { useFolderWithParents } from "@/lib/swr/use-folders";
+
import {
Breadcrumb,
BreadcrumbItem,
@@ -8,8 +13,6 @@ import {
BreadcrumbPage,
BreadcrumbSeparator,
} from "../ui/breadcrumb";
-import { useRouter } from "next/router";
-import { useFolderWithParents } from "@/lib/swr/use-folders";
function BreadcrumbComponentBase({ name }: { name: string[] }) {
const { folders: folderNames } = useFolderWithParents({ name });
diff --git a/components/documents/document-card.tsx b/components/documents/document-card.tsx
index 217a084b..b387e0a0 100644
--- a/components/documents/document-card.tsx
+++ b/components/documents/document-card.tsx
@@ -1,11 +1,18 @@
-import { nFormatter, timeAgo } from "@/lib/utils";
+import Image from "next/image";
import Link from "next/link";
-import { DocumentWithLinksAndLinkCountAndViewCount } from "@/lib/types";
+
+import { useEffect, useRef, useState } from "react";
+
import { TeamContextType } from "@/context/team-context";
+import { FolderInputIcon, MoreVertical, TrashIcon } from "lucide-react";
+import { useTheme } from "next-themes";
+import { toast } from "sonner";
+import { mutate } from "swr";
+
import BarChart from "@/components/shared/icons/bar-chart";
-import Image from "next/image";
+import Check from "@/components/shared/icons/check";
+import Copy from "@/components/shared/icons/copy";
import NotionIcon from "@/components/shared/icons/notion";
-import { toast } from "sonner";
import { Button } from "@/components/ui/button";
import {
DropdownMenu,
@@ -15,13 +22,11 @@ import {
DropdownMenuSeparator,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
-import { TrashIcon, MoreVertical, FolderInputIcon } from "lucide-react";
-import { mutate } from "swr";
+
+import { DocumentWithLinksAndLinkCountAndViewCount } from "@/lib/types";
+import { nFormatter, timeAgo } from "@/lib/utils";
import { useCopyToClipboard } from "@/lib/utils/use-copy-to-clipboard";
-import Check from "@/components/shared/icons/check";
-import Copy from "@/components/shared/icons/copy";
-import { useEffect, useRef, useState } from "react";
-import { useTheme } from "next-themes";
+
import { MoveToFolderModal } from "./move-folder-modal";
type DocumentsCardProps = {
@@ -122,11 +127,11 @@ export default function DocumentsCard({
return (
<>
- <li className="group/row relative rounded-lg p-3 border-0 dark:bg-secondary ring-1 ring-gray-200 dark:ring-gray-700 transition-all hover:ring-gray-300 hover:dark:ring-gray-500 hover:bg-secondary sm:p-4 flex justify-between items-center">
- <div className="min-w-0 flex shrink items-center space-x-2 sm:space-x-4">
- <div className="w-8 mx-0.5 sm:mx-1 text-center flex justify-center items-center">
+ <li className="group/row relative flex items-center justify-between rounded-lg border-0 p-3 ring-1 ring-gray-200 transition-all hover:bg-secondary hover:ring-gray-300 dark:bg-secondary dark:ring-gray-700 hover:dark:ring-gray-500 sm:p-4">
+ <div className="flex min-w-0 shrink items-center space-x-2 sm:space-x-4">
+ <div className="mx-0.5 flex w-8 items-center justify-center text-center sm:mx-1">
{prismaDocument.type === "notion" ? (
- <NotionIcon className="w-8 h-8" />
+ <NotionIcon className="h-8 w-8" />
) : (
<Image
src={`/_icons/${prismaDocument.type}${isLight ? "-light" : ""}.svg`}
@@ -139,18 +144,18 @@ export default function DocumentsCard({
<div className="flex-col">
<div className="flex items-center">
- <h2 className="min-w-0 text-sm font-semibold leading-6 text-foreground truncate max-w-[150px] sm:max-w-md">
+ <h2 className="min-w-0 max-w-[150px] truncate text-sm font-semibold leading-6 text-foreground sm:max-w-md">
<Link
href={`/documents/${prismaDocument.id}`}
- className="truncate w-full"
+ className="w-full truncate"
>
<span>{prismaDocument.name}</span>
<span className="absolute inset-0" />
</Link>
</h2>
- <div className="flex ml-2">
+ <div className="ml-2 flex">
<button
- className="group rounded-md bg-gray-200 dark:bg-gray-700 z-10 p-1 transition-all duration-75 hover:scale-105 hover:bg-emerald-100 hover:dark:bg-emerald-200 active:scale-95"
+ className="group z-10 rounded-md bg-gray-200 p-1 transition-all duration-75 hover:scale-105 hover:bg-emerald-100 active:scale-95 dark:bg-gray-700 hover:dark:bg-emerald-200"
onClick={() =>
handleCopyToClipboard(prismaDocument.links[0].id)
}
@@ -187,10 +192,10 @@ export default function DocumentsCard({
e.stopPropagation();
}}
href={`/documents/${prismaDocument.id}`}
- className="flex items-center z-10 space-x-1 rounded-md bg-gray-200 dark:bg-gray-700 px-1.5 sm:px-2 py-0.5 transition-all duration-75 hover:scale-105 active:scale-100"
+ className="z-10 flex items-center space-x-1 rounded-md bg-gray-200 px-1.5 py-0.5 transition-all duration-75 hover:scale-105 active:scale-100 dark:bg-gray-700 sm:px-2"
>
- <BarChart className="h-3 sm:h-4 w-3 sm:w-4 text-muted-foreground" />
- <p className="whitespace-nowrap text-xs sm:text-sm text-muted-foreground">
+ <BarChart className="h-3 w-3 text-muted-foreground sm:h-4 sm:w-4" />
+ <p className="whitespace-nowrap text-xs text-muted-foreground sm:text-sm">
{nFormatter(prismaDocument._count.views)}
<span className="ml-1 hidden sm:inline-block">views</span>
</p>
@@ -201,28 +206,28 @@ export default function DocumentsCard({
<Button
// size="icon"
variant="outline"
- className="h-8 lg:h-9 w-8 lg:w-9 p-0 z-10 bg-transparent border-gray-200 dark:border-gray-700 hover:bg-gray-200 hover:dark:bg-gray-700"
+ className="z-10 h-8 w-8 border-gray-200 bg-transparent p-0 hover:bg-gray-200 dark:border-gray-700 hover:dark:bg-gray-700 lg:h-9 lg:w-9"
>
<span className="sr-only">Open menu</span>
- <MoreVertical className="w-4 h-4" />
+ <MoreVertical className="h-4 w-4" />
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end" ref={dropdownRef}>
<DropdownMenuLabel>Actions</DropdownMenuLabel>
<DropdownMenuItem onClick={() => setMoveFolderOpen(true)}>
- <FolderInputIcon className="w-4 h-4 mr-2" />
+ <FolderInputIcon className="mr-2 h-4 w-4" />
Move to folder
</DropdownMenuItem>
<DropdownMenuSeparator />
<DropdownMenuItem
onClick={(event) => handleButtonClick(event, prismaDocument.id)}
- className="text-destructive focus:bg-destructive focus:text-destructive-foreground duration-200"
+ className="text-destructive duration-200 focus:bg-destructive focus:text-destructive-foreground"
>
{isFirstClick ? (
"Really delete?"
) : (
<>
- <TrashIcon className="w-4 h-4 mr-2" /> Delete document
+ <TrashIcon className="mr-2 h-4 w-4" /> Delete document
</>
)}
</DropdownMenuItem>
diff --git a/components/documents/document-header.tsx b/components/documents/document-header.tsx
index af335ead..3396d5ac 100644
--- a/components/documents/document-header.tsx
+++ b/components/documents/document-header.tsx
@@ -1,17 +1,21 @@
-import { getExtension } from "@/lib/utils";
-import { Document, DocumentVersion } from "@prisma/client";
import Image from "next/image";
-import NotionIcon from "@/components/shared/icons/notion";
+import { useRouter } from "next/router";
+
import { useEffect, useRef, useState } from "react";
-import { toast } from "sonner";
+
+import { useTeam } from "@/context/team-context";
+import { Document, DocumentVersion } from "@prisma/client";
+import { Sparkles, TrashIcon } from "lucide-react";
+import { usePlausible } from "next-plausible";
import { useTheme } from "next-themes";
-import { AddDocumentModal } from "./add-document-modal";
+import { toast } from "sonner";
+import { mutate } from "swr";
+
import FileUp from "@/components/shared/icons/file-up";
-import { Button } from "@/components/ui/button";
+import MoreVertical from "@/components/shared/icons/more-vertical";
+import NotionIcon from "@/components/shared/icons/notion";
import PapermarkSparkle from "@/components/shared/icons/papermark-sparkle";
-import { mutate } from "swr";
-import { useRouter } from "next/router";
-import { usePlausible } from "next-plausible";
+import { Button } from "@/components/ui/button";
import {
DropdownMenu,
DropdownMenuContent,
@@ -21,10 +25,11 @@ import {
DropdownMenuSeparator,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
-import MoreVertical from "@/components/shared/icons/more-vertical";
-import { Sparkles, TrashIcon } from "lucide-react";
+
import { DocumentWithLinksAndLinkCountAndViewCount } from "@/lib/types";
-import { useTeam } from "@/context/team-context";
+import { getExtension } from "@/lib/utils";
+
+import { AddDocumentModal } from "./add-document-modal";
export default function DocumentHeader({
prismaDocument,
@@ -238,12 +243,12 @@ export default function DocumentHeader({
};
return (
- <header className="flex items-center justify-between gap-x-8 !mb-16">
- <div className="flex space-x-2 items-center">
+ <header className="!mb-16 flex items-center justify-between gap-x-8">
+ <div className="flex items-center space-x-2">
{primaryVersion.type === "notion" ? (
- <NotionIcon className="w-7 lg:w-8 h-7 lg:h-8" />
+ <NotionIcon className="h-7 w-7 lg:h-8 lg:w-8" />
) : (
- <div className="w-[25px] lg:w-[32px] h-[25px] lg:h-[32px]">
+ <div className="h-[25px] w-[25px] lg:h-[32px] lg:w-[32px]">
<Image
src={`/_icons/${getExtension(primaryVersion.file)}${isLight ? "-light" : ""}.svg`}
alt="File icon"
@@ -253,9 +258,9 @@ export default function DocumentHeader({
</div>
)}
- <div className="flex flex-col mt-1 lg:mt-0">
+ <div className="mt-1 flex flex-col lg:mt-0">
<h2
- className="text-lg lg:text-xl xl:text-2xl text-foreground font-semibold tracking-tight py-0.5 lg:py-1 px-1 lg:px-3 rounded-md border border-transparent hover:cursor-text hover:border hover:border-border focus-visible:text-lg lg:focus-visible:text-xl duration-200"
+ className="rounded-md border border-transparent px-1 py-0.5 text-lg font-semibold tracking-tight text-foreground duration-200 hover:cursor-text hover:border hover:border-border focus-visible:text-lg lg:px-3 lg:py-1 lg:text-xl lg:focus-visible:text-xl xl:text-2xl"
ref={nameRef}
contentEditable={true}
onFocus={() => setIsEditingName(true)}
@@ -265,7 +270,7 @@ export default function DocumentHeader({
dangerouslySetInnerHTML={{ __html: prismaDocument.name }}
/>
{isEditingName && (
- <span className="text-xs text-muted-foreground mt-1">
+ <span className="mt-1 text-xs text-muted-foreground">
{`Press <Enter> to save the name.`}
</span>
)}
@@ -276,7 +281,7 @@ export default function DocumentHeader({
{primaryVersion.type !== "notion" && (
<AddDocumentModal newVersion>
<button title="Upload a new version" className="hidden md:flex">
- <FileUp className="w-6 h-6" />
+ <FileUp className="h-6 w-6" />
</button>
</AddDocumentModal>
)}
@@ -284,7 +289,7 @@ export default function DocumentHeader({
{prismaDocument.type !== "notion" &&
prismaDocument.assistantEnabled && (
<Button
- className="group hidden md:flex h-8 lg:h-9 space-x-1 text-xs lg:text-sm whitespace-nowrap bg-gradient-to-r from-[#16222A] via-emerald-500 to-[#16222A] duration-200 ease-linear hover:bg-right"
+ className="group hidden h-8 space-x-1 whitespace-nowrap bg-gradient-to-r from-[#16222A] via-emerald-500 to-[#16222A] text-xs duration-200 ease-linear hover:bg-right md:flex lg:h-9 lg:text-sm"
variant={"special"}
size={"icon"}
style={{ backgroundSize: "200% auto" }}
@@ -299,7 +304,7 @@ export default function DocumentHeader({
{actionRows.map((row, i) => (
<ul
key={i.toString()}
- className="flex flex-wrap items-center justify-end gap-2 md:gap-4 md:flex-nowrap"
+ className="flex flex-wrap items-center justify-end gap-2 md:flex-nowrap md:gap-4"
>
{row.map((action, i) => (
<li key={i}>{action}</li>
@@ -312,7 +317,7 @@ export default function DocumentHeader({
<DropdownMenuTrigger asChild>
<Button
variant="outline"
- className="h-8 lg:h-9 w-8 lg:w-9 p-0 bg-transparent"
+ className="h-8 w-8 bg-transparent p-0 lg:h-9 lg:w-9"
>
<span className="sr-only">Open menu</span>
<MoreVertical className="h-4 w-4" />
@@ -331,7 +336,7 @@ export default function DocumentHeader({
title="Add a new version"
className="flex items-center"
>
- <FileUp className="w-4 h-4 mr-2" /> Add new version
+ <FileUp className="mr-2 h-4 w-4" /> Add new version
</button>
</AddDocumentModal>
</DropdownMenuItem>
@@ -340,7 +345,7 @@ export default function DocumentHeader({
<DropdownMenuItem
onClick={() => activateOrRedirectAssistant(prismaDocument)}
>
- <PapermarkSparkle className="h-4 w-4 mr-2" />
+ <PapermarkSparkle className="mr-2 h-4 w-4" />
Open AI Assistant
</DropdownMenuItem>
)}
@@ -355,7 +360,7 @@ export default function DocumentHeader({
activateOrDeactivateAssistant(true, prismaDocument.id)
}
>
- <Sparkles className="w-4 h-4 mr-2" /> Activate Assistant
+ <Sparkles className="mr-2 h-4 w-4" /> Activate Assistant
</DropdownMenuItem>
) : (
<DropdownMenuItem
@@ -363,7 +368,7 @@ export default function DocumentHeader({
activateOrDeactivateAssistant(false, prismaDocument.id)
}
>
- <Sparkles className="w-4 h-4 mr-2" /> Disable Assistant
+ <Sparkles className="mr-2 h-4 w-4" /> Disable Assistant
</DropdownMenuItem>
))}
@@ -373,7 +378,7 @@ export default function DocumentHeader({
className="text-destructive focus:bg-destructive focus:text-destructive-foreground"
onClick={(event) => handleButtonClick(event, prismaDocument.id)}
>
- <TrashIcon className="w-4 h-4 mr-2" />
+ <TrashIcon className="mr-2 h-4 w-4" />
{isFirstClick ? "Really delete?" : "Delete document"}
</DropdownMenuItem>
{/* create a dropdownmenuitem that onclick calls a post request to /api/assistants with the documentId */}
diff --git a/components/documents/empty-document.tsx b/components/documents/empty-document.tsx
index fe2e2a24..8b78de09 100644
--- a/components/documents/empty-document.tsx
+++ b/components/documents/empty-document.tsx
@@ -1,4 +1,5 @@
import { FilePlusIcon, PlusIcon } from "lucide-react";
+
import { Button } from "../ui/button";
import { AddDocumentModal } from "./add-document-modal";
diff --git a/components/documents/folder-card.tsx b/components/documents/folder-card.tsx
index 67ca8a71..afadc17f 100644
--- a/components/documents/folder-card.tsx
+++ b/components/documents/folder-card.tsx
@@ -1,6 +1,12 @@
-import { timeAgo } from "@/lib/utils";
import Link from "next/link";
+
+import { useEffect, useRef, useState } from "react";
+
import { TeamContextType } from "@/context/team-context";
+import { FolderIcon, MoreVertical, TrashIcon } from "lucide-react";
+import { toast } from "sonner";
+import { mutate } from "swr";
+
import { Button } from "@/components/ui/button";
import {
DropdownMenu,
@@ -10,13 +16,12 @@ import {
DropdownMenuSeparator,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
-import { MoreVertical, FolderIcon, TrashIcon } from "lucide-react";
-import { useEffect, useRef, useState } from "react";
-import { FolderWithCount } from "@/lib/swr/use-documents";
+
import { DataroomFolderWithCount } from "@/lib/swr/use-dataroom";
+import { FolderWithCount } from "@/lib/swr/use-documents";
+import { timeAgo } from "@/lib/utils";
+
import { EditFolderModal } from "../folders/edit-folder-modal";
-import { toast } from "sonner";
-import { mutate } from "swr";
type FolderCardProps = {
folder: FolderWithCount | DataroomFolderWithCount;
@@ -124,16 +129,16 @@ export default function FolderCard({
return (
<>
- <li className="group/row relative rounded-lg p-3 border-0 dark:bg-secondary ring-1 ring-gray-400 dark:ring-gray-500 transition-all hover:ring-gray-500 hover:dark:ring-gray-400 hover:bg-secondary sm:p-4 flex justify-between items-center">
- <div className="min-w-0 flex shrink items-center space-x-2 sm:space-x-4">
- <div className="w-8 mx-0.5 sm:mx-1 text-center flex justify-center items-center">
- <FolderIcon className="w-8 h-8 " strokeWidth={1} />
+ <li className="group/row relative flex items-center justify-between rounded-lg border-0 p-3 ring-1 ring-gray-400 transition-all hover:bg-secondary hover:ring-gray-500 dark:bg-secondary dark:ring-gray-500 hover:dark:ring-gray-400 sm:p-4">
+ <div className="flex min-w-0 shrink items-center space-x-2 sm:space-x-4">
+ <div className="mx-0.5 flex w-8 items-center justify-center text-center sm:mx-1">
+ <FolderIcon className="h-8 w-8 " strokeWidth={1} />
</div>
<div className="flex-col">
<div className="flex items-center">
- <h2 className="min-w-0 text-sm font-semibold leading-6 text-foreground truncate max-w-[150px] sm:max-w-md">
- <Link href={`${folderPath}`} className="truncate w-full">
+ <h2 className="min-w-0 max-w-[150px] truncate text-sm font-semibold leading-6 text-foreground sm:max-w-md">
+ <Link href={`${folderPath}`} className="w-full truncate">
<span>{folder.name}</span>
<span className="absolute inset-0" />
</Link>
@@ -175,10 +180,10 @@ export default function FolderCard({
<Button
// size="icon"
variant="outline"
- className="h-8 lg:h-9 w-8 lg:w-9 p-0 z-10 bg-transparent border-gray-200 dark:border-gray-700 hover:bg-gray-200 hover:dark:bg-gray-700"
+ className="z-10 h-8 w-8 border-gray-200 bg-transparent p-0 hover:bg-gray-200 dark:border-gray-700 hover:dark:bg-gray-700 lg:h-9 lg:w-9"
>
<span className="sr-only">Open menu</span>
- <MoreVertical className="w-4 h-4" />
+ <MoreVertical className="h-4 w-4" />
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end" ref={dropdownRef}>
@@ -190,13 +195,13 @@ export default function FolderCard({
<DropdownMenuItem
onClick={(event) => handleButtonClick(event, folder.id)}
- className="text-destructive focus:bg-destructive focus:text-destructive-foreground duration-200"
+ className="text-destructive duration-200 focus:bg-destructive focus:text-destructive-foreground"
>
{isFirstClick ? (
"Really delete?"
) : (
<>
- <TrashIcon className="w-4 h-4 mr-2" /> Delete Folder
+ <TrashIcon className="mr-2 h-4 w-4" /> Delete Folder
</>
)}
</DropdownMenuItem>
diff --git a/components/documents/move-folder-modal.tsx b/components/documents/move-folder-modal.tsx
index 8186d098..2a027af6 100644
--- a/components/documents/move-folder-modal.tsx
+++ b/components/documents/move-folder-modal.tsx
@@ -1,3 +1,12 @@
+import { useRouter } from "next/router";
+
+import { useState } from "react";
+
+import { useTeam } from "@/context/team-context";
+import { toast } from "sonner";
+import { mutate } from "swr";
+
+import { SidebarFolderTreeSelection } from "@/components/sidebar-folders";
import { Button } from "@/components/ui/button";
import {
Dialog,
@@ -7,12 +16,6 @@ import {
DialogHeader,
DialogTitle,
} from "@/components/ui/dialog";
-import { useTeam } from "@/context/team-context";
-import { useState } from "react";
-import { toast } from "sonner";
-import { mutate } from "swr";
-import { SidebarFolderTreeSelection } from "@/components/sidebar-folders";
-import { useRouter } from "next/router";
export function MoveToFolderModal({
open,
@@ -105,7 +108,7 @@ export function MoveToFolderModal({
</div>
<DialogFooter>
- <Button onClick={handleSubmit} className="w-full h-9">
+ <Button onClick={handleSubmit} className="h-9 w-full">
Move to folder
</Button>
</DialogFooter>
diff --git a/components/documents/process-status-bar.tsx b/components/documents/process-status-bar.tsx
index 84038f6a..582fa041 100644
--- a/components/documents/process-status-bar.tsx
+++ b/components/documents/process-status-bar.tsx
@@ -1,6 +1,8 @@
+import { useEventRunStatuses } from "@trigger.dev/react";
+
import { Progress } from "@/components/ui/progress";
+
import { cn } from "@/lib/utils";
-import { useEventRunStatuses } from "@trigger.dev/react";
export default function ProcessStatusBar({
documentVersionId,
@@ -18,7 +20,7 @@ export default function ProcessStatusBar({
value={0}
text="Processing document..."
className={cn(
- "w-full text-[8px] font-semibold rounded-none",
+ "w-full rounded-none text-[8px] font-semibold",
className,
)}
/>
@@ -31,7 +33,7 @@ export default function ProcessStatusBar({
value={0}
text={error.message}
className={cn(
- "w-full text-[8px] font-semibold rounded-none",
+ "w-full rounded-none text-[8px] font-semibold",
className,
)}
/>
@@ -52,7 +54,7 @@ export default function ProcessStatusBar({
text={`Error processing document page ${Number(statuses[0]?.data?.currentPage)}`}
error={true}
className={cn(
- "w-full text-[8px] font-semibold rounded-none",
+ "w-full rounded-none text-[8px] font-semibold",
className,
)}
/>
@@ -63,7 +65,7 @@ export default function ProcessStatusBar({
<Progress
value={progress}
text={text}
- className={cn("w-full text-[8px] font-semibold rounded-none", className)}
+ className={cn("w-full rounded-none text-[8px] font-semibold", className)}
/>
);
}
diff --git a/components/documents/stats-card.tsx b/components/documents/stats-card.tsx
index 8a90c38d..5f13226c 100644
--- a/components/documents/stats-card.tsx
+++ b/components/documents/stats-card.tsx
@@ -1,8 +1,11 @@
-import { TStatsData } from "@/lib/swr/use-stats";
import ErrorPage from "next/error";
-import StatsElement from "./stats-element";
+
import { Skeleton } from "@/components/ui/skeleton";
+import { TStatsData } from "@/lib/swr/use-stats";
+
+import StatsElement from "./stats-element";
+
export default function StatsCard({
statsData,
}: {
@@ -16,10 +19,10 @@ export default function StatsCard({
if (loading) {
return (
- <div className="grid grid-cols-1 sm:grid-cols-3 lg:grid-cols-3 border-foreground/5 space-y-2 sm:space-y-0 sm:space-x-2 lg:space-x-3">
+ <div className="grid grid-cols-1 space-y-2 border-foreground/5 sm:grid-cols-3 sm:space-x-2 sm:space-y-0 lg:grid-cols-3 lg:space-x-3">
{Array.from({ length: 3 }).map((_, i) => (
<div
- className="border border-foreground/5 py-6 px-4 sm:px-6 lg:px-8 rounded-lg"
+ className="rounded-lg border border-foreground/5 px-4 py-6 sm:px-6 lg:px-8"
key={i}
>
<Skeleton className="h-6 w-[80%] rounded-sm" />
@@ -66,7 +69,7 @@ export default function StatsCard({
];
return stats && stats.views.length > 0 ? (
- <div className="grid grid-cols-1 sm:grid-cols-3 lg:grid-cols-3 border-foreground/5 space-y-2 sm:space-y-0 sm:space-x-2 lg:space-x-3">
+ <div className="grid grid-cols-1 space-y-2 border-foreground/5 sm:grid-cols-3 sm:space-x-2 sm:space-y-0 lg:grid-cols-3 lg:space-x-3">
{statistics.map((stat, statIdx) => (
<StatsElement key={statIdx} stat={stat} statIdx={statIdx} />
))}
diff --git a/components/documents/stats-chart-dummy.tsx b/components/documents/stats-chart-dummy.tsx
index a666a728..e151b593 100644
--- a/components/documents/stats-chart-dummy.tsx
+++ b/components/documents/stats-chart-dummy.tsx
@@ -16,7 +16,7 @@ export default function StatsChartDummy({
}));
return (
- <div className="pl-0.5 md:pl-1 pb-0.5 md:pb-1 border-l border-b rounded-bl-lg">
+ <div className="rounded-bl-lg border-b border-l pb-0.5 pl-0.5 md:pb-1 md:pl-1">
<BarChartComponent data={durationData} isDummy />
</div>
);
diff --git a/components/documents/stats-chart-skeleton.tsx b/components/documents/stats-chart-skeleton.tsx
index f262a1ae..99ed272a 100644
--- a/components/documents/stats-chart-skeleton.tsx
+++ b/components/documents/stats-chart-skeleton.tsx
@@ -1,22 +1,23 @@
-import { Skeleton } from "../ui/skeleton";
import { cn } from "@/lib/utils";
+import { Skeleton } from "../ui/skeleton";
+
const StatsChartSkeleton = ({ className }: { className?: string }) => {
return (
- <section className={cn("px-4 border-l border-b rounded-bl-lg", className)}>
+ <section className={cn("rounded-bl-lg border-b border-l px-4", className)}>
<div className="flex items-center justify-end">
<Skeleton className="h-4 w-28" />
</div>
- <div className="flex justify-start items-end space-x-8">
+ <div className="flex items-end justify-start space-x-8">
<div className="flex flex-col">
{Array.from({ length: 5 }).map((_, i) => (
- <Skeleton className="w-10 h-4 rounded-sm my-[18px]" key={i} />
+ <Skeleton className="my-[18px] h-4 w-10 rounded-sm" key={i} />
))}
</div>
- <div className="w-full flex items-end space-x-4 sm:space-x-5 md:space-x-8">
+ <div className="flex w-full items-end space-x-4 sm:space-x-5 md:space-x-8">
{[250, 200, 150, 100, 50, 20].map((item, i) => (
<Skeleton
- className="w-16 sm:w-20 md:w-28 !rounded-t-lg rounded-b-none"
+ className="w-16 !rounded-t-lg rounded-b-none sm:w-20 md:w-28"
style={{ height: `${item}px` }}
key={i}
/>
diff --git a/components/documents/stats-chart.tsx b/components/documents/stats-chart.tsx
index b503e150..a492fa4a 100644
--- a/components/documents/stats-chart.tsx
+++ b/components/documents/stats-chart.tsx
@@ -1,8 +1,10 @@
-import { TStatsData } from "@/lib/swr/use-stats";
import ErrorPage from "next/error";
+
+import { TStatsData } from "@/lib/swr/use-stats";
+
import BarChartComponent from "../charts/bar-chart";
-import StatsChartSkeleton from "./stats-chart-skeleton";
import StatsChartDummy from "./stats-chart-dummy";
+import StatsChartSkeleton from "./stats-chart-skeleton";
export default function StatsChart({
documentId,
@@ -80,7 +82,7 @@ export default function StatsChart({
}
return stats && stats.views.length > 0 ? (
- <div className="pl-0.5 md:pl-1 pb-0.5 md:pb-1 border-l border-b rounded-bl-lg">
+ <div className="rounded-bl-lg border-b border-l pb-0.5 pl-0.5 md:pb-1 md:pl-1">
<BarChartComponent data={durationData} />
</div>
) : (
diff --git a/components/documents/stats-element.tsx b/components/documents/stats-element.tsx
index a86aa637..979bc190 100644
--- a/components/documents/stats-element.tsx
+++ b/components/documents/stats-element.tsx
@@ -15,17 +15,17 @@ export default function StatsElement({ stat, statIdx }: StatsElementProps) {
return (
<div
key={statIdx}
- className="border border-foreground/5 py-6 px-6 xl:px-8 rounded-lg overflow-hidden"
+ className="overflow-hidden rounded-lg border border-foreground/5 px-6 py-6 xl:px-8"
>
<div
className={cn(
- "flex sm:flex-col lg:flex-row items-center sm:items-start lg:items-center space-x-2 sm:space-x-0 sm:space-y-2 lg:space-y-0 lg:space-x-2",
+ "flex items-center space-x-2 sm:flex-col sm:items-start sm:space-x-0 sm:space-y-2 lg:flex-row lg:items-center lg:space-x-2 lg:space-y-0",
!stat.active
? "text-gray-300 dark:text-gray-700"
: "text-muted-foreground",
)}
>
- <p className="text-sm font-medium leading-6 whitespace-nowrap capitalize">
+ <p className="whitespace-nowrap text-sm font-medium capitalize leading-6">
{stat.name}
</p>
</div>
diff --git a/components/documents/stats.tsx b/components/documents/stats.tsx
index 191fd1c8..8dfa6bb5 100644
--- a/components/documents/stats.tsx
+++ b/components/documents/stats.tsx
@@ -1,9 +1,12 @@
+import { useState } from "react";
+
+import { Label } from "@/components/ui/label";
+import { Switch } from "@/components/ui/switch";
+
import { useStats } from "@/lib/swr/use-stats";
+
import StatsCard from "./stats-card";
import StatsChart from "./stats-chart";
-import { useState } from "react";
-import { Switch } from "@/components/ui/switch";
-import { Label } from "@/components/ui/label";
export const StatsComponent = ({
documentId,
diff --git a/components/domains/add-domain-modal.tsx b/components/domains/add-domain-modal.tsx
index bf0605da..eccef3bd 100644
--- a/components/domains/add-domain-modal.tsx
+++ b/components/domains/add-domain-modal.tsx
@@ -1,3 +1,8 @@
+import { useState } from "react";
+
+import { useTeam } from "@/context/team-context";
+import { toast } from "sonner";
+
import { Button } from "@/components/ui/button";
import {
Dialog,
@@ -10,14 +15,13 @@ import {
} from "@/components/ui/dialog";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
-import { useTeam } from "@/context/team-context";
-import { useState } from "react";
-import { toast } from "sonner";
-import { UpgradePlanModal } from "../billing/upgrade-plan-modal";
-import { usePlan } from "@/lib/swr/use-billing";
+
import { useAnalytics } from "@/lib/analytics";
+import { usePlan } from "@/lib/swr/use-billing";
import useLimits from "@/lib/swr/use-limits";
+import { UpgradePlanModal } from "../billing/upgrade-plan-modal";
+
export function AddDomainModal({
open,
setOpen,
@@ -132,11 +136,11 @@ export function AddDomainModal({
<Input
id="domain"
placeholder="docs.yourdomain.com"
- className="w-full mt-1 mb-8"
+ className="mb-8 mt-1 w-full"
onChange={(e) => setDomain(e.target.value)}
/>
<DialogFooter>
- <Button type="submit" className="w-full h-9">
+ <Button type="submit" className="h-9 w-full">
Add domain
</Button>
</DialogFooter>
diff --git a/components/domains/domain-card.tsx b/components/domains/domain-card.tsx
index eb4a3bb5..95d459d3 100644
--- a/components/domains/domain-card.tsx
+++ b/components/domains/domain-card.tsx
@@ -1,16 +1,18 @@
+import { useState } from "react";
+
+import { useTeam } from "@/context/team-context";
import { mutate } from "swr";
-import { useDomainStatus } from "./use-domain-status";
-import DomainConfiguration from "./domain-configuration";
-import CheckCircle2 from "../shared/icons/check-cirlce-2";
+import { useAnalytics } from "@/lib/analytics";
+
import AlertCircle from "../shared/icons/alert-circle";
-import XCircle from "../shared/icons/x-circle";
-import LoadingSpinner from "../ui/loading-spinner";
+import CheckCircle2 from "../shared/icons/check-cirlce-2";
import ExternalLink from "../shared/icons/external-link";
+import XCircle from "../shared/icons/x-circle";
import { Button } from "../ui/button";
-import { useState } from "react";
-import { useTeam } from "@/context/team-context";
-import { useAnalytics } from "@/lib/analytics";
+import LoadingSpinner from "../ui/loading-spinner";
+import DomainConfiguration from "./domain-configuration";
+import { useDomainStatus } from "./use-domain-status";
export default function DomainCard({
domain,
@@ -49,7 +51,7 @@ export default function DomainCard({
return (
<>
- <div className="flex flex-col space-y-3 rounded-lg ring-1 ring-gray-200 dark:ring-gray-700 bg-white dark:bg-secondary hover:ring-gray-400 hover:dark:ring-gray-500 px-5 py-8 sm:px-10">
+ <div className="flex flex-col space-y-3 rounded-lg bg-white px-5 py-8 ring-1 ring-gray-200 hover:ring-gray-400 dark:bg-secondary dark:ring-gray-700 hover:dark:ring-gray-500 sm:px-10">
<div className="flex flex-col justify-between space-y-4 sm:flex-row sm:space-x-4">
<div className="flex items-center space-x-2">
<a
diff --git a/components/domains/domain-configuration.tsx b/components/domains/domain-configuration.tsx
index a41b4336..835afd8e 100644
--- a/components/domains/domain-configuration.tsx
+++ b/components/domains/domain-configuration.tsx
@@ -1,10 +1,12 @@
"use client";
import { useState } from "react";
-import { useDomainStatus } from "./use-domain-status";
+
import { getSubdomain } from "@/lib/domains";
import { cn } from "@/lib/utils";
+import { useDomainStatus } from "./use-domain-status";
+
export const InlineSnippet = ({
className,
children,
diff --git a/components/domains/use-domain-status.ts b/components/domains/use-domain-status.ts
index dece15b7..e4805893 100644
--- a/components/domains/use-domain-status.ts
+++ b/components/domains/use-domain-status.ts
@@ -1,7 +1,8 @@
+import { useTeam } from "@/context/team-context";
import useSWR from "swr";
-import { fetcher } from "@/lib/utils";
+
import { DomainResponse, DomainVerificationStatusProps } from "@/lib/types";
-import { useTeam } from "@/context/team-context";
+import { fetcher } from "@/lib/utils";
export function useDomainStatus({ domain }: { domain: string }) {
const teamInfo = useTeam();
diff --git a/components/emails/dataroom-notification.tsx b/components/emails/dataroom-notification.tsx
index 25aca5a8..6461416c 100644
--- a/components/emails/dataroom-notification.tsx
+++ b/components/emails/dataroom-notification.tsx
@@ -1,17 +1,19 @@
import React from "react";
+
import {
Body,
+ Button,
Container,
Head,
Heading,
+ Hr,
Html,
Preview,
- Text,
- Tailwind,
Section,
- Button,
- Hr,
+ Tailwind,
+ Text,
} from "@react-email/components";
+
export default function DataroomNotification({
dataroomName,
documentName,
@@ -28,12 +30,12 @@ export default function DataroomNotification({
<Head />
<Preview>View dataroom on Papermark</Preview>
<Tailwind>
- <Body className="bg-white my-auto mx-auto font-sans">
- <Container className="my-10 mx-auto p-5 w-[465px]">
- <Heading className="text-2xl font-normal text-center p-0 mt-4 mb-8 mx-0">
+ <Body className="mx-auto my-auto bg-white font-sans">
+ <Container className="mx-auto my-10 w-[465px] p-5">
+ <Heading className="mx-0 mb-8 mt-4 p-0 text-center text-2xl font-normal">
<span className="font-bold tracking-tighter">Papermark</span>
</Heading>
- <Heading className="text-xl font-seminbold text-center p-0 mt-4 mb-8 mx-0">
+ <Heading className="font-seminbold mx-0 mb-8 mt-4 p-0 text-center text-xl">
{`New document available for ${dataroomName}`}
</Heading>
<Text className="text-sm leading-6 text-black">Hey!</Text>
@@ -43,9 +45,9 @@ export default function DataroomNotification({
added to <span className="font-semibold">{dataroomName}</span>{" "}
dataroom on Papermark.
</Text>
- <Section className="text-center mt-[32px] mb-[32px]">
+ <Section className="mb-[32px] mt-[32px] text-center">
<Button
- className="bg-black rounded text-white text-xs font-semibold no-underline text-center"
+ className="rounded bg-black text-center text-xs font-semibold text-white no-underline"
href={`${url}`}
style={{ padding: "12px 20px" }}
>
@@ -63,7 +65,7 @@ export default function DataroomNotification({
© {new Date().getFullYear()}{" "}
<a
href="https://www.papermark.io"
- className="no-underline text-gray-400 hover:text-gray-400 visited:text-gray-400"
+ className="text-gray-400 no-underline visited:text-gray-400 hover:text-gray-400"
target="_blank"
>
papermark.io
diff --git a/components/emails/dataroom-viewer-invitation.tsx b/components/emails/dataroom-viewer-invitation.tsx
index c21bed97..58078aec 100644
--- a/components/emails/dataroom-viewer-invitation.tsx
+++ b/components/emails/dataroom-viewer-invitation.tsx
@@ -1,17 +1,19 @@
import React from "react";
+
import {
Body,
+ Button,
Container,
Head,
Heading,
+ Hr,
Html,
Preview,
- Text,
- Tailwind,
Section,
- Button,
- Hr,
+ Tailwind,
+ Text,
} from "@react-email/components";
+
export default function DataroomViewerInvitation({
dataroomName,
senderEmail,
@@ -26,12 +28,12 @@ export default function DataroomViewerInvitation({
<Head />
<Preview>View dataroom on Papermark</Preview>
<Tailwind>
- <Body className="bg-white my-auto mx-auto font-sans">
- <Container className="my-10 mx-auto p-5 w-[465px]">
- <Heading className="text-2xl font-normal text-center p-0 mt-4 mb-8 mx-0">
+ <Body className="mx-auto my-auto bg-white font-sans">
+ <Container className="mx-auto my-10 w-[465px] p-5">
+ <Heading className="mx-0 mb-8 mt-4 p-0 text-center text-2xl font-normal">
<span className="font-bold tracking-tighter">Papermark</span>
</Heading>
- <Heading className="text-xl font-seminbold text-center p-0 mt-4 mb-8 mx-0">
+ <Heading className="font-seminbold mx-0 mb-8 mt-4 p-0 text-center text-xl">
{`View ${dataroomName}`}
</Heading>
<Text className="text-sm leading-6 text-black">Hey!</Text>
@@ -43,9 +45,9 @@ export default function DataroomViewerInvitation({
The invitation was sent by{" "}
<span className="font-semibold">{senderEmail}</span>.
</Text>
- <Section className="text-center mt-[32px] mb-[32px]">
+ <Section className="mb-[32px] mt-[32px] text-center">
<Button
- className="bg-black rounded text-white text-xs font-semibold no-underline text-center"
+ className="rounded bg-black text-center text-xs font-semibold text-white no-underline"
href={`${url}`}
style={{ padding: "12px 20px" }}
>
@@ -63,7 +65,7 @@ export default function DataroomViewerInvitation({
© {new Date().getFullYear()}{" "}
<a
href="https://www.papermark.io"
- className="no-underline text-gray-400 hover:text-gray-400 visited:text-gray-400"
+ className="text-gray-400 no-underline visited:text-gray-400 hover:text-gray-400"
target="_blank"
>
papermark.io
diff --git a/components/emails/deleted-domain.tsx b/components/emails/deleted-domain.tsx
index 3a0125fa..3a1ca58b 100644
--- a/components/emails/deleted-domain.tsx
+++ b/components/emails/deleted-domain.tsx
@@ -1,16 +1,17 @@
import React from "react";
+
import {
Body,
Button,
Container,
Head,
Heading,
+ Hr,
Html,
Preview,
Section,
- Text,
Tailwind,
- Hr,
+ Text,
} from "@react-email/components";
export default function DomainDeleted({
@@ -23,12 +24,12 @@ export default function DomainDeleted({
<Head />
<Preview>Domain Deleted</Preview>
<Tailwind>
- <Body className="bg-white my-auto mx-auto font-sans">
- <Container className="my-10 mx-auto p-5 w-[465px]">
- <Heading className="text-2xl font-normal text-center p-0 mt-4 mb-8 mx-0">
+ <Body className="mx-auto my-auto bg-white font-sans">
+ <Container className="mx-auto my-10 w-[465px] p-5">
+ <Heading className="mx-0 mb-8 mt-4 p-0 text-center text-2xl font-normal">
<span className="font-bold tracking-tighter">Papermark</span>
</Heading>
- <Heading className="text-xl font-seminbold text-center p-0 mt-4 mb-8 mx-0">
+ <Heading className="font-seminbold mx-0 mb-8 mt-4 p-0 text-center text-xl">
Domain Deleted
</Heading>
<Text className="text-sm leading-6 text-black">
@@ -42,7 +43,7 @@ export default function DomainDeleted({
</Text>
<Section className="my-8 text-center">
<Button
- className="bg-black rounded text-white text-xs font-semibold no-underline text-center"
+ className="rounded bg-black text-center text-xs font-semibold text-white no-underline"
href={`https://www.papermark.io/settings/domains`}
style={{ padding: "12px 20px" }}
>
@@ -59,7 +60,7 @@ export default function DomainDeleted({
© {new Date().getFullYear()}{" "}
<a
href="https://www.papermark.io"
- className="no-underline text-gray-400 hover:text-gray-400 visited:text-gray-400"
+ className="text-gray-400 no-underline visited:text-gray-400 hover:text-gray-400"
target="_blank"
>
papermark.io
diff --git a/components/emails/email-verification.tsx b/components/emails/email-verification.tsx
index 1fdf4527..22d4c155 100644
--- a/components/emails/email-verification.tsx
+++ b/components/emails/email-verification.tsx
@@ -1,16 +1,17 @@
import React from "react";
+
import {
Body,
- Container,
Button,
+ Container,
Head,
Heading,
+ Hr,
Html,
Preview,
Section,
- Text,
Tailwind,
- Hr,
+ Text,
} from "@react-email/components";
export default function EmailVerification({
@@ -25,9 +26,9 @@ export default function EmailVerification({
<Head />
<Preview>Verify your email to view the document</Preview>
<Tailwind>
- <Body className="bg-white my-auto mx-auto font-sans">
- <Container className="my-10 mx-auto p-5 w-[465px]">
- <Heading className="text-2xl font-normal text-center p-0 mt-4 mb-8 mx-0">
+ <Body className="mx-auto my-auto bg-white font-sans">
+ <Container className="mx-auto my-10 w-[465px] p-5">
+ <Heading className="mx-0 mb-8 mt-4 p-0 text-center text-2xl font-normal">
<span className="font-bold tracking-tighter">Papermark</span>
</Heading>
<Heading className="mx-0 my-7 p-0 text-center text-xl font-semibold text-black">
@@ -38,7 +39,7 @@ export default function EmailVerification({
</Text>
<Section className="my-8 text-center">
<Button
- className="bg-black rounded text-white text-xs font-semibold no-underline text-center"
+ className="rounded bg-black text-center text-xs font-semibold text-white no-underline"
href={verificationURL}
style={{ padding: "12px 20px" }}
>
@@ -57,7 +58,7 @@ export default function EmailVerification({
© {new Date().getFullYear()}{" "}
<a
href="https://www.papermark.io"
- className="no-underline text-gray-400 hover:text-gray-400 visited:text-gray-400"
+ className="text-gray-400 no-underline visited:text-gray-400 hover:text-gray-400"
target="_blank"
>
papermark.io
diff --git a/components/emails/invalid-domain.tsx b/components/emails/invalid-domain.tsx
index dbc322be..9093cee2 100644
--- a/components/emails/invalid-domain.tsx
+++ b/components/emails/invalid-domain.tsx
@@ -1,17 +1,18 @@
import React from "react";
+
import {
Body,
Button,
Container,
Head,
Heading,
+ Hr,
Html,
+ Link,
Preview,
Section,
- Text,
Tailwind,
- Link,
- Hr,
+ Text,
} from "@react-email/components";
export default function InvalidDomain({
@@ -26,9 +27,9 @@ export default function InvalidDomain({
<Head />
<Preview>Invalid Domain Configuration</Preview>
<Tailwind>
- <Body className="bg-white my-auto mx-auto font-sans">
- <Container className="my-10 mx-auto p-5 w-[465px]">
- <Heading className="text-2xl font-normal text-center p-0 mt-4 mb-8 mx-0">
+ <Body className="mx-auto my-auto bg-white font-sans">
+ <Container className="mx-auto my-10 w-[465px] p-5">
+ <Heading className="mx-0 mb-8 mt-4 p-0 text-center text-2xl font-normal">
<span className="font-bold tracking-tighter">Papermark</span>
</Heading>
<Heading className="mx-0 my-7 p-0 text-center text-xl font-semibold text-black">
@@ -50,7 +51,7 @@ export default function InvalidDomain({
</Text>
<Section className="my-8 text-center">
<Button
- className="bg-black rounded text-white text-xs font-semibold no-underline text-center"
+ className="rounded bg-black text-center text-xs font-semibold text-white no-underline"
href={`https://www.papermark.io/settings/domains`}
style={{ padding: "12px 20px" }}
>
@@ -83,7 +84,7 @@ export default function InvalidDomain({
© {new Date().getFullYear()}{" "}
<a
href="https://www.papermark.io"
- className="no-underline text-gray-400 hover:text-gray-400 visited:text-gray-400"
+ className="text-gray-400 no-underline visited:text-gray-400 hover:text-gray-400"
target="_blank"
>
papermark.io
diff --git a/components/emails/team-invitation.tsx b/components/emails/team-invitation.tsx
index 5dabf9ae..6459638d 100644
--- a/components/emails/team-invitation.tsx
+++ b/components/emails/team-invitation.tsx
@@ -1,17 +1,19 @@
import React from "react";
+
import {
Body,
+ Button,
Container,
Head,
Heading,
+ Hr,
Html,
Preview,
- Text,
- Tailwind,
Section,
- Button,
- Hr,
+ Tailwind,
+ Text,
} from "@react-email/components";
+
export default function TeamInvitation({
senderName,
senderEmail,
@@ -28,12 +30,12 @@ export default function TeamInvitation({
<Head />
<Preview>Join the team on Papermark</Preview>
<Tailwind>
- <Body className="bg-white my-auto mx-auto font-sans">
- <Container className="my-10 mx-auto p-5 w-[465px]">
- <Heading className="text-2xl font-normal text-center p-0 mt-4 mb-8 mx-0">
+ <Body className="mx-auto my-auto bg-white font-sans">
+ <Container className="mx-auto my-10 w-[465px] p-5">
+ <Heading className="mx-0 mb-8 mt-4 p-0 text-center text-2xl font-normal">
<span className="font-bold tracking-tighter">Papermark</span>
</Heading>
- <Heading className="text-xl font-seminbold text-center p-0 mt-4 mb-8 mx-0">
+ <Heading className="font-seminbold mx-0 mb-8 mt-4 p-0 text-center text-xl">
{`Join ${teamName} on Papermark`}
</Heading>
<Text className="text-sm leading-6 text-black">Hey!</Text>
@@ -43,9 +45,9 @@ export default function TeamInvitation({
<span className="font-semibold">{teamName}</span> team on{" "}
<span className="font-semibold">Papermark</span>.
</Text>
- <Section className="text-center mt-[32px] mb-[32px]">
+ <Section className="mb-[32px] mt-[32px] text-center">
<Button
- className="bg-black rounded text-white text-xs font-semibold no-underline text-center"
+ className="rounded bg-black text-center text-xs font-semibold text-white no-underline"
href={`${url}`}
style={{ padding: "12px 20px" }}
>
@@ -63,7 +65,7 @@ export default function TeamInvitation({
© {new Date().getFullYear()}{" "}
<a
href="https://www.papermark.io"
- className="no-underline text-gray-400 hover:text-gray-400 visited:text-gray-400"
+ className="text-gray-400 no-underline visited:text-gray-400 hover:text-gray-400"
target="_blank"
>
papermark.io
diff --git a/components/emails/trial-end-final-reminder.tsx b/components/emails/trial-end-final-reminder.tsx
index 34ccbe58..2361b124 100644
--- a/components/emails/trial-end-final-reminder.tsx
+++ b/components/emails/trial-end-final-reminder.tsx
@@ -1,17 +1,18 @@
import React from "react";
+
import {
Body,
Button,
Container,
Head,
Heading,
+ Hr,
Html,
+ Link,
Preview,
Section,
- Text,
Tailwind,
- Link,
- Hr,
+ Text,
} from "@react-email/components";
interface TrialEndFinalReminderEmail {
@@ -26,12 +27,12 @@ const TrialEndFinalReminderEmail = ({ name }: TrialEndFinalReminderEmail) => {
<Head />
<Preview>{previewText}</Preview>
<Tailwind>
- <Body className="bg-white my-auto mx-auto font-sans">
- <Container className="my-10 mx-auto p-5 w-[465px]">
- <Heading className="text-2xl font-normal text-center p-0 mt-4 mb-8 mx-0">
+ <Body className="mx-auto my-auto bg-white font-sans">
+ <Container className="mx-auto my-10 w-[465px] p-5">
+ <Heading className="mx-0 mb-8 mt-4 p-0 text-center text-2xl font-normal">
<span className="font-bold tracking-tighter">Papermark</span>
</Heading>
- <Heading className="text-xl font-seminbold text-center p-0 mt-4 mb-8 mx-0">
+ <Heading className="font-seminbold mx-0 mb-8 mt-4 p-0 text-center text-xl">
Your pro trial expires in 24 hours
</Heading>
<Text className="text-sm leading-6 text-black">
@@ -57,9 +58,9 @@ const TrialEndFinalReminderEmail = ({ name }: TrialEndFinalReminderEmail) => {
<Text className="ml-1 text-sm leading-4 text-black">
◆ Upload <span className="font-bold">large</span> files
</Text>
- <Section className="text-center mt-[32px] mb-[32px]">
+ <Section className="mb-[32px] mt-[32px] text-center">
<Button
- className="bg-black rounded text-white text-xs font-semibold no-underline text-center"
+ className="rounded bg-black text-center text-xs font-semibold text-white no-underline"
href={`https://www.papermark.io/settings/billing`}
style={{ padding: "12px 20px" }}
>
@@ -77,7 +78,7 @@ const TrialEndFinalReminderEmail = ({ name }: TrialEndFinalReminderEmail) => {
© {new Date().getFullYear()}{" "}
<a
href="https://www.papermark.io"
- className="no-underline text-gray-400 hover:text-gray-400 visited:text-gray-400"
+ className="text-gray-400 no-underline visited:text-gray-400 hover:text-gray-400"
target="_blank"
>
papermark.io
diff --git a/components/emails/trial-end-reminder.tsx b/components/emails/trial-end-reminder.tsx
index 23e3a2e5..e673b378 100644
--- a/components/emails/trial-end-reminder.tsx
+++ b/components/emails/trial-end-reminder.tsx
@@ -1,17 +1,18 @@
import React from "react";
+
import {
Body,
Button,
Container,
Head,
Heading,
+ Hr,
Html,
+ Link,
Preview,
Section,
- Text,
Tailwind,
- Link,
- Hr,
+ Text,
} from "@react-email/components";
interface TrialEndReminderEmail {
@@ -26,12 +27,12 @@ const TrialEndReminderEmail = ({ name }: TrialEndReminderEmail) => {
<Head />
<Preview>{previewText}</Preview>
<Tailwind>
- <Body className="bg-white my-auto mx-auto font-sans">
- <Container className="my-10 mx-auto p-5 w-[465px]">
- <Heading className="text-2xl font-normal text-center p-0 mt-4 mb-8 mx-0">
+ <Body className="mx-auto my-auto bg-white font-sans">
+ <Container className="mx-auto my-10 w-[465px] p-5">
+ <Heading className="mx-0 mb-8 mt-4 p-0 text-center text-2xl font-normal">
<span className="font-bold tracking-tighter">Papermark</span>
</Heading>
- <Heading className="text-xl font-seminbold text-center p-0 mt-4 mb-8 mx-0">
+ <Heading className="font-seminbold mx-0 mb-8 mt-4 p-0 text-center text-xl">
Your pro trial is almost over
</Heading>
<Text className="text-sm leading-6 text-black">
@@ -56,9 +57,9 @@ const TrialEndReminderEmail = ({ name }: TrialEndReminderEmail) => {
<Text className="ml-1 text-sm leading-4 text-black">
◆ Large file uploads
</Text>
- <Section className="text-center mt-[32px] mb-[32px]">
+ <Section className="mb-[32px] mt-[32px] text-center">
<Button
- className="bg-black rounded text-white text-xs font-semibold no-underline text-center"
+ className="rounded bg-black text-center text-xs font-semibold text-white no-underline"
href={`https://www.papermark.io/settings/billing`}
style={{ padding: "12px 20px" }}
>
@@ -67,7 +68,7 @@ const TrialEndReminderEmail = ({ name }: TrialEndReminderEmail) => {
</Section>
<Text className="text-sm font-semibold">
<span className="text-red-500">⚠️</span> Links with custom domains
- will be <span className="underline text-red-500">disabled</span>{" "}
+ will be <span className="text-red-500 underline">disabled</span>{" "}
after your trial.
</Text>
<Text className="text-sm text-gray-400">Marc from Papermark</Text>
@@ -77,7 +78,7 @@ const TrialEndReminderEmail = ({ name }: TrialEndReminderEmail) => {
© {new Date().getFullYear()}{" "}
<a
href="https://www.papermark.io"
- className="no-underline text-gray-400 hover:text-gray-400 visited:text-gray-400"
+ className="text-gray-400 no-underline visited:text-gray-400 hover:text-gray-400"
target="_blank"
>
papermark.io
diff --git a/components/emails/upgrade-plan.tsx b/components/emails/upgrade-plan.tsx
index 30595413..7e57e2f5 100644
--- a/components/emails/upgrade-plan.tsx
+++ b/components/emails/upgrade-plan.tsx
@@ -1,17 +1,18 @@
import React from "react";
+
import {
Body,
Button,
Container,
Head,
Heading,
+ Hr,
Html,
+ Link,
Preview,
Section,
- Text,
Tailwind,
- Link,
- Hr,
+ Text,
} from "@react-email/components";
interface UpgradePlanEmailProps {
@@ -26,12 +27,12 @@ const UpgradePlanEmail = ({ name }: UpgradePlanEmailProps) => {
<Head />
<Preview>{previewText}</Preview>
<Tailwind>
- <Body className="bg-white my-auto mx-auto font-sans">
- <Container className="my-10 mx-auto p-5 w-[465px]">
- <Heading className="text-2xl font-normal text-center p-0 mt-4 mb-8 mx-0">
+ <Body className="mx-auto my-auto bg-white font-sans">
+ <Container className="mx-auto my-10 w-[465px] p-5">
+ <Heading className="mx-0 mb-8 mt-4 p-0 text-center text-2xl font-normal">
<span className="font-bold tracking-tighter">Papermark</span>
</Heading>
- <Heading className="text-xl font-seminbold text-center p-0 mt-4 mb-8 mx-0">
+ <Heading className="font-seminbold mx-0 mb-8 mt-4 p-0 text-center text-xl">
Thanks for for upgrading to Papermark Pro!
</Heading>
<Text className="text-sm leading-6 text-black">
@@ -69,9 +70,9 @@ const UpgradePlanEmail = ({ name }: UpgradePlanEmailProps) => {
<Text className="ml-1 text-sm leading-4 text-black">
◆ Invite your team members
</Text>
- <Section className="text-center mt-[32px] mb-[32px]">
+ <Section className="mb-[32px] mt-[32px] text-center">
<Button
- className="bg-black rounded text-white text-xs font-semibold no-underline text-center"
+ className="rounded bg-black text-center text-xs font-semibold text-white no-underline"
href={`${process.env.NEXT_PUBLIC_BASE_URL}/settings/domains`}
style={{ padding: "12px 20px" }}
>
@@ -91,7 +92,7 @@ const UpgradePlanEmail = ({ name }: UpgradePlanEmailProps) => {
© {new Date().getFullYear()}{" "}
<a
href="https://www.papermark.io"
- className="no-underline text-gray-400 hover:text-gray-400 visited:text-gray-400"
+ className="text-gray-400 no-underline visited:text-gray-400 hover:text-gray-400"
target="_blank"
>
papermark.io
diff --git a/components/emails/verification-link.tsx b/components/emails/verification-link.tsx
index c8445e00..8715ec25 100644
--- a/components/emails/verification-link.tsx
+++ b/components/emails/verification-link.tsx
@@ -1,4 +1,5 @@
import React from "react";
+
import {
Body,
Button,
@@ -8,8 +9,8 @@ import {
Html,
Preview,
Section,
- Text,
Tailwind,
+ Text,
} from "@react-email/components";
const VerificationLinkEmail = ({
@@ -24,7 +25,7 @@ const VerificationLinkEmail = ({
<Tailwind>
<Body className="mx-auto my-auto bg-white font-sans">
<Container className="mx-auto my-10 max-w-[500px] rounded border border-solid border-gray-200 px-10 py-5">
- <Heading className="text-2xl font-normal text-center p-0 mt-4 mb-8 mx-0">
+ <Heading className="mx-0 mb-8 mt-4 p-0 text-center text-2xl font-normal">
<span className="font-bold tracking-tighter">Papermark</span>
</Heading>
<Heading className="mx-0 my-7 p-0 text-center text-xl font-semibold text-black">
@@ -39,7 +40,7 @@ const VerificationLinkEmail = ({
</Text>
<Section className="my-8 text-center">
<Button
- className="bg-black rounded text-white text-xs font-semibold no-underline text-center"
+ className="rounded bg-black text-center text-xs font-semibold text-white no-underline"
href={url}
style={{ padding: "12px 20px" }}
>
diff --git a/components/emails/viewed-document.tsx b/components/emails/viewed-document.tsx
index 45958f86..bb9db261 100644
--- a/components/emails/viewed-document.tsx
+++ b/components/emails/viewed-document.tsx
@@ -1,16 +1,17 @@
import React from "react";
+
import {
Body,
Button,
Container,
Head,
Heading,
+ Hr,
Html,
Preview,
Section,
- Text,
Tailwind,
- Hr,
+ Text,
} from "@react-email/components";
export default function ViewedDocument({
@@ -27,9 +28,9 @@ export default function ViewedDocument({
<Head />
<Preview>See who visited your document</Preview>
<Tailwind>
- <Body className="bg-white my-auto mx-auto font-sans">
- <Container className="my-10 mx-auto p-5 w-[465px]">
- <Heading className="text-2xl font-normal text-center p-0 mt-4 mb-8 mx-0">
+ <Body className="mx-auto my-auto bg-white font-sans">
+ <Container className="mx-auto my-10 w-[465px] p-5">
+ <Heading className="mx-0 mb-8 mt-4 p-0 text-center text-2xl font-normal">
<span className="font-bold tracking-tighter">Papermark</span>
</Heading>
<Heading className="mx-0 my-7 p-0 text-center text-xl font-semibold text-black">
@@ -50,7 +51,7 @@ export default function ViewedDocument({
</Text>
<Section className="my-8 text-center">
<Button
- className="bg-black rounded text-white text-xs font-semibold no-underline text-center"
+ className="rounded bg-black text-center text-xs font-semibold text-white no-underline"
href={`https://www.papermark.io/documents/${documentId}`}
style={{ padding: "12px 20px" }}
>
@@ -66,7 +67,7 @@ export default function ViewedDocument({
© {new Date().getFullYear()}{" "}
<a
href="https://www.papermark.io"
- className="no-underline text-gray-400 hover:text-gray-400 visited:text-gray-400"
+ className="text-gray-400 no-underline visited:text-gray-400 hover:text-gray-400"
target="_blank"
>
papermark.io
diff --git a/components/emails/welcome.tsx b/components/emails/welcome.tsx
index 08f52575..7951ed83 100644
--- a/components/emails/welcome.tsx
+++ b/components/emails/welcome.tsx
@@ -1,17 +1,18 @@
import React from "react";
+
import {
Body,
Button,
Container,
Head,
Heading,
+ Hr,
Html,
+ Link,
Preview,
Section,
- Text,
Tailwind,
- Link,
- Hr,
+ Text,
} from "@react-email/components";
interface WelcomeEmailProps {
@@ -26,9 +27,9 @@ const WelcomeEmail = ({ name }: WelcomeEmailProps) => {
<Head />
<Preview>{previewText}</Preview>
<Tailwind>
- <Body className="bg-white my-auto mx-auto font-sans">
- <Container className="my-10 mx-auto p-5 w-[465px]">
- <Heading className="text-2xl font-normal text-center p-0 mt-4 mb-8 mx-0">
+ <Body className="mx-auto my-auto bg-white font-sans">
+ <Container className="mx-auto my-10 w-[465px] p-5">
+ <Heading className="mx-0 mb-8 mt-4 p-0 text-center text-2xl font-normal">
Welcome to{" "}
<span className="font-bold tracking-tighter">Papermark</span>
</Heading>
@@ -44,7 +45,7 @@ const WelcomeEmail = ({ name }: WelcomeEmailProps) => {
Here are a few things you can do to get started:
</Text>
<Text className="text-sm">
- <ul className="list-disc list-inside text-sm">
+ <ul className="list-inside list-disc text-sm">
<li>Upload a document</li>
<li>
Share a link{" "}
@@ -53,9 +54,9 @@ const WelcomeEmail = ({ name }: WelcomeEmailProps) => {
<li>Watch the views come in real-time</li>
</ul>
</Text>
- <Section className="text-center mt-[32px] mb-[32px]">
+ <Section className="mb-[32px] mt-[32px] text-center">
<Button
- className="bg-black rounded text-white text-xs font-semibold no-underline text-center"
+ className="rounded bg-black text-center text-xs font-semibold text-white no-underline"
href={`${process.env.NEXT_PUBLIC_BASE_URL}/welcome`}
style={{ padding: "12px 20px" }}
>
@@ -67,7 +68,7 @@ const WelcomeEmail = ({ name }: WelcomeEmailProps) => {
If you would like to keep up to date, you can do:
</Text>
<Text className="text-sm">
- <ul className="list-disc list-inside text-sm">
+ <ul className="list-inside list-disc text-sm">
<li>
Star the repo on{" "}
<Link
@@ -99,7 +100,7 @@ const WelcomeEmail = ({ name }: WelcomeEmailProps) => {
© {new Date().getFullYear()}{" "}
<a
href="https://www.papermark.io"
- className="no-underline text-gray-400 hover:text-gray-400 visited:text-gray-400"
+ className="text-gray-400 no-underline visited:text-gray-400 hover:text-gray-400"
target="_blank"
>
papermark.io
diff --git a/components/folders/add-folder-modal.tsx b/components/folders/add-folder-modal.tsx
index 8f1800a8..ab72c144 100644
--- a/components/folders/add-folder-modal.tsx
+++ b/components/folders/add-folder-modal.tsx
@@ -1,3 +1,12 @@
+import { useRouter } from "next/router";
+
+import { useState } from "react";
+
+import { useTeam } from "@/context/team-context";
+import { Folder } from "@prisma/client";
+import { toast } from "sonner";
+import { mutate } from "swr";
+
import { Button } from "@/components/ui/button";
import {
Dialog,
@@ -10,15 +19,11 @@ import {
} from "@/components/ui/dialog";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
-import { useTeam } from "@/context/team-context";
-import { useState } from "react";
-import { toast } from "sonner";
-import { UpgradePlanModal } from "../billing/upgrade-plan-modal";
-import { usePlan } from "@/lib/swr/use-billing";
+
import { useAnalytics } from "@/lib/analytics";
-import { mutate } from "swr";
-import { Folder } from "@prisma/client";
-import { useRouter } from "next/router";
+import { usePlan } from "@/lib/swr/use-billing";
+
+import { UpgradePlanModal } from "../billing/upgrade-plan-modal";
export function AddFolderModal({
// open,
@@ -127,11 +132,11 @@ export function AddFolderModal({
<Input
id="folder-name"
placeholder="folder-123"
- className="w-full mt-1 mb-4"
+ className="mb-4 mt-1 w-full"
onChange={(e) => setFolderName(e.target.value)}
/>
<DialogFooter>
- <Button type="submit" className="w-full h-9">
+ <Button type="submit" className="h-9 w-full">
Add new folder
</Button>
</DialogFooter>
diff --git a/components/folders/edit-folder-modal.tsx b/components/folders/edit-folder-modal.tsx
index 44cd3f6e..8240fbc4 100644
--- a/components/folders/edit-folder-modal.tsx
+++ b/components/folders/edit-folder-modal.tsx
@@ -1,3 +1,12 @@
+import { useRouter } from "next/router";
+
+import { useState } from "react";
+
+import { useTeam } from "@/context/team-context";
+import { Folder } from "@prisma/client";
+import { toast } from "sonner";
+import { mutate } from "swr";
+
import { Button } from "@/components/ui/button";
import {
Dialog,
@@ -10,15 +19,11 @@ import {
} from "@/components/ui/dialog";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
-import { useTeam } from "@/context/team-context";
-import { useState } from "react";
-import { toast } from "sonner";
-import { UpgradePlanModal } from "../billing/upgrade-plan-modal";
-import { usePlan } from "@/lib/swr/use-billing";
+
import { useAnalytics } from "@/lib/analytics";
-import { mutate } from "swr";
-import { Folder } from "@prisma/client";
-import { useRouter } from "next/router";
+import { usePlan } from "@/lib/swr/use-billing";
+
+import { UpgradePlanModal } from "../billing/upgrade-plan-modal";
export function EditFolderModal({
open,
@@ -113,11 +118,11 @@ export function EditFolderModal({
id="folder-name-update"
value={folderName}
placeholder="folder-123"
- className="w-full mt-1 mb-4"
+ className="mb-4 mt-1 w-full"
onChange={(e) => setFolderName(e.target.value)}
/>
<DialogFooter>
- <Button type="submit" className="w-full h-9" loading={loading}>
+ <Button type="submit" className="h-9 w-full" loading={loading}>
Update folder
</Button>
</DialogFooter>
diff --git a/components/investors/search.tsx b/components/investors/search.tsx
index 39116c92..4ef738f2 100644
--- a/components/investors/search.tsx
+++ b/components/investors/search.tsx
@@ -1,4 +1,5 @@
import { Dispatch, SetStateAction } from "react";
+
import SearchIcon from "@/components/shared/icons/search";
export default function SearchBar({
@@ -11,7 +12,7 @@ export default function SearchBar({
return (
<div className="relative mt-5">
<SearchIcon
- className="h-5 w-5 absolute z-20 left-3 bottom-2"
+ className="absolute bottom-2 left-3 z-20 h-5 w-5"
aria-hidden="true"
/>
<input
@@ -20,7 +21,7 @@ export default function SearchBar({
name="search"
value={search}
onChange={(e) => setSearch(e.target.value)}
- className="w-full rounded-xl shadow-sm inline-flex relative items-center border border-gray-300 px-4 py-2 text-sm text-gray-700 placeholder:text-gray-400 focus:z-10 focus:outline-none focus:ring-gray-500 md:w-72 pl-10 xs:pl-12"
+ className="xs:pl-12 relative inline-flex w-full items-center rounded-xl border border-gray-300 px-4 py-2 pl-10 text-sm text-gray-700 shadow-sm placeholder:text-gray-400 focus:z-10 focus:outline-none focus:ring-gray-500 md:w-72"
placeholder="Search by name"
/>
</div>
diff --git a/components/investors/stats.tsx b/components/investors/stats.tsx
index 1ff11cfd..41c85c2f 100644
--- a/components/investors/stats.tsx
+++ b/components/investors/stats.tsx
@@ -12,7 +12,7 @@ export default function Stats({ angelsLength }: { angelsLength: any }) {
{angelsLength}
</dd>
</div>
- <div className="flex flex-col border-t border-b border-gray-100 p-6 text-center sm:border-0 sm:border-l sm:border-r">
+ <div className="flex flex-col border-b border-t border-gray-100 p-6 text-center sm:border-0 sm:border-l sm:border-r">
<dt className="order-2 mt-2 text-lg font-medium leading-6 text-gray-500">
Average Check Size
</dt>
@@ -20,7 +20,7 @@ export default function Stats({ angelsLength }: { angelsLength: any }) {
$45k
</dd>
</div>
- <div className="flex flex-col border-t border-b border-gray-100 p-6 text-center sm:border-0 sm:border-l sm:border-r">
+ <div className="flex flex-col border-b border-t border-gray-100 p-6 text-center sm:border-0 sm:border-l sm:border-r">
<dt className="order-2 mt-2 text-lg font-medium leading-6 text-gray-500">
Confirmed Investments
</dt>
diff --git a/components/investors/table.tsx b/components/investors/table.tsx
index f3af48ca..390506d6 100644
--- a/components/investors/table.tsx
+++ b/components/investors/table.tsx
@@ -1,15 +1,17 @@
import Image from "next/image";
-import TwitterIcon from "@/components/shared/icons/twitter";
-import WebsiteIcon from "@/components/shared/icons/globe";
-import { cn } from "@/lib/utils";
+
import { type Investor } from "@/app/(static)/open-source-investors/page";
+import WebsiteIcon from "@/components/shared/icons/globe";
+import TwitterIcon from "@/components/shared/icons/twitter";
+
+import { cn } from "@/lib/utils";
export default function Table({ investors }: { investors: Investor[] }) {
return (
<div>
- <table className="min-w-full md:divide-y bg-gray-100 md:bg-transparent divide-gray-300 rounded-lg overflow-hidden md:rounded-none">
- <thead className="bg-gray-50 hidden md:table-header-group">
+ <table className="min-w-full divide-gray-300 overflow-hidden rounded-lg bg-gray-100 md:divide-y md:rounded-none md:bg-transparent">
+ <thead className="hidden bg-gray-50 md:table-header-group">
<tr>
<th
scope="col"
@@ -43,13 +45,13 @@ export default function Table({ investors }: { investors: Investor[] }) {
</th>
</tr>
</thead>
- <tbody className="md:divide-y divide-gray-200 md:bg-white grid grid-cols-1 gap-3 sm:grid-cols-2 md:table-row-group">
+ <tbody className="grid grid-cols-1 gap-3 divide-gray-200 sm:grid-cols-2 md:table-row-group md:divide-y md:bg-white">
{investors.map((person: Investor) => (
<tr
key={person.id}
- className="grid grid-cols-3 gap-1 md:table-row bg-white rounded-lg md:rounded-none md:bg-transparent shadow md:shadow-none border border-gray-200 md:border-x-0 py-3 px-2 md:p-0"
+ className="grid grid-cols-3 gap-1 rounded-lg border border-gray-200 bg-white px-2 py-3 shadow md:table-row md:rounded-none md:border-x-0 md:bg-transparent md:p-0 md:shadow-none"
>
- <td className="col-span-3 whitespace-nowrap pl-3 md:py-2 md:pl-6 text-sm sm:pl-6 h-24">
+ <td className="col-span-3 h-24 whitespace-nowrap pl-3 text-sm sm:pl-6 md:py-2 md:pl-6">
<div className="flex items-center">
<div className="h-10 w-10 flex-shrink-0">
<Image
@@ -64,7 +66,7 @@ export default function Table({ investors }: { investors: Investor[] }) {
<div className="font-medium text-gray-900">
{person.fields.name}
</div>
- <div className="flex space-x-2 items-center mt-1">
+ <div className="mt-1 flex items-center space-x-2">
{person.fields.twitterUrl && (
<a
className="text-black"
@@ -73,7 +75,7 @@ export default function Table({ investors }: { investors: Investor[] }) {
rel="noopener noreferrer"
>
<span className="sr-only">Twitter</span>
- <TwitterIcon className="w-4 h-4" />
+ <TwitterIcon className="h-4 w-4" />
</a>
)}
{person.fields.websiteUrl && (
@@ -84,20 +86,20 @@ export default function Table({ investors }: { investors: Investor[] }) {
rel="noopener noreferrer"
>
<span className="sr-only">Website</span>
- <WebsiteIcon className="w-4 h-4" />
+ <WebsiteIcon className="h-4 w-4" />
</a>
)}
</div>
</div>
</div>
</td>
- <td className="col-span-1 row-start-2 whitespace-nowrap px-3 md:px-2 md:py-3 text-sm text-gray-500 font-bold md:font-normal">
+ <td className="col-span-1 row-start-2 whitespace-nowrap px-3 text-sm font-bold text-gray-500 md:px-2 md:py-3 md:font-normal">
{person.fields.company ?? "Unknown"}
</td>
- <td className="col-span-3 whitespace-nowrap px-3 md:px-2 md:py-3 text-sm text-gray-500 -mt-2 md:mt-0">
+ <td className="col-span-3 -mt-2 whitespace-nowrap px-3 text-sm text-gray-500 md:mt-0 md:px-2 md:py-3">
{person.fields.title ?? "Software Engineer"}
</td>
- <td className="col-span-3 row-start-2 whitespace-nowrap px-0 md:px-2 md:py-3 text-sm text-gray-500 justify-self-end">
+ <td className="col-span-3 row-start-2 justify-self-end whitespace-nowrap px-0 text-sm text-gray-500 md:px-2 md:py-3">
<span
className={cn(
person.fields.checkSize === "Unknown"
@@ -117,7 +119,7 @@ export default function Table({ investors }: { investors: Investor[] }) {
{person.fields.checkSize}
</span>
</td>
- <td className="col-span-3 md:max-w-xs px-3 md:px-2 md:py-3 text-sm text-gray-500">
+ <td className="col-span-3 px-3 text-sm text-gray-500 md:max-w-xs md:px-2 md:py-3">
{person.fields.openSourceInvestments ?? "Unknown"}
</td>
</tr>
@@ -125,7 +127,7 @@ export default function Table({ investors }: { investors: Investor[] }) {
</tbody>
</table>
{investors.length === 0 && (
- <div className="text-center my-10">No results found</div>
+ <div className="my-10 text-center">No results found</div>
)}
</div>
);
diff --git a/components/layouts/app.tsx b/components/layouts/app.tsx
index c7b506ca..eaf2c277 100644
--- a/components/layouts/app.tsx
+++ b/components/layouts/app.tsx
@@ -3,9 +3,9 @@ import Sidebar from "../Sidebar";
export default function AppLayout({ children }: { children: React.ReactNode }) {
return (
<div>
- <div className="flex flex-col lg:flex-row bg-gray-50 dark:bg-black min-h-screen">
+ <div className="flex min-h-screen flex-col bg-gray-50 dark:bg-black lg:flex-row">
<Sidebar />
- <main className="grow w-full overflow-y-auto bg-white dark:bg-gray-900 ring-gray-200 dark:ring-gray-800 dark:border-none lg:m-2 rounded-xl ring-1">
+ <main className="w-full grow overflow-y-auto rounded-xl bg-white ring-1 ring-gray-200 dark:border-none dark:bg-gray-900 dark:ring-gray-800 lg:m-2">
{children}
</main>
</div>
diff --git a/components/links/link-sheet/allow-download-section.tsx b/components/links/link-sheet/allow-download-section.tsx
index 2d38dd51..cf65af55 100644
--- a/components/links/link-sheet/allow-download-section.tsx
+++ b/components/links/link-sheet/allow-download-section.tsx
@@ -1,6 +1,9 @@
-import { Dispatch, SetStateAction, useState, useEffect } from "react";
+import { Dispatch, SetStateAction, useEffect, useState } from "react";
+
import { Switch } from "@/components/ui/switch";
+
import { cn } from "@/lib/utils";
+
import { DEFAULT_LINK_TYPE } from ".";
export default function AllowDownloadSection({
diff --git a/components/links/link-sheet/allow-list-section.tsx b/components/links/link-sheet/allow-list-section.tsx
index fe992959..c8efad58 100644
--- a/components/links/link-sheet/allow-list-section.tsx
+++ b/components/links/link-sheet/allow-list-section.tsx
@@ -1,14 +1,18 @@
import {
+ ChangeEvent,
Dispatch,
SetStateAction,
- useState,
useEffect,
- ChangeEvent,
+ useState,
} from "react";
-import { Switch } from "@/components/ui/switch";
+
import { motion } from "framer-motion";
+
+import { Switch } from "@/components/ui/switch";
+
import { FADE_IN_ANIMATION_SETTINGS } from "@/lib/constants";
import { cn, sanitizeAllowDenyList } from "@/lib/utils";
+
import { DEFAULT_LINK_TYPE } from ".";
export default function AllowListSection({
@@ -87,7 +91,7 @@ export default function AllowListSection({
>
Allow specified viewers
{hasFreePlan && (
- <span className="bg-background text-foreground ring-1 ring-gray-800 dark:ring-gray-500 rounded-full px-2 py-0.5 text-xs ml-2">
+ <span className="ml-2 rounded-full bg-background px-2 py-0.5 text-xs text-foreground ring-1 ring-gray-800 dark:ring-gray-500">
Pro
</span>
)}
@@ -113,7 +117,7 @@ export default function AllowListSection({
{...FADE_IN_ANIMATION_SETTINGS}
>
<textarea
- className="form-textarea w-full rounded-md border-0 py-1.5 text-foreground bg-background shadow-sm ring-1 ring-inset ring-input placeholder:text-muted-foreground focus:ring-2 focus:ring-inset focus:ring-gray-400 text-sm leading-6"
+ className="form-textarea w-full rounded-md border-0 bg-background py-1.5 text-sm leading-6 text-foreground shadow-sm ring-1 ring-inset ring-input placeholder:text-muted-foreground focus:ring-2 focus:ring-inset focus:ring-gray-400"
rows={5}
placeholder="Enter allowed emails/domains, one per line, e.g. [email protected] @example.org"
value={allowListInput}
diff --git a/components/links/link-sheet/allow-notification-section.tsx b/components/links/link-sheet/allow-notification-section.tsx
index 0b254181..d24e2a40 100644
--- a/components/links/link-sheet/allow-notification-section.tsx
+++ b/components/links/link-sheet/allow-notification-section.tsx
@@ -1,6 +1,9 @@
-import { Dispatch, SetStateAction, useState, useEffect } from "react";
+import { Dispatch, SetStateAction, useEffect, useState } from "react";
+
import { Switch } from "@/components/ui/switch";
+
import { cn } from "@/lib/utils";
+
import { DEFAULT_LINK_TYPE } from ".";
export default function AllowNotificationSection({
diff --git a/components/links/link-sheet/deny-list-section.tsx b/components/links/link-sheet/deny-list-section.tsx
index 480e417c..39f8c684 100644
--- a/components/links/link-sheet/deny-list-section.tsx
+++ b/components/links/link-sheet/deny-list-section.tsx
@@ -1,14 +1,18 @@
import {
+ ChangeEvent,
Dispatch,
SetStateAction,
- useState,
useEffect,
- ChangeEvent,
+ useState,
} from "react";
-import { Switch } from "@/components/ui/switch";
+
import { motion } from "framer-motion";
+
+import { Switch } from "@/components/ui/switch";
+
import { FADE_IN_ANIMATION_SETTINGS } from "@/lib/constants";
import { cn, sanitizeAllowDenyList } from "@/lib/utils";
+
import { DEFAULT_LINK_TYPE } from ".";
export default function DenyListSection({
@@ -86,7 +90,7 @@ export default function DenyListSection({
>
Block specified viewers
{hasFreePlan && (
- <span className="bg-background text-foreground ring-1 ring-gray-800 dark:ring-gray-500 rounded-full px-2 py-0.5 text-xs ml-2">
+ <span className="ml-2 rounded-full bg-background px-2 py-0.5 text-xs text-foreground ring-1 ring-gray-800 dark:ring-gray-500">
Pro
</span>
)}
@@ -112,7 +116,7 @@ export default function DenyListSection({
{...FADE_IN_ANIMATION_SETTINGS}
>
<textarea
- className="form-textarea w-full rounded-md border-0 py-1.5 text-foreground bg-background shadow-sm ring-1 ring-inset ring-input placeholder:text-muted-foreground focus:ring-2 focus:ring-inset focus:ring-gray-400 text-sm leading-6"
+ className="form-textarea w-full rounded-md border-0 bg-background py-1.5 text-sm leading-6 text-foreground shadow-sm ring-1 ring-inset ring-input placeholder:text-muted-foreground focus:ring-2 focus:ring-inset focus:ring-gray-400"
rows={5}
placeholder="Enter blocked emails/domains, one per line, e.g. [email protected] @example.org"
value={denyListInput}
diff --git a/components/links/link-sheet/domain-section.tsx b/components/links/link-sheet/domain-section.tsx
index 2623625b..9592e34c 100644
--- a/components/links/link-sheet/domain-section.tsx
+++ b/components/links/link-sheet/domain-section.tsx
@@ -1,17 +1,20 @@
+import Link from "next/link";
+
import { Dispatch, SetStateAction, useState } from "react";
-import { cn } from "@/lib/utils";
-import { DEFAULT_LINK_TYPE } from ".";
-import { Label } from "@/components/ui/label";
+
+import { useTeam } from "@/context/team-context";
import { Domain } from "@prisma/client";
-import { AddDomainModal } from "@/components/domains/add-domain-modal";
import { mutate } from "swr";
-import Link from "next/link";
-import { useTeam } from "@/context/team-context";
-import { BLOCKED_PATHNAMES } from "@/lib/constants";
-import { BasePlan } from "@/lib/swr/use-billing";
+import { AddDomainModal } from "@/components/domains/add-domain-modal";
+import { Label } from "@/components/ui/label";
+import { BLOCKED_PATHNAMES } from "@/lib/constants";
+import { BasePlan } from "@/lib/swr/use-billing";
import useLimits from "@/lib/swr/use-limits";
+import { cn } from "@/lib/utils";
+
+import { DEFAULT_LINK_TYPE } from ".";
export default function DomainSection({
data,
@@ -62,7 +65,7 @@ export default function DomainSection({
"w-full rounded-l-md border border-r-0 border-border bg-secondary px-5 text-sm text-secondary-foreground focus:border-border focus:outline-none focus:ring-0",
data.domain && data.domain !== "papermark.io"
? ""
- : "rounded-r-md border-r-1",
+ : "border-r-1 rounded-r-md",
)}
>
<option key="papermark.io" value="papermark.io">
@@ -123,7 +126,7 @@ export default function DomainSection({
}}
autoComplete="off"
className={cn(
- "hidden w-full rounded-r-md border-0 py-1.5 text-foreground bg-background shadow-sm ring-1 ring-inset ring-input placeholder:text-muted-foreground focus:ring-2 focus:ring-inset focus:ring-gray-400 sm:text-sm sm:leading-6",
+ "hidden w-full rounded-r-md border-0 bg-background py-1.5 text-foreground shadow-sm ring-1 ring-inset ring-input placeholder:text-muted-foreground focus:ring-2 focus:ring-inset focus:ring-gray-400 sm:text-sm sm:leading-6",
data.domain && data.domain !== "papermark.io" ? "flex" : "",
)}
placeholder="deck"
@@ -146,7 +149,7 @@ export default function DomainSection({
</div>
{data.domain && data.domain !== "papermark.io" && !isDomainVerified ? (
- <div className="text-sm text-red-500 mt-4">
+ <div className="mt-4 text-sm text-red-500">
Your domain is not verified yet!{" "}
<Link
className="underline hover:text-red-500/80"
diff --git a/components/links/link-sheet/email-authentication-section.tsx b/components/links/link-sheet/email-authentication-section.tsx
index 5b5d6273..392146dd 100644
--- a/components/links/link-sheet/email-authentication-section.tsx
+++ b/components/links/link-sheet/email-authentication-section.tsx
@@ -1,6 +1,9 @@
-import { Dispatch, SetStateAction, useState, useEffect } from "react";
+import { Dispatch, SetStateAction, useEffect, useState } from "react";
+
import { Switch } from "@/components/ui/switch";
+
import { cn } from "@/lib/utils";
+
import { DEFAULT_LINK_TYPE } from ".";
export default function EmailAuthenticationSection({
@@ -55,7 +58,7 @@ export default function EmailAuthenticationSection({
>
Require email verification
{hasFreePlan && (
- <span className="bg-background text-foreground ring-1 ring-gray-800 dark:ring-gray-500 rounded-full px-2 py-0.5 text-xs ml-2">
+ <span className="ml-2 rounded-full bg-background px-2 py-0.5 text-xs text-foreground ring-1 ring-gray-800 dark:ring-gray-500">
Pro
</span>
)}
diff --git a/components/links/link-sheet/email-protection-section.tsx b/components/links/link-sheet/email-protection-section.tsx
index f6f34eba..db9c8447 100644
--- a/components/links/link-sheet/email-protection-section.tsx
+++ b/components/links/link-sheet/email-protection-section.tsx
@@ -1,6 +1,9 @@
-import { Dispatch, SetStateAction, useState, useEffect } from "react";
+import { Dispatch, SetStateAction, useEffect, useState } from "react";
+
import { Switch } from "@/components/ui/switch";
+
import { cn } from "@/lib/utils";
+
import { DEFAULT_LINK_TYPE } from ".";
export default function EmailProtectionSection({
diff --git a/components/links/link-sheet/expiration-section.tsx b/components/links/link-sheet/expiration-section.tsx
index ebea8d32..4043ea1b 100644
--- a/components/links/link-sheet/expiration-section.tsx
+++ b/components/links/link-sheet/expiration-section.tsx
@@ -1,8 +1,12 @@
-import { Dispatch, SetStateAction, useState, useEffect } from "react";
-import { Switch } from "@/components/ui/switch";
+import { Dispatch, SetStateAction, useEffect, useState } from "react";
+
import { motion } from "framer-motion";
+
+import { Switch } from "@/components/ui/switch";
+
import { FADE_IN_ANIMATION_SETTINGS } from "@/lib/constants";
import { cn, getDateTimeLocal } from "@/lib/utils";
+
import { DEFAULT_LINK_TYPE } from ".";
export default function ExpirationSection({
@@ -54,7 +58,7 @@ export default function ExpirationSection({
onChange={(e) => {
setData({ ...data, expiresAt: new Date(e.target.value) });
}}
- className="flex w-full rounded-md border-0 py-1.5 text-foreground bg-background shadow-sm ring-1 ring-inset ring-input placeholder:text-muted-foreground focus:ring-2 focus:ring-inset focus:ring-gray-400 sm:text-sm sm:leading-6"
+ className="flex w-full rounded-md border-0 bg-background py-1.5 text-foreground shadow-sm ring-1 ring-inset ring-input placeholder:text-muted-foreground focus:ring-2 focus:ring-inset focus:ring-gray-400 sm:text-sm sm:leading-6"
/>
</motion.div>
)}
diff --git a/components/links/link-sheet/feedback-section.tsx b/components/links/link-sheet/feedback-section.tsx
index e0874093..f8d390e6 100644
--- a/components/links/link-sheet/feedback-section.tsx
+++ b/components/links/link-sheet/feedback-section.tsx
@@ -1,6 +1,9 @@
-import { Dispatch, SetStateAction, useState, useEffect } from "react";
+import { Dispatch, SetStateAction, useEffect, useState } from "react";
+
import { Switch } from "@/components/ui/switch";
+
import { cn } from "@/lib/utils";
+
import { DEFAULT_LINK_TYPE } from ".";
export default function FeedbackSection({
diff --git a/components/links/link-sheet/index.tsx b/components/links/link-sheet/index.tsx
index 668edfe9..d3ef18ae 100644
--- a/components/links/link-sheet/index.tsx
+++ b/components/links/link-sheet/index.tsx
@@ -1,3 +1,15 @@
+import { useRouter } from "next/router";
+
+import { Dispatch, SetStateAction, useEffect, useState } from "react";
+
+import { useTeam } from "@/context/team-context";
+import { toast } from "sonner";
+import { mutate } from "swr";
+
+import { Button } from "@/components/ui/button";
+import { Label } from "@/components/ui/label";
+import { ScrollArea } from "@/components/ui/scroll-area";
+import { Separator } from "@/components/ui/separator";
import {
Sheet,
SheetContent,
@@ -6,23 +18,16 @@ import {
SheetHeader,
SheetTitle,
} from "@/components/ui/sheet";
-import { Separator } from "@/components/ui/separator";
-import { Dispatch, SetStateAction, useEffect, useState } from "react";
-import { useRouter } from "next/router";
+
+import { useAnalytics } from "@/lib/analytics";
+import { usePlan } from "@/lib/swr/use-billing";
import { useDocumentLinks } from "@/lib/swr/use-document";
import { useDomains } from "@/lib/swr/use-domains";
-import { mutate } from "swr";
-import { Button } from "@/components/ui/button";
-import { toast } from "sonner";
-import { Label } from "@/components/ui/label";
+import { LinkWithViews } from "@/lib/types";
import { convertDataUrlToFile, uploadImage } from "@/lib/utils";
+
import DomainSection from "./domain-section";
-import { useTeam } from "@/context/team-context";
-import { ScrollArea } from "@/components/ui/scroll-area";
import { LinkOptions } from "./link-options";
-import { useAnalytics } from "@/lib/analytics";
-import { LinkWithViews } from "@/lib/types";
-import { usePlan } from "@/lib/swr/use-billing";
export const DEFAULT_LINK_PROPS = {
id: null,
@@ -191,7 +196,7 @@ export default function LinkSheet({
return (
<Sheet open={isOpen} onOpenChange={(open: boolean) => setIsOpen(open)}>
- <SheetContent className="bg-background text-foreground flex flex-col justify-between px-4 md:px-5 w-[90%] sm:w-[450px]">
+ <SheetContent className="flex w-[90%] flex-col justify-between bg-background px-4 text-foreground sm:w-[450px] md:px-5">
<SheetHeader className="text-start">
<SheetTitle>
{currentLink ? "Edit link" : "Create a new link"}
@@ -202,7 +207,7 @@ export default function LinkSheet({
</SheetDescription>
</SheetHeader>
- <form className="flex flex-col grow" onSubmit={handleSubmit}>
+ <form className="flex grow flex-col" onSubmit={handleSubmit}>
<ScrollArea className="flex-grow">
<div className="h-0 flex-1">
<div className="flex flex-1 flex-col justify-between">
@@ -217,7 +222,7 @@ export default function LinkSheet({
id="link-name"
placeholder="Recipient's Organization"
value={data.name || ""}
- className="flex w-full rounded-md border-0 py-1.5 text-foreground bg-background shadow-sm ring-1 ring-inset ring-input placeholder:text-muted-foreground focus:ring-2 focus:ring-inset focus:ring-gray-400 sm:text-sm sm:leading-6"
+ className="flex w-full rounded-md border-0 bg-background py-1.5 text-foreground shadow-sm ring-1 ring-inset ring-input placeholder:text-muted-foreground focus:ring-2 focus:ring-inset focus:ring-gray-400 sm:text-sm sm:leading-6"
onChange={(e) =>
setData({ ...data, name: e.target.value })
}
@@ -233,10 +238,10 @@ export default function LinkSheet({
/>
</div>
- <div className="flex items-center relative">
- <Separator className="bg-muted-foreground absolute" />
+ <div className="relative flex items-center">
+ <Separator className="absolute bg-muted-foreground" />
<div className="relative mx-auto">
- <span className="px-2 bg-background text-muted-foreground text-sm">
+ <span className="bg-background px-2 text-sm text-muted-foreground">
Link Options
</span>
</div>
diff --git a/components/links/link-sheet/link-options.tsx b/components/links/link-sheet/link-options.tsx
index 3f29c87d..5ba0ce29 100644
--- a/components/links/link-sheet/link-options.tsx
+++ b/components/links/link-sheet/link-options.tsx
@@ -1,24 +1,26 @@
import { Dispatch, SetStateAction, useState } from "react";
-import { DEFAULT_LINK_TYPE } from "@/components/links/link-sheet";
-import EmailProtectionSection from "@/components/links/link-sheet/email-protection-section";
-import AllowNotificationSection from "@/components/links/link-sheet/allow-notification-section";
+import { UpgradePlanModal } from "@/components/billing/upgrade-plan-modal";
+import { DEFAULT_LINK_TYPE } from "@/components/links/link-sheet";
import AllowDownloadSection from "@/components/links/link-sheet/allow-download-section";
+import AllowListSection from "@/components/links/link-sheet/allow-list-section";
+import AllowNotificationSection from "@/components/links/link-sheet/allow-notification-section";
+import DenyListSection from "@/components/links/link-sheet/deny-list-section";
+import EmailAuthenticationSection from "@/components/links/link-sheet/email-authentication-section";
+import EmailProtectionSection from "@/components/links/link-sheet/email-protection-section";
import ExpirationSection from "@/components/links/link-sheet/expiration-section";
+import FeedbackSection from "@/components/links/link-sheet/feedback-section";
+import OGSection from "@/components/links/link-sheet/og-section";
+import PasswordSection from "@/components/links/link-sheet/password-section";
import {
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,
} from "@/components/ui/accordion";
-import EmailAuthenticationSection from "@/components/links/link-sheet/email-authentication-section";
-import AllowListSection from "@/components/links/link-sheet/allow-list-section";
-import DenyListSection from "@/components/links/link-sheet/deny-list-section";
-import PasswordSection from "@/components/links/link-sheet/password-section";
-import OGSection from "@/components/links/link-sheet/og-section";
-import FeedbackSection from "@/components/links/link-sheet/feedback-section";
-import { UpgradePlanModal } from "@/components/billing/upgrade-plan-modal";
+
import { usePlan } from "@/lib/swr/use-billing";
+
import QuestionSection from "./question-section";
import ScreenshotProtectionSection from "./screenshot-protection-section";
@@ -66,7 +68,7 @@ export const LinkOptions = ({
<Accordion type="single" collapsible>
<AccordionItem value="item-1" className="border-none">
- <AccordionTrigger className="py-0 rounded-lg space-x-2">
+ <AccordionTrigger className="space-x-2 rounded-lg py-0">
<span className="text-sm font-medium leading-6 text-foreground">
Advanced Link Access Options
</span>
diff --git a/components/links/link-sheet/og-section.tsx b/components/links/link-sheet/og-section.tsx
index 5fbbac51..00eb6a4d 100644
--- a/components/links/link-sheet/og-section.tsx
+++ b/components/links/link-sheet/og-section.tsx
@@ -1,20 +1,24 @@
import {
Dispatch,
SetStateAction,
- useState,
- useEffect,
useCallback,
+ useEffect,
+ useState,
} from "react";
-import { Switch } from "@/components/ui/switch";
-import { cn } from "@/lib/utils";
-import { DEFAULT_LINK_TYPE } from ".";
+
import { motion } from "framer-motion";
-import { FADE_IN_ANIMATION_SETTINGS } from "@/lib/constants";
-import LoadingSpinner from "@/components/ui/loading-spinner";
import { Upload as ArrowUpTrayIcon } from "lucide-react";
+
import { Input } from "@/components/ui/input";
+import LoadingSpinner from "@/components/ui/loading-spinner";
+import { Switch } from "@/components/ui/switch";
import { Textarea } from "@/components/ui/textarea";
+import { FADE_IN_ANIMATION_SETTINGS } from "@/lib/constants";
+import { cn } from "@/lib/utils";
+
+import { DEFAULT_LINK_TYPE } from ".";
+
export default function OGSection({
data,
setData,
@@ -85,7 +89,7 @@ export default function OGSection({
>
Custom social media cards
{hasFreePlan && (
- <span className="bg-background text-foreground ring-1 ring-gray-800 dark:ring-gray-500 rounded-full px-2 py-0.5 text-xs ml-2">
+ <span className="ml-2 rounded-full bg-background px-2 py-0.5 text-xs text-foreground ring-1 ring-gray-800 dark:ring-gray-500">
Pro
</span>
)}
@@ -105,7 +109,7 @@ export default function OGSection({
{enabled && (
<motion.div
- className="relative mt-4 rounded-md shadow-sm space-y-3"
+ className="relative mt-4 space-y-3 rounded-md shadow-sm"
{...FADE_IN_ANIMATION_SETTINGS}
>
<div>
@@ -231,7 +235,7 @@ export default function OGSection({
name="title"
id="title"
maxLength={120}
- className="flex w-full rounded-md border-0 py-1.5 text-foreground bg-background shadow-sm ring-1 ring-inset ring-input placeholder:text-muted-foreground focus:ring-2 focus:ring-inset focus:ring-gray-400 sm:text-sm sm:leading-6"
+ className="flex w-full rounded-md border-0 bg-background py-1.5 text-foreground shadow-sm ring-1 ring-inset ring-input placeholder:text-muted-foreground focus:ring-2 focus:ring-inset focus:ring-gray-400 sm:text-sm sm:leading-6"
placeholder={`Papermark - open-source document sharing infrastructure.`}
value={metaTitle || ""}
onChange={(e) => {
@@ -262,7 +266,7 @@ export default function OGSection({
id="description"
rows={3}
maxLength={240}
- className="flex w-full rounded-md border-0 py-1.5 text-foreground bg-background shadow-sm ring-1 ring-inset ring-input placeholder:text-muted-foreground focus:ring-2 focus:ring-inset focus:ring-gray-400 sm:text-sm sm:leading-6"
+ className="flex w-full rounded-md border-0 bg-background py-1.5 text-foreground shadow-sm ring-1 ring-inset ring-input placeholder:text-muted-foreground focus:ring-2 focus:ring-inset focus:ring-gray-400 sm:text-sm sm:leading-6"
placeholder={`Papermark is an open-source document sharing infrastructure for modern teams.`}
value={metaDescription || ""}
onChange={(e) => {
diff --git a/components/links/link-sheet/password-section.tsx b/components/links/link-sheet/password-section.tsx
index 18053dd1..4d5e0b1b 100644
--- a/components/links/link-sheet/password-section.tsx
+++ b/components/links/link-sheet/password-section.tsx
@@ -1,10 +1,14 @@
import { Dispatch, SetStateAction, useEffect, useState } from "react";
-import { Switch } from "@/components/ui/switch";
+
import { motion } from "framer-motion";
-import { FADE_IN_ANIMATION_SETTINGS } from "@/lib/constants";
+
import Eye from "@/components/shared/icons/eye";
import EyeOff from "@/components/shared/icons/eye-off";
+import { Switch } from "@/components/ui/switch";
+
+import { FADE_IN_ANIMATION_SETTINGS } from "@/lib/constants";
import { cn } from "@/lib/utils";
+
import { DEFAULT_LINK_TYPE } from ".";
export default function PasswordSection({
@@ -56,7 +60,7 @@ export default function PasswordSection({
autoComplete="off"
data-1p-ignore
type={showPassword ? "text" : "password"}
- className="flex w-full rounded-md border-0 py-1.5 text-foreground bg-background shadow-sm ring-1 ring-inset ring-input placeholder:text-muted-foreground focus:ring-2 focus:ring-inset focus:ring-gray-400 sm:text-sm sm:leading-6"
+ className="flex w-full rounded-md border-0 bg-background py-1.5 text-foreground shadow-sm ring-1 ring-inset ring-input placeholder:text-muted-foreground focus:ring-2 focus:ring-inset focus:ring-gray-400 sm:text-sm sm:leading-6"
value={password || ""}
placeholder="Enter password"
onChange={(e) => {
diff --git a/components/links/link-sheet/question-section.tsx b/components/links/link-sheet/question-section.tsx
index a8f598bc..d21bea2f 100644
--- a/components/links/link-sheet/question-section.tsx
+++ b/components/links/link-sheet/question-section.tsx
@@ -1,24 +1,21 @@
import {
Dispatch,
SetStateAction,
- useState,
- useEffect,
useCallback,
+ useEffect,
+ useState,
} from "react";
-import { Switch } from "@/components/ui/switch";
-import { cn } from "@/lib/utils";
-import { DEFAULT_LINK_TYPE } from ".";
+
import { motion } from "framer-motion";
-import { FADE_IN_ANIMATION_SETTINGS } from "@/lib/constants";
-import LoadingSpinner from "@/components/ui/loading-spinner";
import {
Upload as ArrowUpTrayIcon,
BadgeInfoIcon,
HelpCircleIcon,
} from "lucide-react";
+
import { Input } from "@/components/ui/input";
-import { Textarea } from "@/components/ui/textarea";
import { Label } from "@/components/ui/label";
+import LoadingSpinner from "@/components/ui/loading-spinner";
import {
Select,
SelectContent,
@@ -26,6 +23,13 @@ import {
SelectTrigger,
SelectValue,
} from "@/components/ui/select";
+import { Switch } from "@/components/ui/switch";
+import { Textarea } from "@/components/ui/textarea";
+
+import { FADE_IN_ANIMATION_SETTINGS } from "@/lib/constants";
+import { cn } from "@/lib/utils";
+
+import { DEFAULT_LINK_TYPE } from ".";
export default function QuestionSection({
data,
@@ -82,7 +86,7 @@ export default function QuestionSection({
<HelpCircleIcon className="text-muted-foreground h-4 w-4" />
</span> */}
{hasFreePlan && (
- <span className="bg-background text-foreground ring-1 ring-gray-800 dark:ring-gray-500 rounded-full px-2 py-0.5 text-xs ml-2">
+ <span className="ml-2 rounded-full bg-background px-2 py-0.5 text-xs text-foreground ring-1 ring-gray-800 dark:ring-gray-500">
Business
</span>
)}
@@ -110,11 +114,11 @@ export default function QuestionSection({
className="relative mt-4 space-y-3"
{...FADE_IN_ANIMATION_SETTINGS}
>
- <div className="flex flex-col w-full items-start gap-6 overflow-x-visible pb-4 pt-0">
+ <div className="flex w-full flex-col items-start gap-6 overflow-x-visible pb-4 pt-0">
<div className="w-full space-y-2">
<Label>Question Type</Label>
<Select defaultValue="yes-no">
- <SelectTrigger className="flex w-full rounded-md border-0 py-1.5 text-foreground bg-background shadow-sm ring-1 ring-inset ring-input placeholder:text-muted-foreground focus:ring-2 focus:ring-offset-3 focus:ring-gray-400 sm:text-sm sm:leading-6">
+ <SelectTrigger className="focus:ring-offset-3 flex w-full rounded-md border-0 bg-background py-1.5 text-foreground shadow-sm ring-1 ring-inset ring-input placeholder:text-muted-foreground focus:ring-2 focus:ring-gray-400 sm:text-sm sm:leading-6">
<SelectValue placeholder="Select a question type" />
</SelectTrigger>
<SelectContent>
@@ -125,7 +129,7 @@ export default function QuestionSection({
<div className="w-full space-y-2">
<Label htmlFor="question">Question</Label>
<Input
- className="flex w-full rounded-md border-0 py-1.5 text-foreground bg-background shadow-sm ring-1 ring-inset ring-input placeholder:text-muted-foreground focus:ring-2 focus:ring-inset focus:ring-gray-400 sm:text-sm sm:leading-6"
+ className="flex w-full rounded-md border-0 bg-background py-1.5 text-foreground shadow-sm ring-1 ring-inset ring-input placeholder:text-muted-foreground focus:ring-2 focus:ring-inset focus:ring-gray-400 sm:text-sm sm:leading-6"
id="question"
type="text"
name="question"
diff --git a/components/links/link-sheet/screenshot-protection-section.tsx b/components/links/link-sheet/screenshot-protection-section.tsx
index f683a830..bf703b2c 100644
--- a/components/links/link-sheet/screenshot-protection-section.tsx
+++ b/components/links/link-sheet/screenshot-protection-section.tsx
@@ -1,6 +1,9 @@
-import { Dispatch, SetStateAction, useState, useEffect } from "react";
+import { Dispatch, SetStateAction, useEffect, useState } from "react";
+
import { Switch } from "@/components/ui/switch";
+
import { cn } from "@/lib/utils";
+
import { DEFAULT_LINK_TYPE } from ".";
export default function ScreenshotProtectionSection({
@@ -57,7 +60,7 @@ export default function ScreenshotProtectionSection({
>
Enable screenshot protection*
{hasFreePlan && (
- <span className="bg-background text-foreground ring-1 ring-gray-800 dark:ring-gray-500 rounded-full px-2 py-0.5 text-xs ml-2">
+ <span className="ml-2 rounded-full bg-background px-2 py-0.5 text-xs text-foreground ring-1 ring-gray-800 dark:ring-gray-500">
Business
</span>
)}
diff --git a/components/links/links-table.tsx b/components/links/links-table.tsx
index d40cca08..416d68da 100644
--- a/components/links/links-table.tsx
+++ b/components/links/links-table.tsx
@@ -1,11 +1,19 @@
+import { useRouter } from "next/router";
+
+import { useState } from "react";
+
+import { useTeam } from "@/context/team-context";
+import { DocumentVersion } from "@prisma/client";
+import { Settings2Icon } from "lucide-react";
+import { toast } from "sonner";
+import { mutate } from "swr";
+
+import { Button } from "@/components/ui/button";
import {
- Table,
- TableBody,
- TableCell,
- TableHead,
- TableHeader,
- TableRow,
-} from "@/components/ui/table";
+ Collapsible,
+ CollapsibleContent,
+ CollapsibleTrigger,
+} from "@/components/ui/collapsible";
import {
DropdownMenu,
DropdownMenuContent,
@@ -14,33 +22,29 @@ import {
DropdownMenuSeparator,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
-import {
- Collapsible,
- CollapsibleContent,
- CollapsibleTrigger,
-} from "@/components/ui/collapsible";
-import { Button } from "@/components/ui/button";
import { Skeleton } from "@/components/ui/skeleton";
+import {
+ Table,
+ TableBody,
+ TableCell,
+ TableHead,
+ TableHeader,
+ TableRow,
+} from "@/components/ui/table";
-import BarChart from "../shared/icons/bar-chart";
+import { usePlan } from "@/lib/swr/use-billing";
+import { LinkWithViews } from "@/lib/types";
import { cn, copyToClipboard, nFormatter, timeAgo } from "@/lib/utils";
-import MoreHorizontal from "../shared/icons/more-horizontal";
-import LinksVisitors from "./links-visitors";
+
+import ProcessStatusBar from "../documents/process-status-bar";
+import BarChart from "../shared/icons/bar-chart";
import ChevronDown from "../shared/icons/chevron-down";
+import MoreHorizontal from "../shared/icons/more-horizontal";
import LinkSheet, {
DEFAULT_LINK_PROPS,
type DEFAULT_LINK_TYPE,
} from "./link-sheet";
-import { useState } from "react";
-import { LinkWithViews } from "@/lib/types";
-import { mutate } from "swr";
-import { toast } from "sonner";
-import { useRouter } from "next/router";
-import { usePlan } from "@/lib/swr/use-billing";
-import { useTeam } from "@/context/team-context";
-import ProcessStatusBar from "../documents/process-status-bar";
-import { Settings2Icon } from "lucide-react";
-import { DocumentVersion } from "@prisma/client";
+import LinksVisitors from "./links-visitors";
export default function LinksTable({
targetType,
@@ -158,7 +162,7 @@ export default function LinksTable({
<div className="rounded-md border">
<Table>
<TableHeader>
- <TableRow className="hover:bg-transparent *:whitespace-nowrap *:font-medium">
+ <TableRow className="*:whitespace-nowrap *:font-medium hover:bg-transparent">
<TableHead>Name</TableHead>
<TableHead className="w-[150px] sm:w-[200px] md:w-[250px]">
Link
@@ -176,18 +180,18 @@ export default function LinksTable({
<Collapsible key={link.id} asChild>
<>
<TableRow key={link.id} className="group/row">
- <TableCell className="font-medium truncate w-[220px]">
+ <TableCell className="w-[220px] truncate font-medium">
{link.name || `Link #${link.id.slice(-5)}`}{" "}
{link.domainId && hasFreePlan ? (
- <span className="text-foreground bg-destructive ring-1 ring-destructive rounded-full px-2.5 py-0.5 text-xs ml-2">
+ <span className="ml-2 rounded-full bg-destructive px-2.5 py-0.5 text-xs text-foreground ring-1 ring-destructive">
Inactive
</span>
) : null}
</TableCell>
- <TableCell className="max-w-[250px] sm:min-w-[300px] md:min-w-[400px] lg:min-w-[450px] flex items-center gap-x-2">
+ <TableCell className="flex max-w-[250px] items-center gap-x-2 sm:min-w-[300px] md:min-w-[400px] lg:min-w-[450px]">
<div
className={cn(
- `group/cell relative w-full overflow-hidden flex items-center gap-x-4 rounded-sm text-secondary-foreground text-center px-3 py-1.5 md:py-1 group-hover/row:ring-1 group-hover/row:ring-gray-400 group-hover/row:dark:ring-gray-100 transition-all truncate`,
+ `group/cell relative flex w-full items-center gap-x-4 overflow-hidden truncate rounded-sm px-3 py-1.5 text-center text-secondary-foreground transition-all group-hover/row:ring-1 group-hover/row:ring-gray-400 group-hover/row:dark:ring-gray-100 md:py-1`,
link.domainId && hasFreePlan
? "bg-destructive hover:bg-red-700 hover:dark:bg-red-200"
: "bg-secondary hover:bg-emerald-700 hover:dark:bg-emerald-200",
@@ -199,11 +203,11 @@ export default function LinksTable({
!primaryVersion.hasPages ? (
<ProcessStatusBar
documentVersionId={primaryVersion.id}
- className="absolute z-20 top-0 left-0 right-0 bottom-0 h-full gap-x-8 flex items-center"
+ className="absolute bottom-0 left-0 right-0 top-0 z-20 flex h-full items-center gap-x-8"
/>
) : null}
- <div className="whitespace-nowrap w-full flex text-xs md:text-sm group-hover/cell:opacity-0">
+ <div className="flex w-full whitespace-nowrap text-xs group-hover/cell:opacity-0 md:text-sm">
{link.domainId
? `https://${link.domainSlug}/${link.slug}`
: `https://${process.env.NEXT_PUBLIC_ROOT_DOMAIN}/view/${link.id}`}
@@ -211,7 +215,7 @@ export default function LinksTable({
{link.domainId && hasFreePlan ? (
<button
- className="whitespace-nowrap text-sm text-center group-hover/cell:text-primary-foreground hidden group-hover/cell:block w-full absolute top-0 left-0 right-0 bottom-0 z-10"
+ className="absolute bottom-0 left-0 right-0 top-0 z-10 hidden w-full whitespace-nowrap text-center text-sm group-hover/cell:block group-hover/cell:text-primary-foreground"
onClick={() =>
router.push("/settings/billing")
}
@@ -221,7 +225,7 @@ export default function LinksTable({
</button>
) : (
<button
- className="whitespace-nowrap w-full text-xs sm:text-sm text-center group-hover/cell:text-primary-foreground hidden group-hover/cell:block absolute top-0 left-0 right-0 bottom-0 z-10"
+ className="absolute bottom-0 left-0 right-0 top-0 z-10 hidden w-full whitespace-nowrap text-center text-xs group-hover/cell:block group-hover/cell:text-primary-foreground sm:text-sm"
onClick={() =>
handleCopyToClipboard(
link.domainId
@@ -263,7 +267,7 @@ export default function LinksTable({
</p>
{Number(nFormatter(link._count.views)) > 0 &&
targetType !== "DATAROOM" ? (
- <ChevronDown className="h-4 w-4 text-muted-foreground shrink-0 transition-transform duration-200 chevron" />
+ <ChevronDown className="chevron h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200" />
) : null}
</div>
</CollapsibleTrigger>
@@ -357,10 +361,10 @@ export default function LinksTable({
<Button
variant="secondary"
size="sm"
- className="text-gray-400 mx-auto flex items-center gap-x-1 h-8 justify-center mt-4 [&[data-state=open]>svg.chevron]:rotate-180"
+ className="mx-auto mt-4 flex h-8 items-center justify-center gap-x-1 text-gray-400 [&[data-state=open]>svg.chevron]:rotate-180"
>
{archivedLinksCount} Archived Links
- <ChevronDown className="h-4 w-4 text-gray-400 transition-transform duration-200 chevron" />
+ <ChevronDown className="chevron h-4 w-4 text-gray-400 transition-transform duration-200" />
</Button>
</CollapsibleTrigger>
<CollapsibleContent className="mt-2">
@@ -370,7 +374,7 @@ export default function LinksTable({
<div className="rounded-md border">
<Table>
<TableHeader>
- <TableRow className="hover:bg-transparent *:whitespace-nowrap *:font-medium">
+ <TableRow className="*:whitespace-nowrap *:font-medium hover:bg-transparent">
<TableHead>Name</TableHead>
<TableHead className="w-[150px] sm:w-[200px] md:w-[250px]">
Link
@@ -387,11 +391,11 @@ export default function LinksTable({
.map((link) => (
<>
<TableRow key={link.id} className="group/row">
- <TableCell className="truncate w-[180px]">
+ <TableCell className="w-[180px] truncate">
{link.name || "No link name"}
</TableCell>
<TableCell className="max-w-[250px] sm:min-w-[300px] md:min-w-[400px] lg:min-w-[450px]">
- <div className="flex items-center gap-x-4 whitespace-nowrap text-xs sm:text-sm rounded-sm text-secondary-foreground bg-secondary px-3 py-1.5 sm:py-1">
+ <div className="flex items-center gap-x-4 whitespace-nowrap rounded-sm bg-secondary px-3 py-1.5 text-xs text-secondary-foreground sm:py-1 sm:text-sm">
{link.domainId
? `https://${link.domainSlug}/${link.slug}`
: `https://${process.env.NEXT_PUBLIC_ROOT_DOMAIN}/view/${link.id}`}
diff --git a/components/links/links-visitors.tsx b/components/links/links-visitors.tsx
index 4072ed70..1cdc5680 100644
--- a/components/links/links-visitors.tsx
+++ b/components/links/links-visitors.tsx
@@ -1,10 +1,11 @@
-import { durationFormat, timeAgo } from "@/lib/utils";
-import { TableCell, TableRow } from "@/components/ui/table";
-import { Skeleton } from "@/components/ui/skeleton";
-import { useLinkVisits } from "@/lib/swr/use-link";
import { Gauge } from "@/components/ui/gauge";
+import { Skeleton } from "@/components/ui/skeleton";
+import { TableCell, TableRow } from "@/components/ui/table";
import { VisitorAvatar } from "@/components/visitors/visitor-avatar";
+import { useLinkVisits } from "@/lib/swr/use-link";
+import { durationFormat, timeAgo } from "@/lib/utils";
+
export default function LinksVisitors({
linkId,
linkName,
@@ -20,21 +21,21 @@ export default function LinksVisitors({
views.map((view) => (
<TableRow key={view.id}>
<TableCell colSpan={2}>
- <div className="flex items-center sm:space-x-3 overflow-visible">
+ <div className="flex items-center overflow-visible sm:space-x-3">
<VisitorAvatar
viewerEmail={view.viewerEmail}
- className="w-7 md:w-8 h-7 md:h-8 text-xs md:text-sm"
+ className="h-7 w-7 text-xs md:h-8 md:w-8 md:text-sm"
/>
- <p className="text-sm text-gray-800 dark:text-gray-200 overflow-visible">
+ <p className="overflow-visible text-sm text-gray-800 dark:text-gray-200">
{view.viewerEmail ? view.viewerEmail : "Anonymous"}
</p>
</div>
</TableCell>
<TableCell>
- <div className="flex space-x-2 md:space-x-4 items-center">
- <div className="text-sm text-muted-foreground whitespace-nowrap">
+ <div className="flex items-center space-x-2 md:space-x-4">
+ <div className="whitespace-nowrap text-sm text-muted-foreground">
{durationFormat(view.totalDuration)}
</div>
diff --git a/components/mdx/components/index.tsx b/components/mdx/components/index.tsx
index fa3e8b5a..674811eb 100644
--- a/components/mdx/components/index.tsx
+++ b/components/mdx/components/index.tsx
@@ -1,11 +1,15 @@
+import NextImage from "next/image";
import Link from "next/link";
-import { MDXImage } from "./mdx-image";
-import { MDXComponents } from "mdx/types";
+
import { Code } from "bright";
-import NextImage from "next/image";
-import { cn } from "@/lib/utils";
+import { MDXComponents } from "mdx/types";
+
import { Button } from "@/components/ui/button";
+import { cn } from "@/lib/utils";
+
+import { MDXImage } from "./mdx-image";
+
export const mdxComponents: MDXComponents = {
a: ({ children, ...props }) => {
// check if external links
@@ -23,7 +27,7 @@ export const mdxComponents: MDXComponents = {
{...props}
className={cn(
props.className,
- "text-[#fb7a00] font-semibold no-underline hover:underline",
+ "font-semibold text-[#fb7a00] no-underline hover:underline",
)}
href={props.href || ""}
target="_blank"
diff --git a/components/mdx/post-body.tsx b/components/mdx/post-body.tsx
index fcf80e0b..d9e7ea52 100644
--- a/components/mdx/post-body.tsx
+++ b/components/mdx/post-body.tsx
@@ -1,9 +1,9 @@
import { MDXRemote } from "next-mdx-remote/rsc";
-
-import remarkGfm from "remark-gfm";
-import rehypeSlug from "rehype-slug";
import rehypeAutolinkHeadings from "rehype-autolink-headings";
+import rehypeSlug from "rehype-slug";
+import remarkGfm from "remark-gfm";
import remarkToc from "remark-toc";
+
import { mdxComponents } from "./components";
export function ContentBody({ children }: { children: string }) {
diff --git a/components/mdx/table-of-contents.tsx b/components/mdx/table-of-contents.tsx
index e337c6da..de478367 100644
--- a/components/mdx/table-of-contents.tsx
+++ b/components/mdx/table-of-contents.tsx
@@ -1,9 +1,13 @@
"use client";
-import { cn } from "@/lib/utils";
import Link from "next/link";
+
+import { useEffect, useState } from "react";
+
import GithubSlugger from "github-slugger";
+import { cn } from "@/lib/utils";
+
export default function TableOfContents({
items,
}: {
@@ -16,7 +20,7 @@ export default function TableOfContents({
const slugger = new GithubSlugger();
return (
- <div className="grid gap-4 -ml-[2.55rem] pl-10 border-l border-orange-500">
+ <div className="-ml-[2.55rem] grid gap-4 border-l border-orange-500 pl-10">
<p className="text-sm font-medium">Table of Contents</p>
{items &&
items.map((item, idx) => {
@@ -26,7 +30,7 @@ export default function TableOfContents({
key={itemId}
href={`#${itemId}`}
className={cn("text-sm text-gray-500 ", {
- "border-l-2 border-black -ml-[2.6rem] pl-10 text-black":
+ "-ml-[2.6rem] border-l-2 border-black pl-10 text-black":
currentAnchor ? currentAnchor === itemId : idx === 0,
})}
>
@@ -38,8 +42,6 @@ export default function TableOfContents({
);
}
-import { useEffect, useState } from "react";
-
function useCurrentAnchor() {
const [currentAnchor, setCurrentAnchor] = useState<string | null>(null);
diff --git a/components/navigation-menu.tsx b/components/navigation-menu.tsx
index e1e54751..f2aeb057 100644
--- a/components/navigation-menu.tsx
+++ b/components/navigation-menu.tsx
@@ -1,11 +1,13 @@
"use client";
import Link from "next/link";
+import { useRouter } from "next/router";
+
import * as React from "react";
import { Separator } from "@/components/ui/separator";
+
import { cn } from "@/lib/utils";
-import { useRouter } from "next/router";
type Props = {
navigation: {
@@ -23,7 +25,7 @@ export const NavMenu: React.FC<React.PropsWithChildren<Props>> = ({
}) => {
return (
<nav className={cn("sticky top-0 bg-background", className)}>
- <div className="flex items-center w-full pl-1 overflow-x-auto">
+ <div className="flex w-full items-center overflow-x-auto pl-1">
<ul className="flex flex-row gap-4">
{navigation.map(({ label, href, segment, tag }) => (
<NavItem
@@ -63,7 +65,7 @@ const NavItem: React.FC<Props["navigation"][0]> = ({
<Link
href={href}
className={cn(
- "text-sm flex items-center gap-1 font-medium py-2 px-3 -mx-3 text-content-subtle hover:bg-background-subtle rounded-md hover:text-primary",
+ "text-content-subtle hover:bg-background-subtle -mx-3 flex items-center gap-1 rounded-md px-3 py-2 text-sm font-medium hover:text-primary",
{
"text-primary": active,
},
@@ -71,7 +73,7 @@ const NavItem: React.FC<Props["navigation"][0]> = ({
>
{label}
{tag ? (
- <div className="bg-background border text-content-subtle rounded text-xs px-1 py-0.5 font-mono">
+ <div className="text-content-subtle rounded border bg-background px-1 py-0.5 font-mono text-xs">
{tag}
</div>
) : null}
diff --git a/components/profile-menu.tsx b/components/profile-menu.tsx
index c44fc262..f09f694d 100644
--- a/components/profile-menu.tsx
+++ b/components/profile-menu.tsx
@@ -1,10 +1,10 @@
+import Image from "next/image";
+import Link from "next/link";
+
+import { HelpCircle, LogOut } from "lucide-react";
import { signOut, useSession } from "next-auth/react";
+
import ChevronUp from "@/components/shared/icons/chevron-up";
-import Link from "next/link";
-import Image from "next/image";
-import UserRound from "./shared/icons/user-round";
-import { ModeToggle } from "./theme-toggle";
-import { Skeleton } from "@/components/ui/skeleton";
import {
DropdownMenu,
DropdownMenuContent,
@@ -12,9 +12,13 @@ import {
DropdownMenuSeparator,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
-import { HelpCircle, LogOut } from "lucide-react";
+import { Skeleton } from "@/components/ui/skeleton";
+
import { cn } from "@/lib/utils";
+import UserRound from "./shared/icons/user-round";
+import { ModeToggle } from "./theme-toggle";
+
type ProfileMenuProps = {
className?: string;
size: "large" | "small";
@@ -25,16 +29,16 @@ const ProfileMenu = ({ className, size }: ProfileMenuProps) => {
const isSize = size === "large";
return (
- <div className="flex justify-between items-center space-x-2">
+ <div className="flex items-center justify-between space-x-2">
{status === "loading" ? (
- <div className="w-full flex items-center rounded-md gap-x-3 p-2">
+ <div className="flex w-full items-center gap-x-3 rounded-md p-2">
<Skeleton className="h-8 w-8 rounded-full" />
{isSize && <Skeleton className="h-7 w-[90%]" />}
</div>
) : (
<DropdownMenu>
<DropdownMenuTrigger asChild className="w-full">
- <div className="w-full flex items-center group rounded-full lg:rounded-md lg:gap-x-3 lg:p-2 text-sm font-semibold leading-6 text-foreground hover:bg-gray-200 hover:dark:bg-secondary">
+ <div className="group flex w-full items-center rounded-full text-sm font-semibold leading-6 text-foreground hover:bg-gray-200 hover:dark:bg-secondary lg:gap-x-3 lg:rounded-md lg:p-2">
{session?.user?.image ? (
<Image
className="h-7 w-7 rounded-full bg-secondary"
@@ -45,10 +49,10 @@ const ProfileMenu = ({ className, size }: ProfileMenuProps) => {
loading="lazy"
/>
) : (
- <UserRound className="h-7 w-7 p-1 rounded-full ring-1 ring-muted-foreground/50 bg-secondary" />
+ <UserRound className="h-7 w-7 rounded-full bg-secondary p-1 ring-1 ring-muted-foreground/50" />
)}
{isSize && (
- <span className="flex items-center w-full justify-between">
+ <span className="flex w-full items-center justify-between">
<span className="sr-only">Your profile</span>
<span aria-hidden="true" className="line-clamp-2">
{session?.user?.name
@@ -56,17 +60,17 @@ const ProfileMenu = ({ className, size }: ProfileMenuProps) => {
: session?.user?.email?.split("@")[0]}
</span>
<ChevronUp
- className="ml-2 h-5 w-5 text-muted-foreground shrink-0"
+ className="ml-2 h-5 w-5 shrink-0 text-muted-foreground"
aria-hidden="true"
/>
</span>
)}
</div>
</DropdownMenuTrigger>
- <DropdownMenuContent className="lg:w-[240px] xl:w-[270px] mr-2 lg:mr-0 px-0 pb-2">
+ <DropdownMenuContent className="mr-2 px-0 pb-2 lg:mr-0 lg:w-[240px] xl:w-[270px]">
{session ? (
<>
- <DropdownMenuLabel className="px-3 !py-[3px] mt-2 text-sm text-muted-foreground truncate">
+ <DropdownMenuLabel className="mt-2 truncate !py-[3px] px-3 text-sm text-muted-foreground">
{session?.user?.email}
</DropdownMenuLabel>
<DropdownMenuSeparator className="!my-2" />
@@ -74,9 +78,9 @@ const ProfileMenu = ({ className, size }: ProfileMenuProps) => {
<a
href="mailto:[email protected]"
- className="flex items-center px-3 py-2 my-1 text-sm hover:bg-gray-200 dark:hover:bg-muted duration-200"
+ className="my-1 flex items-center px-3 py-2 text-sm duration-200 hover:bg-gray-200 dark:hover:bg-muted"
>
- <HelpCircle className="w-4 h-4 mr-2" />
+ <HelpCircle className="mr-2 h-4 w-4" />
Need Help?
</a>
@@ -86,10 +90,10 @@ const ProfileMenu = ({ className, size }: ProfileMenuProps) => {
callbackUrl: `${window.location.origin}`,
})
}
- className="flex items-center px-3 py-2 text-sm hover:bg-gray-200 dark:hover:bg-muted duration-200"
+ className="flex items-center px-3 py-2 text-sm duration-200 hover:bg-gray-200 dark:hover:bg-muted"
href={""}
>
- <LogOut className="w-4 h-4 mr-2" />
+ <LogOut className="mr-2 h-4 w-4" />
Sign Out
</Link>
</>
diff --git a/components/providers/posthog-provider.tsx b/components/providers/posthog-provider.tsx
index 296dff11..1a3ac566 100644
--- a/components/providers/posthog-provider.tsx
+++ b/components/providers/posthog-provider.tsx
@@ -1,11 +1,12 @@
-import { getPostHogConfig } from "@/lib/posthog";
-import { CustomUser } from "@/lib/types";
import { getSession } from "next-auth/react";
import posthog from "posthog-js";
// import { useEffect } from "react";
// import { useRouter } from "next/router";
import { PostHogProvider } from "posthog-js/react";
+import { getPostHogConfig } from "@/lib/posthog";
+import { CustomUser } from "@/lib/types";
+
export const PostHogCustomProvider = ({
children,
}: {
diff --git a/components/settings/navbar.tsx b/components/settings/navbar.tsx
index 2069d04f..cbd1a6e8 100644
--- a/components/settings/navbar.tsx
+++ b/components/settings/navbar.tsx
@@ -1,6 +1,7 @@
-import { cn } from "@/lib/utils";
import Link from "next/link";
+import { cn } from "@/lib/utils";
+
const tabs = [
{ name: "General", href: "/settings/general" },
{ name: "People", href: "/settings/people" },
@@ -11,10 +12,10 @@ const tabs = [
export default function Navbar({ current }: { current?: string }) {
return (
- <div className="p-4 sm:p-4 sm:m-4">
- <div className="flex items-center justify-between mb-4 md:mb-8 lg:mb-12">
+ <div className="p-4 sm:m-4 sm:p-4">
+ <div className="mb-4 flex items-center justify-between md:mb-8 lg:mb-12">
<div className="space-y-1">
- <h2 className="text-2xl text-foreground font-semibold tracking-tight">
+ <h2 className="text-2xl font-semibold tracking-tight text-foreground">
Settings
</h2>
<p className="text-sm text-muted-foreground">
@@ -33,7 +34,7 @@ export default function Navbar({ current }: { current?: string }) {
current === tab.name
? "border-foreground text-foreground"
: "border-transparent text-muted-foreground hover:border-foreground hover:text-foreground",
- "whitespace-nowrap border-b-2 py-4 px-1 text-sm font-medium",
+ "whitespace-nowrap border-b-2 px-1 py-4 text-sm font-medium",
)}
aria-current={current === tab.name ? "page" : undefined}
>
diff --git a/components/shared/blur-image.tsx b/components/shared/blur-image.tsx
index 8e95cf5b..7a0f56cf 100644
--- a/components/shared/blur-image.tsx
+++ b/components/shared/blur-image.tsx
@@ -1,7 +1,9 @@
-import { cn } from "@/lib/utils";
import Image, { ImageProps } from "next/image";
+
import { useState } from "react";
+import { cn } from "@/lib/utils";
+
export function BlurImage(props: ImageProps) {
const [isLoading, setLoading] = useState(true);
diff --git a/components/shared/icons/check-cirlce-2.tsx b/components/shared/icons/check-cirlce-2.tsx
index 84ad1757..7038b6b9 100644
--- a/components/shared/icons/check-cirlce-2.tsx
+++ b/components/shared/icons/check-cirlce-2.tsx
@@ -1,4 +1,10 @@
-export default function CheckCircle2({ className, fill }: { className?: string, fill?: string }) {
+export default function CheckCircle2({
+ className,
+ fill,
+}: {
+ className?: string;
+ fill?: string;
+}) {
return (
<svg
width="14"
@@ -16,4 +22,4 @@ export default function CheckCircle2({ className, fill }: { className?: string,
<path d="m9 12 2 2 4-4" />
</svg>
);
-}
\ No newline at end of file
+}
diff --git a/components/shared/icons/chevron-down.tsx b/components/shared/icons/chevron-down.tsx
index 05e64cd3..dcbacb0b 100644
--- a/components/shared/icons/chevron-down.tsx
+++ b/components/shared/icons/chevron-down.tsx
@@ -15,4 +15,4 @@ export default function ChevronDown({ className }: { className?: string }) {
<path d="m6 9 6 6 6-6" />
</svg>
);
-}
\ No newline at end of file
+}
diff --git a/components/shared/icons/chevron-up.tsx b/components/shared/icons/chevron-up.tsx
index 47cdb334..33b1772c 100644
--- a/components/shared/icons/chevron-up.tsx
+++ b/components/shared/icons/chevron-up.tsx
@@ -15,4 +15,4 @@ export default function ChevronUp({ className }: { className?: string }) {
<path d="m18 15-6-6-6 6" />
</svg>
);
-}
\ No newline at end of file
+}
diff --git a/components/shared/icons/copy-right.tsx b/components/shared/icons/copy-right.tsx
index c9af56e8..10d8a890 100644
--- a/components/shared/icons/copy-right.tsx
+++ b/components/shared/icons/copy-right.tsx
@@ -1,6 +1,6 @@
export default function CopyRight({ className }: { className?: string }) {
return (
-<svg
+ <svg
width="14"
height="14"
viewBox="0 0 24 24"
diff --git a/components/shared/icons/external-link.tsx b/components/shared/icons/external-link.tsx
index 48ecc7bd..843f5172 100644
--- a/components/shared/icons/external-link.tsx
+++ b/components/shared/icons/external-link.tsx
@@ -1,4 +1,4 @@
-export default function CheckCircle2({className}: {className?: string;}) {
+export default function CheckCircle2({ className }: { className?: string }) {
return (
<svg
width="14"
@@ -17,4 +17,4 @@ export default function CheckCircle2({className}: {className?: string;}) {
<line x1="10" x2="21" y1="14" y2="3" />
</svg>
);
-}
\ No newline at end of file
+}
diff --git a/components/shared/icons/eye-off.tsx b/components/shared/icons/eye-off.tsx
index 9916e1e8..729f27e5 100644
--- a/components/shared/icons/eye-off.tsx
+++ b/components/shared/icons/eye-off.tsx
@@ -18,4 +18,4 @@ export default function EyeOff({ className }: { className?: string }) {
<line x1="2" x2="22" y1="2" y2="22" />
</svg>
);
-}
\ No newline at end of file
+}
diff --git a/components/shared/icons/eye.tsx b/components/shared/icons/eye.tsx
index 5b43990c..fb2246d5 100644
--- a/components/shared/icons/eye.tsx
+++ b/components/shared/icons/eye.tsx
@@ -16,4 +16,4 @@ export default function Eye({ className }: { className?: string }) {
<circle cx="12" cy="12" r="3" />
</svg>
);
-}
\ No newline at end of file
+}
diff --git a/components/shared/icons/file-up.tsx b/components/shared/icons/file-up.tsx
index a40501aa..3d6bad14 100644
--- a/components/shared/icons/file-up.tsx
+++ b/components/shared/icons/file-up.tsx
@@ -18,4 +18,4 @@ export default function FileUp({ className }: { className?: string }) {
<path d="m15 15-3-3-3 3" />
</svg>
);
-}
\ No newline at end of file
+}
diff --git a/components/shared/icons/folder.tsx b/components/shared/icons/folder.tsx
index 1edbc478..d388f80b 100644
--- a/components/shared/icons/folder.tsx
+++ b/components/shared/icons/folder.tsx
@@ -16,4 +16,4 @@ export default function Folder({ className }: { className?: string }) {
<path d="M2 10h20" />
</svg>
);
-}
\ No newline at end of file
+}
diff --git a/components/shared/icons/github.tsx b/components/shared/icons/github.tsx
index 2762ddbf..cee98789 100644
--- a/components/shared/icons/github.tsx
+++ b/components/shared/icons/github.tsx
@@ -1,7 +1,7 @@
import React from "react";
function GitHubIcon(
- props: React.JSX.IntrinsicAttributes & React.SVGProps<SVGSVGElement>
+ props: React.JSX.IntrinsicAttributes & React.SVGProps<SVGSVGElement>,
) {
return (
<svg fill="currentColor" viewBox="0 0 24 24" {...props}>
diff --git a/components/shared/icons/globe.tsx b/components/shared/icons/globe.tsx
index de33dfab..5e1034ea 100644
--- a/components/shared/icons/globe.tsx
+++ b/components/shared/icons/globe.tsx
@@ -17,4 +17,4 @@ export default function Globe({ className }: { className?: string }) {
<path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z" />
</svg>
);
-}
\ No newline at end of file
+}
diff --git a/components/shared/icons/home.tsx b/components/shared/icons/home.tsx
index 458dc2f9..72858832 100644
--- a/components/shared/icons/home.tsx
+++ b/components/shared/icons/home.tsx
@@ -16,4 +16,4 @@ export default function Home({ className }: { className?: string }) {
<polyline points="9 22 9 12 15 12 15 22" />
</svg>
);
-}
\ No newline at end of file
+}
diff --git a/components/shared/icons/menu.tsx b/components/shared/icons/menu.tsx
index aa60b166..5ff63077 100644
--- a/components/shared/icons/menu.tsx
+++ b/components/shared/icons/menu.tsx
@@ -17,4 +17,4 @@ export default function Menu({ className }: { className?: string }) {
<line x1="4" x2="20" y1="18" y2="18" />
</svg>
);
-}
\ No newline at end of file
+}
diff --git a/components/shared/icons/moon.tsx b/components/shared/icons/moon.tsx
index 96250ae9..f79f9bb5 100644
--- a/components/shared/icons/moon.tsx
+++ b/components/shared/icons/moon.tsx
@@ -15,4 +15,4 @@ export default function Moon({ className }: { className?: string }) {
<path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z" />
</svg>
);
-}
\ No newline at end of file
+}
diff --git a/components/shared/icons/more-horizontal.tsx b/components/shared/icons/more-horizontal.tsx
index 16391088..0d442e16 100644
--- a/components/shared/icons/more-horizontal.tsx
+++ b/components/shared/icons/more-horizontal.tsx
@@ -17,4 +17,4 @@ export default function MoreHorizontal({ className }: { className?: string }) {
<circle cx="5" cy="12" r="1" />
</svg>
);
-}
\ No newline at end of file
+}
diff --git a/components/shared/icons/more-vertical.tsx b/components/shared/icons/more-vertical.tsx
index 2791c20b..7fddae14 100644
--- a/components/shared/icons/more-vertical.tsx
+++ b/components/shared/icons/more-vertical.tsx
@@ -17,4 +17,4 @@ export default function MoreVertical({ className }: { className?: string }) {
<circle cx="12" cy="19" r="1" />
</svg>
);
-}
\ No newline at end of file
+}
diff --git a/components/shared/icons/notion.tsx b/components/shared/icons/notion.tsx
index be17148f..4c3c2c82 100644
--- a/components/shared/icons/notion.tsx
+++ b/components/shared/icons/notion.tsx
@@ -1,6 +1,5 @@
// Thanks to trigger.dev for the icon:
// https://github.com/triggerdotdev/companyicons/blob/c6dcc5b389aa47fd6d8a0d346b48e7099f90703c/src/icons/companies/notion.tsx
-
import React from "react";
export default function NotionIcon(
diff --git a/components/shared/icons/pie-chart.tsx b/components/shared/icons/pie-chart.tsx
index e9a9d86e..e07d818b 100644
--- a/components/shared/icons/pie-chart.tsx
+++ b/components/shared/icons/pie-chart.tsx
@@ -16,4 +16,4 @@ export default function PieChart({ className }: { className?: string }) {
<path d="M22 12A10 10 0 0 0 12 2v10z" />
</svg>
);
-}
\ No newline at end of file
+}
diff --git a/components/shared/icons/search.tsx b/components/shared/icons/search.tsx
index 6d072f51..087bb6ff 100644
--- a/components/shared/icons/search.tsx
+++ b/components/shared/icons/search.tsx
@@ -16,4 +16,4 @@ export default function Search({ className }: { className?: string }) {
<path d="m21 21-4.3-4.3" />
</svg>
);
-}
\ No newline at end of file
+}
diff --git a/components/shared/icons/settings.tsx b/components/shared/icons/settings.tsx
index aefb683a..a71cc087 100644
--- a/components/shared/icons/settings.tsx
+++ b/components/shared/icons/settings.tsx
@@ -16,4 +16,4 @@ export default function Settings({ className }: { className?: string }) {
<circle cx="12" cy="12" r="3" />
</svg>
);
-}
\ No newline at end of file
+}
diff --git a/components/shared/icons/sun.tsx b/components/shared/icons/sun.tsx
index c7f437f9..937d6ae4 100644
--- a/components/shared/icons/sun.tsx
+++ b/components/shared/icons/sun.tsx
@@ -23,4 +23,4 @@ export default function Sun({ className }: { className?: string }) {
<path d="m19.07 4.93-1.41 1.41" />
</svg>
);
-}
\ No newline at end of file
+}
diff --git a/components/shared/icons/teams.tsx b/components/shared/icons/teams.tsx
index d82b63fc..ca614cc5 100644
--- a/components/shared/icons/teams.tsx
+++ b/components/shared/icons/teams.tsx
@@ -8,7 +8,8 @@ const TeamsIcon = () => {
viewBox="0 0 24 24"
strokeWidth="1.5"
stroke="currentColor"
- className="w-6 h-6">
+ className="h-6 w-6"
+ >
<path
strokeLinecap="round"
strokeLinejoin="round"
diff --git a/components/shared/icons/x-circle.tsx b/components/shared/icons/x-circle.tsx
index 06cd381c..22c7040e 100644
--- a/components/shared/icons/x-circle.tsx
+++ b/components/shared/icons/x-circle.tsx
@@ -23,4 +23,4 @@ export default function XCircle({
<path d="m9 9 6 6" />
</svg>
);
-}
\ No newline at end of file
+}
diff --git a/components/sidebar-folders.tsx b/components/sidebar-folders.tsx
index cd20e678..b1c98d75 100644
--- a/components/sidebar-folders.tsx
+++ b/components/sidebar-folders.tsx
@@ -1,7 +1,10 @@
import { useRouter } from "next/router";
+
+import { memo, useMemo } from "react";
+
import { FileTree } from "@/components/ui/nextra-filetree";
+
import { FolderWithDocuments, useFolders } from "@/lib/swr/use-documents";
-import { memo, useMemo } from "react";
// Helper function to build nested folder structure
const buildNestedFolderStructure = (folders: FolderWithDocuments[]) => {
diff --git a/components/teams/add-team-member-modal.tsx b/components/teams/add-team-member-modal.tsx
index 64f9b9f2..39aacd56 100644
--- a/components/teams/add-team-member-modal.tsx
+++ b/components/teams/add-team-member-modal.tsx
@@ -1,3 +1,11 @@
+import { useRouter } from "next/router";
+
+import { useState } from "react";
+
+import { useTeam } from "@/context/team-context";
+import { toast } from "sonner";
+import { mutate } from "swr";
+
import { Button } from "@/components/ui/button";
import {
Dialog,
@@ -10,12 +18,8 @@ import {
} from "@/components/ui/dialog";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
-import { useTeam } from "@/context/team-context";
+
import { useAnalytics } from "@/lib/analytics";
-import { useRouter } from "next/router";
-import { useState } from "react";
-import { toast } from "sonner";
-import { mutate } from "swr";
export function AddTeamMembers({
open,
@@ -88,12 +92,12 @@ export function AddTeamMembers({
<Input
id="email"
placeholder="[email protected]"
- className="w-full mt-1 mb-8"
+ className="mb-8 mt-1 w-full"
onChange={(e) => setEmail(e.target.value)}
/>
<DialogFooter>
- <Button type="submit" className="w-full h-9">
+ <Button type="submit" className="h-9 w-full">
{loading ? "Sending email..." : "Add member"}
</Button>
</DialogFooter>
diff --git a/components/teams/add-team-modal.tsx b/components/teams/add-team-modal.tsx
index be1224c7..0bb143d6 100644
--- a/components/teams/add-team-modal.tsx
+++ b/components/teams/add-team-modal.tsx
@@ -1,6 +1,10 @@
-import { usePlausible } from "next-plausible";
import { useRouter } from "next/router";
+
import { useState } from "react";
+
+import { usePlausible } from "next-plausible";
+import { toast } from "sonner";
+
import {
Dialog,
DialogContent,
@@ -10,10 +14,10 @@ import {
DialogTitle,
DialogTrigger,
} from "@/components/ui/dialog";
+
import { Button } from "../ui/button";
import { Input } from "../ui/input";
import { Label } from "../ui/label";
-import { toast } from "sonner";
export function AddTeamModal({ children }: { children: React.ReactNode }) {
const router = useRouter();
@@ -54,18 +58,18 @@ export function AddTeamModal({ children }: { children: React.ReactNode }) {
<Dialog>
<DialogTrigger asChild>{children}</DialogTrigger>
<DialogContent
- className="text-foreground bg-background"
+ className="bg-background text-foreground"
onClick={(e) => e.stopPropagation()}
>
<DialogHeader>
<DialogTitle>Create a Team</DialogTitle>
- <DialogDescription className="py-2 mb-1 text-sm text-muted-foreground">
+ <DialogDescription className="mb-1 py-2 text-sm text-muted-foreground">
Start by naming your new team and inviting team members.
</DialogDescription>
</DialogHeader>
<form
onSubmit={handleCreateTeam}
- className="flex flex-col gap-8 mt-4"
+ className="mt-4 flex flex-col gap-8"
onClick={(e) => e.stopPropagation()}
>
<div className="flex flex-col gap-3">
diff --git a/components/teams/delete-team-modal.tsx b/components/teams/delete-team-modal.tsx
index a307dc64..18f1ac23 100644
--- a/components/teams/delete-team-modal.tsx
+++ b/components/teams/delete-team-modal.tsx
@@ -1,6 +1,12 @@
-import { usePlausible } from "next-plausible";
import { useRouter } from "next/router";
+
import { useRef, useState } from "react";
+
+import { useTeam } from "@/context/team-context";
+import { usePlausible } from "next-plausible";
+import { toast } from "sonner";
+import { mutate } from "swr";
+
import {
Dialog,
DialogContent,
@@ -10,12 +16,10 @@ import {
DialogTitle,
DialogTrigger,
} from "@/components/ui/dialog";
+
import { Button } from "../ui/button";
import { Input } from "../ui/input";
import { Label } from "../ui/label";
-import { toast } from "sonner";
-import { useTeam } from "@/context/team-context";
-import { mutate } from "swr";
export function DeleteTeamModal({ children }: { children: React.ReactNode }) {
const router = useRouter();
@@ -62,19 +66,19 @@ export function DeleteTeamModal({ children }: { children: React.ReactNode }) {
<Dialog>
<DialogTrigger asChild>{children}</DialogTrigger>
<DialogContent
- className="text-foreground bg-background"
+ className="bg-background text-foreground"
onClick={(e) => e.stopPropagation()}
>
<DialogHeader>
<DialogTitle>Delete Team</DialogTitle>
- <DialogDescription className="py-2 mb-1 text-sm text-muted-foreground">
+ <DialogDescription className="mb-1 py-2 text-sm text-muted-foreground">
Warning: This will permanently delete your team, custom domain, and
all associated documents and their respective stats.
</DialogDescription>
</DialogHeader>
<form
onSubmit={handleDeleteTeam}
- className="flex flex-col gap-8 mt-4"
+ className="mt-4 flex flex-col gap-8"
onClick={(e) => e.stopPropagation()}
>
<div className="flex flex-col gap-3">
diff --git a/components/teams/select-team.tsx b/components/teams/select-team.tsx
index 4160d625..bed85ed3 100644
--- a/components/teams/select-team.tsx
+++ b/components/teams/select-team.tsx
@@ -1,15 +1,18 @@
-import { Check, Loader, PlusIcon } from "lucide-react";
+import Link from "next/link";
+import { useRouter } from "next/router";
+
import { TeamContextType, useTeam } from "@/context/team-context";
+import { Check, Loader, PlusIcon } from "lucide-react";
import { ChevronsUpDown as ChevronUpDownIcon } from "lucide-react";
-import { Team } from "@/lib/types";
-import { useRouter } from "next/router";
-import Link from "next/link";
+
import { Avatar, AvatarFallback } from "@/components/ui/avatar";
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
+
+import { Team } from "@/lib/types";
import { cn } from "@/lib/utils";
const SelectTeam = ({ teams, currentTeam, isLoading }: TeamContextType) => {
@@ -26,14 +29,14 @@ const SelectTeam = ({ teams, currentTeam, isLoading }: TeamContextType) => {
<>
{isLoading ? (
<div className="flex items-center gap-2 text-sm">
- <Loader className="animate-spin h-5 w-5" /> Loading teams...
+ <Loader className="h-5 w-5 animate-spin" /> Loading teams...
</div>
) : (
<DropdownMenu>
<DropdownMenuTrigger asChild>
- <div className="w-full py-2 px-[10px] border rounded-md flex opacity-90 items-center justify-between cursor-pointer hover:bg-muted duration-200">
+ <div className="flex w-full cursor-pointer items-center justify-between rounded-md border px-[10px] py-2 opacity-90 duration-200 hover:bg-muted">
<div className="flex items-center space-x-2">
- <Avatar className="w-[25px] h-[25px] text-[10px]">
+ <Avatar className="h-[25px] w-[25px] text-[10px]">
<AvatarFallback>
{currentTeam?.name?.slice(0, 2).toUpperCase()}
</AvatarFallback>
@@ -44,18 +47,18 @@ const SelectTeam = ({ teams, currentTeam, isLoading }: TeamContextType) => {
<ChevronUpDownIcon className="h-4 w-4" />
</div>
</DropdownMenuTrigger>
- <DropdownMenuContent className="w-[250px] sm:w-[270px] lg:w-[240px] xl:w-[270px] px-0 pt-2 pb-1.5">
+ <DropdownMenuContent className="w-[250px] px-0 pb-1.5 pt-2 sm:w-[270px] lg:w-[240px] xl:w-[270px]">
{teams.map((team) => (
<div
key={team.id}
onClick={() => switchTeam(team)}
className={cn(
- `w-full flex items-center justify-between px-3 py-2 hover:bg-gray-200 hover:dark:bg-gray-800 cursor-pointer transition-all duration-75 truncate text-sm font-normal `,
+ `flex w-full cursor-pointer items-center justify-between truncate px-3 py-2 text-sm font-normal transition-all duration-75 hover:bg-gray-200 hover:dark:bg-gray-800 `,
team.id === currentTeam?.id && "font-medium",
)}
>
<div className="flex items-center space-x-2">
- <Avatar className="w-7 h-7 text-xs">
+ <Avatar className="h-7 w-7 text-xs">
<AvatarFallback>
{team.name?.slice(0, 2).toUpperCase()}
</AvatarFallback>
@@ -66,7 +69,7 @@ const SelectTeam = ({ teams, currentTeam, isLoading }: TeamContextType) => {
{team.id === currentTeam?.id && (
<Check
- className="h-4 w-4 dark:text-white text-black"
+ className="h-4 w-4 text-black dark:text-white"
aria-hidden="true"
/>
)}
@@ -75,9 +78,9 @@ const SelectTeam = ({ teams, currentTeam, isLoading }: TeamContextType) => {
<Link
href="/settings/people"
- className="w-[92%] mx-auto mb-1 mt-3 flex items-center text-sm rounded-sm border px-[10px] py-2 hover:bg-gray-200 hover:dark:bg-gray-800 duration-100 hover:cursor-pointer"
+ className="mx-auto mb-1 mt-3 flex w-[92%] items-center rounded-sm border px-[10px] py-2 text-sm duration-100 hover:cursor-pointer hover:bg-gray-200 hover:dark:bg-gray-800"
>
- <PlusIcon className="h-4 w-4 mr-2" />
+ <PlusIcon className="mr-2 h-4 w-4" />
Invite Members
</Link>
</DropdownMenuContent>
diff --git a/components/theme-provider.tsx b/components/theme-provider.tsx
index b0ff2660..37a6774d 100644
--- a/components/theme-provider.tsx
+++ b/components/theme-provider.tsx
@@ -1,6 +1,7 @@
"use client";
import * as React from "react";
+
import { ThemeProvider as NextThemesProvider } from "next-themes";
import { type ThemeProviderProps } from "next-themes/dist/types";
diff --git a/components/theme-toggle.tsx b/components/theme-toggle.tsx
index 00dff4b8..49b66d03 100644
--- a/components/theme-toggle.tsx
+++ b/components/theme-toggle.tsx
@@ -1,17 +1,19 @@
"use client";
import * as React from "react";
-import Sun from "@/components/shared/icons/sun";
-import Moon from "@/components/shared/icons/moon";
+
import { Monitor, Palette } from "lucide-react";
import { useTheme } from "next-themes";
+
+import Moon from "@/components/shared/icons/moon";
+import Sun from "@/components/shared/icons/sun";
import {
+ DropdownMenuPortal,
DropdownMenuRadioGroup,
DropdownMenuRadioItem,
DropdownMenuSub,
- DropdownMenuSubTrigger,
DropdownMenuSubContent,
- DropdownMenuPortal,
+ DropdownMenuSubTrigger,
} from "@/components/ui/dropdown-menu";
export function ModeToggle() {
@@ -19,26 +21,26 @@ export function ModeToggle() {
return (
<DropdownMenuSub>
- <DropdownMenuSubTrigger className="w-full flex items-center px-3 !py-2 text-sm hover:!bg-gray-200 dark:hover:!bg-muted duration-200 rounded-none pr-2">
- <Palette className="w-4 h-4 mr-2" /> Themes
+ <DropdownMenuSubTrigger className="flex w-full items-center rounded-none !py-2 px-3 pr-2 text-sm duration-200 hover:!bg-gray-200 dark:hover:!bg-muted">
+ <Palette className="mr-2 h-4 w-4" /> Themes
</DropdownMenuSubTrigger>
<DropdownMenuPortal>
<DropdownMenuSubContent className="w-[180px]">
<DropdownMenuRadioGroup
value={theme}
onValueChange={setTheme}
- className="*:flex *:items-center space-y-1"
+ className="space-y-1 *:flex *:items-center"
>
<DropdownMenuRadioItem value="light">
- <Sun className="h-4 w-4 mr-2" />
+ <Sun className="mr-2 h-4 w-4" />
Light
</DropdownMenuRadioItem>
<DropdownMenuRadioItem value="dark">
- <Moon className="h-4 w-4 mr-2" />
+ <Moon className="mr-2 h-4 w-4" />
Dark
</DropdownMenuRadioItem>
<DropdownMenuRadioItem value="system">
- <Monitor className="h-4 w-4 mr-2" />
+ <Monitor className="mr-2 h-4 w-4" />
System
</DropdownMenuRadioItem>
</DropdownMenuRadioGroup>
diff --git a/components/ui/accordion.tsx b/components/ui/accordion.tsx
index e6a723d0..a1a600a6 100644
--- a/components/ui/accordion.tsx
+++ b/components/ui/accordion.tsx
@@ -1,10 +1,11 @@
-import * as React from "react"
-import * as AccordionPrimitive from "@radix-ui/react-accordion"
-import { ChevronDown } from "lucide-react"
+import * as React from "react";
-import { cn } from "@/lib/utils"
+import * as AccordionPrimitive from "@radix-ui/react-accordion";
+import { ChevronDown } from "lucide-react";
-const Accordion = AccordionPrimitive.Root
+import { cn } from "@/lib/utils";
+
+const Accordion = AccordionPrimitive.Root;
const AccordionItem = React.forwardRef<
React.ElementRef<typeof AccordionPrimitive.Item>,
@@ -15,8 +16,8 @@ const AccordionItem = React.forwardRef<
className={cn("border-b", className)}
{...props}
/>
-))
-AccordionItem.displayName = "AccordionItem"
+));
+AccordionItem.displayName = "AccordionItem";
const AccordionTrigger = React.forwardRef<
React.ElementRef<typeof AccordionPrimitive.Trigger>,
@@ -27,7 +28,7 @@ const AccordionTrigger = React.forwardRef<
ref={ref}
className={cn(
"flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",
- className
+ className,
)}
{...props}
>
@@ -35,8 +36,8 @@ const AccordionTrigger = React.forwardRef<
<ChevronDown className="h-4 w-4 shrink-0 transition-transform duration-200" />
</AccordionPrimitive.Trigger>
</AccordionPrimitive.Header>
-))
-AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName
+));
+AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
const AccordionContent = React.forwardRef<
React.ElementRef<typeof AccordionPrimitive.Content>,
@@ -49,8 +50,8 @@ const AccordionContent = React.forwardRef<
>
<div className={cn("pb-4 pt-0", className)}>{children}</div>
</AccordionPrimitive.Content>
-))
+));
-AccordionContent.displayName = AccordionPrimitive.Content.displayName
+AccordionContent.displayName = AccordionPrimitive.Content.displayName;
-export { Accordion, AccordionItem, AccordionTrigger, AccordionContent }
+export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
diff --git a/components/ui/avatar.tsx b/components/ui/avatar.tsx
index 7346b5eb..b4405a68 100644
--- a/components/ui/avatar.tsx
+++ b/components/ui/avatar.tsx
@@ -1,4 +1,5 @@
import * as React from "react";
+
import * as AvatarPrimitive from "@radix-ui/react-avatar";
import { cn } from "@/lib/utils";
diff --git a/components/ui/badge.tsx b/components/ui/badge.tsx
index f000e3ef..0ea1c88f 100644
--- a/components/ui/badge.tsx
+++ b/components/ui/badge.tsx
@@ -1,7 +1,8 @@
-import * as React from "react"
-import { cva, type VariantProps } from "class-variance-authority"
+import * as React from "react";
-import { cn } from "@/lib/utils"
+import { type VariantProps, cva } from "class-variance-authority";
+
+import { cn } from "@/lib/utils";
const badgeVariants = cva(
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
@@ -20,8 +21,8 @@ const badgeVariants = cva(
defaultVariants: {
variant: "default",
},
- }
-)
+ },
+);
export interface BadgeProps
extends React.HTMLAttributes<HTMLDivElement>,
@@ -30,7 +31,7 @@ export interface BadgeProps
function Badge({ className, variant, ...props }: BadgeProps) {
return (
<div className={cn(badgeVariants({ variant }), className)} {...props} />
- )
+ );
}
-export { Badge, badgeVariants }
+export { Badge, badgeVariants };
diff --git a/components/ui/breadcrumb.tsx b/components/ui/breadcrumb.tsx
index 71a5c325..ddc88b97 100644
--- a/components/ui/breadcrumb.tsx
+++ b/components/ui/breadcrumb.tsx
@@ -1,16 +1,17 @@
-import * as React from "react"
-import { Slot } from "@radix-ui/react-slot"
-import { ChevronRight, MoreHorizontal } from "lucide-react"
+import * as React from "react";
-import { cn } from "@/lib/utils"
+import { Slot } from "@radix-ui/react-slot";
+import { ChevronRight, MoreHorizontal } from "lucide-react";
+
+import { cn } from "@/lib/utils";
const Breadcrumb = React.forwardRef<
HTMLElement,
React.ComponentPropsWithoutRef<"nav"> & {
- separator?: React.ReactNode
+ separator?: React.ReactNode;
}
->(({ ...props }, ref) => <nav ref={ref} aria-label="breadcrumb" {...props} />)
-Breadcrumb.displayName = "Breadcrumb"
+>(({ ...props }, ref) => <nav ref={ref} aria-label="breadcrumb" {...props} />);
+Breadcrumb.displayName = "Breadcrumb";
const BreadcrumbList = React.forwardRef<
HTMLOListElement,
@@ -20,12 +21,12 @@ const BreadcrumbList = React.forwardRef<
ref={ref}
className={cn(
"flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",
- className
+ className,
)}
{...props}
/>
-))
-BreadcrumbList.displayName = "BreadcrumbList"
+));
+BreadcrumbList.displayName = "BreadcrumbList";
const BreadcrumbItem = React.forwardRef<
HTMLLIElement,
@@ -36,16 +37,16 @@ const BreadcrumbItem = React.forwardRef<
className={cn("inline-flex items-center gap-1.5", className)}
{...props}
/>
-))
-BreadcrumbItem.displayName = "BreadcrumbItem"
+));
+BreadcrumbItem.displayName = "BreadcrumbItem";
const BreadcrumbLink = React.forwardRef<
HTMLAnchorElement,
React.ComponentPropsWithoutRef<"a"> & {
- asChild?: boolean
+ asChild?: boolean;
}
>(({ asChild, className, ...props }, ref) => {
- const Comp = asChild ? Slot : "a"
+ const Comp = asChild ? Slot : "a";
return (
<Comp
@@ -53,9 +54,9 @@ const BreadcrumbLink = React.forwardRef<
className={cn("transition-colors hover:text-foreground", className)}
{...props}
/>
- )
-})
-BreadcrumbLink.displayName = "BreadcrumbLink"
+ );
+});
+BreadcrumbLink.displayName = "BreadcrumbLink";
const BreadcrumbPage = React.forwardRef<
HTMLSpanElement,
@@ -69,8 +70,8 @@ const BreadcrumbPage = React.forwardRef<
className={cn("font-normal text-foreground", className)}
{...props}
/>
-))
-BreadcrumbPage.displayName = "BreadcrumbPage"
+));
+BreadcrumbPage.displayName = "BreadcrumbPage";
const BreadcrumbSeparator = ({
children,
@@ -85,8 +86,8 @@ const BreadcrumbSeparator = ({
>
{children ?? <ChevronRight />}
</li>
-)
-BreadcrumbSeparator.displayName = "BreadcrumbSeparator"
+);
+BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
const BreadcrumbEllipsis = ({
className,
@@ -101,8 +102,8 @@ const BreadcrumbEllipsis = ({
<MoreHorizontal className="h-4 w-4" />
<span className="sr-only">More</span>
</span>
-)
-BreadcrumbEllipsis.displayName = "BreadcrumbElipssis"
+);
+BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
export {
Breadcrumb,
@@ -112,4 +113,4 @@ export {
BreadcrumbPage,
BreadcrumbSeparator,
BreadcrumbEllipsis,
-}
+};
diff --git a/components/ui/button.tsx b/components/ui/button.tsx
index 77e6d1d8..44e48eeb 100644
--- a/components/ui/button.tsx
+++ b/components/ui/button.tsx
@@ -1,8 +1,10 @@
import * as React from "react";
+
import { Slot } from "@radix-ui/react-slot";
-import { cva, type VariantProps } from "class-variance-authority";
+import { type VariantProps, cva } from "class-variance-authority";
import { cn } from "@/lib/utils";
+
import LoadingSpinner from "./loading-spinner";
const buttonVariants = cva(
@@ -13,7 +15,8 @@ const buttonVariants = cva(
default:
"bg-primary text-primary-foreground hover:bg-primary/90 transition-colors",
special: "text-white",
- orange: "bg-[#fb7a00] text-black hover:bg-[#fb7a00]/90 transition-colors",
+ orange:
+ "bg-[#fb7a00] text-black hover:bg-[#fb7a00]/90 transition-colors",
destructive:
"bg-destructive text-destructive-foreground hover:bg-destructive/90 transition-colors",
outline:
diff --git a/components/ui/card.tsx b/components/ui/card.tsx
index afa13ecf..dc3b01de 100644
--- a/components/ui/card.tsx
+++ b/components/ui/card.tsx
@@ -1,6 +1,6 @@
-import * as React from "react"
+import * as React from "react";
-import { cn } from "@/lib/utils"
+import { cn } from "@/lib/utils";
const Card = React.forwardRef<
HTMLDivElement,
@@ -10,12 +10,12 @@ const Card = React.forwardRef<
ref={ref}
className={cn(
"rounded-lg border bg-card text-card-foreground shadow-sm",
- className
+ className,
)}
{...props}
/>
-))
-Card.displayName = "Card"
+));
+Card.displayName = "Card";
const CardHeader = React.forwardRef<
HTMLDivElement,
@@ -26,8 +26,8 @@ const CardHeader = React.forwardRef<
className={cn("flex flex-col space-y-1.5 p-6", className)}
{...props}
/>
-))
-CardHeader.displayName = "CardHeader"
+));
+CardHeader.displayName = "CardHeader";
const CardTitle = React.forwardRef<
HTMLParagraphElement,
@@ -37,12 +37,12 @@ const CardTitle = React.forwardRef<
ref={ref}
className={cn(
"text-2xl font-semibold leading-none tracking-tight",
- className
+ className,
)}
{...props}
/>
-))
-CardTitle.displayName = "CardTitle"
+));
+CardTitle.displayName = "CardTitle";
const CardDescription = React.forwardRef<
HTMLParagraphElement,
@@ -53,16 +53,16 @@ const CardDescription = React.forwardRef<
className={cn("text-sm text-muted-foreground", className)}
{...props}
/>
-))
-CardDescription.displayName = "CardDescription"
+));
+CardDescription.displayName = "CardDescription";
const CardContent = React.forwardRef<
HTMLDivElement,
React.HTMLAttributes<HTMLDivElement>
>(({ className, ...props }, ref) => (
<div ref={ref} className={cn("p-6 pt-0", className)} {...props} />
-))
-CardContent.displayName = "CardContent"
+));
+CardContent.displayName = "CardContent";
const CardFooter = React.forwardRef<
HTMLDivElement,
@@ -73,7 +73,14 @@ const CardFooter = React.forwardRef<
className={cn("flex items-center p-6 pt-0", className)}
{...props}
/>
-))
-CardFooter.displayName = "CardFooter"
+));
+CardFooter.displayName = "CardFooter";
-export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }
+export {
+ Card,
+ CardHeader,
+ CardFooter,
+ CardTitle,
+ CardDescription,
+ CardContent,
+};
diff --git a/components/ui/checkbox.tsx b/components/ui/checkbox.tsx
index b929007b..70d798c4 100644
--- a/components/ui/checkbox.tsx
+++ b/components/ui/checkbox.tsx
@@ -1,7 +1,9 @@
"use client";
import * as React from "react";
+
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
+
import Check from "@/components/shared/icons/check";
import { cn } from "@/lib/utils";
@@ -14,7 +16,7 @@ const Checkbox = React.forwardRef<
ref={ref}
className={cn(
"peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
- className
+ className,
)}
{...props}
>
diff --git a/components/ui/collapsible.tsx b/components/ui/collapsible.tsx
index a23e7a28..5c28cbcc 100644
--- a/components/ui/collapsible.tsx
+++ b/components/ui/collapsible.tsx
@@ -1,9 +1,9 @@
-import * as CollapsiblePrimitive from "@radix-ui/react-collapsible"
+import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
-const Collapsible = CollapsiblePrimitive.Root
+const Collapsible = CollapsiblePrimitive.Root;
-const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger
+const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;
-const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent
+const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;
-export { Collapsible, CollapsibleTrigger, CollapsibleContent }
+export { Collapsible, CollapsibleTrigger, CollapsibleContent };
diff --git a/components/ui/command.tsx b/components/ui/command.tsx
index b515722d..4d1faad0 100644
--- a/components/ui/command.tsx
+++ b/components/ui/command.tsx
@@ -1,11 +1,13 @@
import * as React from "react";
+
import { type DialogProps } from "@radix-ui/react-dialog";
import { Command as CommandPrimitive } from "cmdk";
import { Search } from "lucide-react";
-import { cn } from "@/lib/utils";
import { Dialog, DialogContent } from "@/components/ui/dialog";
+import { cn } from "@/lib/utils";
+
const Command = React.forwardRef<
React.ElementRef<typeof CommandPrimitive>,
React.ComponentPropsWithoutRef<typeof CommandPrimitive>
diff --git a/components/ui/dialog.tsx b/components/ui/dialog.tsx
index 283ca28b..4788deb7 100644
--- a/components/ui/dialog.tsx
+++ b/components/ui/dialog.tsx
@@ -1,7 +1,9 @@
"use client";
import * as React from "react";
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
+
import X from "@/components/shared/icons/x";
import { cn } from "@/lib/utils";
@@ -48,7 +50,7 @@ const DialogContent = React.forwardRef<
<DialogPrimitive.Content
ref={ref}
className={cn(
- "fixed z-50 grid w-full md:w-1/2 gap-4 rounded-t-lg border border-gray-800 bg-background p-6 shadow-lg animate-in data-[state=open]:fade-in-90 data-[state=open]:slide-in-from-bottom-10 sm:max-w-xl sm:rounded-lg sm:zoom-in-90 data-[state=open]:sm:slide-in-from-bottom-0",
+ "fixed z-50 grid w-full gap-4 rounded-t-lg border border-gray-800 bg-background p-6 shadow-lg animate-in data-[state=open]:fade-in-90 data-[state=open]:slide-in-from-bottom-10 sm:max-w-xl sm:rounded-lg sm:zoom-in-90 data-[state=open]:sm:slide-in-from-bottom-0 md:w-1/2",
className,
)}
{...props}
diff --git a/components/ui/dropdown-menu.tsx b/components/ui/dropdown-menu.tsx
index 04a330e1..16d40610 100644
--- a/components/ui/dropdown-menu.tsx
+++ b/components/ui/dropdown-menu.tsx
@@ -1,7 +1,9 @@
"use client";
import * as React from "react";
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
+
import Check from "@/components/shared/icons/check";
import ChevronRight from "@/components/shared/icons/chevron-right";
import Circle from "@/components/shared/icons/circle";
@@ -31,7 +33,7 @@ const DropdownMenuSubTrigger = React.forwardRef<
className={cn(
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
inset && "pl-8",
- className
+ className,
)}
{...props}
>
@@ -50,7 +52,7 @@ const DropdownMenuSubContent = React.forwardRef<
ref={ref}
className={cn(
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
- className
+ className,
)}
{...props}
/>
@@ -68,7 +70,7 @@ const DropdownMenuContent = React.forwardRef<
sideOffset={sideOffset}
className={cn(
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
- className
+ className,
)}
{...props}
/>
@@ -87,7 +89,7 @@ const DropdownMenuItem = React.forwardRef<
className={cn(
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
inset && "pl-8",
- className
+ className,
)}
{...props}
/>
@@ -102,7 +104,7 @@ const DropdownMenuCheckboxItem = React.forwardRef<
ref={ref}
className={cn(
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
- className
+ className,
)}
checked={checked}
{...props}
@@ -126,7 +128,7 @@ const DropdownMenuRadioItem = React.forwardRef<
ref={ref}
className={cn(
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
- className
+ className,
)}
{...props}
>
@@ -151,7 +153,7 @@ const DropdownMenuLabel = React.forwardRef<
className={cn(
"px-2 py-1.5 text-sm font-semibold",
inset && "pl-8",
- className
+ className,
)}
{...props}
/>
diff --git a/components/ui/gauge.tsx b/components/ui/gauge.tsx
index 8560cbfb..89e2740f 100644
--- a/components/ui/gauge.tsx
+++ b/components/ui/gauge.tsx
@@ -32,7 +32,7 @@ export const Gauge = ({
};
return (
- <div className="flex flex-col items-center justify-center relative">
+ <div className="relative flex flex-col items-center justify-center">
<svg
fill="none"
shapeRendering="crispEdges"
@@ -40,7 +40,7 @@ export const Gauge = ({
width={sizes[size].width}
viewBox="0 0 120 120"
strokeWidth="2"
- className="transform -rotate-90"
+ className="-rotate-90 transform"
>
<circle
className="text-gray-200 dark:text-gray-800"
@@ -53,7 +53,7 @@ export const Gauge = ({
cy="60"
/>
<circle
- className="text-emerald-500 animate-gauge_fill"
+ className="animate-gauge_fill text-emerald-500"
strokeWidth="12"
strokeDasharray={strokeDasharray}
strokeDashoffset={initialOffset}
@@ -71,7 +71,7 @@ export const Gauge = ({
/>
</svg>
{showValue ? (
- <div className="absolute flex opacity-0 animate-gauge_fadeIn">
+ <div className="absolute flex animate-gauge_fadeIn opacity-0">
<p className={`text-foreground ${sizes[size].textSize}`}>{value}</p>
</div>
) : null}
diff --git a/components/ui/label.tsx b/components/ui/label.tsx
index 683faa79..aee72180 100644
--- a/components/ui/label.tsx
+++ b/components/ui/label.tsx
@@ -1,12 +1,13 @@
-import * as React from "react"
-import * as LabelPrimitive from "@radix-ui/react-label"
-import { cva, type VariantProps } from "class-variance-authority"
+import * as React from "react";
-import { cn } from "@/lib/utils"
+import * as LabelPrimitive from "@radix-ui/react-label";
+import { type VariantProps, cva } from "class-variance-authority";
+
+import { cn } from "@/lib/utils";
const labelVariants = cva(
- "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
-)
+ "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
+);
const Label = React.forwardRef<
React.ElementRef<typeof LabelPrimitive.Root>,
@@ -18,7 +19,7 @@ const Label = React.forwardRef<
className={cn(labelVariants(), className)}
{...props}
/>
-))
-Label.displayName = LabelPrimitive.Root.displayName
+));
+Label.displayName = LabelPrimitive.Root.displayName;
-export { Label }
+export { Label };
diff --git a/components/ui/loading-spinner.tsx b/components/ui/loading-spinner.tsx
index 70295424..f2dce747 100644
--- a/components/ui/loading-spinner.tsx
+++ b/components/ui/loading-spinner.tsx
@@ -1,4 +1,5 @@
import { cn } from "@/lib/utils";
+
import styles from "./loading-spinner.module.css";
export default function LoadingSpinner({ className }: { className?: string }) {
diff --git a/components/ui/nextra-filetree.tsx b/components/ui/nextra-filetree.tsx
index d23765b9..2bd402f7 100644
--- a/components/ui/nextra-filetree.tsx
+++ b/components/ui/nextra-filetree.tsx
@@ -3,12 +3,9 @@
* https://github.com/shuding/nextra/blob/main/packages/nextra/src/components/file-tree.tsx
*
*/
-
-import { cn } from "@/lib/utils";
import { createContext, memo, useCallback, useContext, useState } from "react";
import type { ReactElement, ReactNode } from "react";
-import ChevronDown from "../shared/icons/chevron-down";
-import ChevronRight from "../shared/icons/chevron-right";
+
import {
FileIcon,
FolderClosedIcon,
@@ -16,6 +13,11 @@ import {
FolderOpenIcon,
} from "lucide-react";
+import { cn } from "@/lib/utils";
+
+import ChevronDown from "../shared/icons/chevron-down";
+import ChevronRight from "../shared/icons/chevron-right";
+
const ctx = createContext(0);
function useIndent() {
@@ -42,7 +44,7 @@ interface FileProps {
function Tree({ children }: { children: ReactNode }): ReactElement {
return (
- <div className={cn("nextra-filetree w-full select-none text-sm !mt-0")}>
+ <div className={cn("nextra-filetree !mt-0 w-full select-none text-sm")}>
<div className="block rounded-lg">{children}</div>
</div>
);
@@ -81,21 +83,21 @@ const Folder = memo<FolderProps>(
const isFolderOpen = open === undefined ? isOpen : open;
return (
- <li className="flex list-none flex-col w-full">
+ <li className="flex w-full list-none flex-col">
<button
onClick={toggle}
title={name}
className={cn(
- "inline-flex cursor-pointer items-center w-full",
- "text-foreground hover:bg-gray-200 hover:dark:bg-muted duration-100 rounded-md",
+ "inline-flex w-full cursor-pointer items-center",
+ "rounded-md text-foreground duration-100 hover:bg-gray-200 hover:dark:bg-muted",
"px-3 py-1.5 leading-6",
- active && "bg-gray-200 dark:bg-muted font-semibold",
+ active && "bg-gray-200 font-semibold dark:bg-muted",
)}
>
<Ident />
<ChevronRight
className={cn(
- "h-4 w-4 shrink-0 transition-transform duration-150 chevron mr-1",
+ "chevron mr-1 h-4 w-4 shrink-0 transition-transform duration-150",
isFolderOpen && "rotate-90",
)}
/>
@@ -145,13 +147,13 @@ const File = memo<FileProps>(({ label, name, active, onToggle }) => {
<li
className={cn(
"flex list-none",
- "text-foreground hover:bg-gray-200 hover:dark:bg-muted duration-100 rounded-md",
+ "rounded-md text-foreground duration-100 hover:bg-gray-200 hover:dark:bg-muted",
"px-3 py-1.5 leading-6",
- active && "bg-gray-200 dark:bg-muted font-semibold",
+ active && "bg-gray-200 font-semibold dark:bg-muted",
)}
>
<span
- className="inline-flex cursor-default items-center ml-5"
+ className="ml-5 inline-flex cursor-default items-center"
onClick={toggle}
>
<Ident />
diff --git a/components/ui/pagination.tsx b/components/ui/pagination.tsx
index d13638bf..8a63bffc 100644
--- a/components/ui/pagination.tsx
+++ b/components/ui/pagination.tsx
@@ -1,9 +1,11 @@
import * as React from "react";
+
import { ChevronLeft, ChevronRight, MoreHorizontal } from "lucide-react";
-import { cn } from "@/lib/utils";
import { ButtonProps, buttonVariants } from "@/components/ui/button";
+import { cn } from "@/lib/utils";
+
const Pagination = ({ className, ...props }: React.ComponentProps<"nav">) => (
<nav
role="navigation"
diff --git a/components/ui/phone-input.tsx b/components/ui/phone-input.tsx
index 6d3b7f75..e6e28f1a 100644
--- a/components/ui/phone-input.tsx
+++ b/components/ui/phone-input.tsx
@@ -1,9 +1,7 @@
-import { CheckIcon, ChevronsUpDown } from "lucide-react";
-
import * as React from "react";
+import { CheckIcon, ChevronsUpDown } from "lucide-react";
import * as RPNInput from "react-phone-number-input";
-
import flags from "react-phone-number-input/flags";
import { Button } from "@/components/ui/button";
@@ -23,6 +21,7 @@ import {
} from "@/components/ui/popover";
import { cn } from "@/lib/utils";
+
import { ScrollArea } from "./scroll-area";
type PhoneInputProps = Omit<
@@ -132,7 +131,7 @@ const CountrySelect = ({
/>
<span className="flex-1 text-sm">{option.label}</span>
{option.value && (
- <span className="text-foreground/50 text-sm">
+ <span className="text-sm text-foreground/50">
{`+${RPNInput.getCountryCallingCode(option.value)}`}
</span>
)}
@@ -157,7 +156,7 @@ const FlagComponent = ({ country, countryName }: RPNInput.FlagProps) => {
const Flag = flags[country];
return (
- <span className="bg-foreground/20 flex h-4 w-6 overflow-hidden rounded-sm">
+ <span className="flex h-4 w-6 overflow-hidden rounded-sm bg-foreground/20">
{Flag && <Flag title={countryName} />}
</span>
);
diff --git a/components/ui/popover.tsx b/components/ui/popover.tsx
index bbba7e0e..f3d96de6 100644
--- a/components/ui/popover.tsx
+++ b/components/ui/popover.tsx
@@ -1,11 +1,12 @@
-import * as React from "react"
-import * as PopoverPrimitive from "@radix-ui/react-popover"
+import * as React from "react";
-import { cn } from "@/lib/utils"
+import * as PopoverPrimitive from "@radix-ui/react-popover";
-const Popover = PopoverPrimitive.Root
+import { cn } from "@/lib/utils";
-const PopoverTrigger = PopoverPrimitive.Trigger
+const Popover = PopoverPrimitive.Root;
+
+const PopoverTrigger = PopoverPrimitive.Trigger;
const PopoverContent = React.forwardRef<
React.ElementRef<typeof PopoverPrimitive.Content>,
@@ -18,12 +19,12 @@ const PopoverContent = React.forwardRef<
sideOffset={sideOffset}
className={cn(
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
- className
+ className,
)}
{...props}
/>
</PopoverPrimitive.Portal>
-))
-PopoverContent.displayName = PopoverPrimitive.Content.displayName
+));
+PopoverContent.displayName = PopoverPrimitive.Content.displayName;
-export { Popover, PopoverTrigger, PopoverContent }
+export { Popover, PopoverTrigger, PopoverContent };
diff --git a/components/ui/progress.tsx b/components/ui/progress.tsx
index 9963360c..4b26873f 100644
--- a/components/ui/progress.tsx
+++ b/components/ui/progress.tsx
@@ -1,8 +1,9 @@
import * as React from "react";
+
import * as ProgressPrimitive from "@radix-ui/react-progress";
+import { HelpCircleIcon } from "lucide-react";
import { cn } from "@/lib/utils";
-import { HelpCircleIcon } from "lucide-react";
const Progress = React.forwardRef<
React.ElementRef<typeof ProgressPrimitive.Root>,
@@ -30,8 +31,8 @@ const Progress = React.forwardRef<
style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
/>
{text && !error ? (
- <div className="absolute inset-0 flex py-2 items-center justify-center">
- <div className="overflow-hidden absolute inset-0 flex items-center justify-center">
+ <div className="absolute inset-0 flex items-center justify-center py-2">
+ <div className="absolute inset-0 flex items-center justify-center overflow-hidden">
<span className="text-xs text-foreground">{text}</span>
</div>
<div
@@ -43,8 +44,8 @@ const Progress = React.forwardRef<
</div>
) : null}
{text && error ? (
- <div className="absolute inset-0 flex py-2 items-center justify-center">
- <div className="overflow-hidden absolute inset-0 flex items-center justify-center gap-x-2 bg-destructive text-destructive-foreground">
+ <div className="absolute inset-0 flex items-center justify-center py-2">
+ <div className="absolute inset-0 flex items-center justify-center gap-x-2 overflow-hidden bg-destructive text-destructive-foreground">
<span className="text-xs">{text}</span>
<a href="mailto:[email protected]" title="Contact Support">
<HelpCircleIcon className="size-4" />
diff --git a/components/ui/scroll-area.tsx b/components/ui/scroll-area.tsx
index de123fc9..1aaa811c 100644
--- a/components/ui/scroll-area.tsx
+++ b/components/ui/scroll-area.tsx
@@ -1,4 +1,5 @@
import * as React from "react";
+
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
import { cn } from "@/lib/utils";
diff --git a/components/ui/select.tsx b/components/ui/select.tsx
index 952e1f9e..f65c473d 100644
--- a/components/ui/select.tsx
+++ b/components/ui/select.tsx
@@ -1,16 +1,17 @@
-import * as React from "react"
-import * as SelectPrimitive from "@radix-ui/react-select"
+import * as React from "react";
+import * as SelectPrimitive from "@radix-ui/react-select";
-import { cn } from "@/lib/utils"
-import Check from "../shared/icons/check"
-import ChevronDown from "../shared/icons/chevron-down"
+import { cn } from "@/lib/utils";
-const Select = SelectPrimitive.Root
+import Check from "../shared/icons/check";
+import ChevronDown from "../shared/icons/chevron-down";
-const SelectGroup = SelectPrimitive.Group
+const Select = SelectPrimitive.Root;
-const SelectValue = SelectPrimitive.Value
+const SelectGroup = SelectPrimitive.Group;
+
+const SelectValue = SelectPrimitive.Value;
const SelectTrigger = React.forwardRef<
React.ElementRef<typeof SelectPrimitive.Trigger>,
@@ -20,7 +21,7 @@ const SelectTrigger = React.forwardRef<
ref={ref}
className={cn(
"flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
- className
+ className,
)}
{...props}
>
@@ -29,8 +30,8 @@ const SelectTrigger = React.forwardRef<
<ChevronDown className="h-4 w-4 opacity-50" />
</SelectPrimitive.Icon>
</SelectPrimitive.Trigger>
-))
-SelectTrigger.displayName = SelectPrimitive.Trigger.displayName
+));
+SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
const SelectContent = React.forwardRef<
React.ElementRef<typeof SelectPrimitive.Content>,
@@ -43,7 +44,7 @@ const SelectContent = React.forwardRef<
"relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
position === "popper" &&
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
- className
+ className,
)}
position={position}
{...props}
@@ -52,15 +53,15 @@ const SelectContent = React.forwardRef<
className={cn(
"p-1",
position === "popper" &&
- "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
+ "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]",
)}
>
{children}
</SelectPrimitive.Viewport>
</SelectPrimitive.Content>
</SelectPrimitive.Portal>
-))
-SelectContent.displayName = SelectPrimitive.Content.displayName
+));
+SelectContent.displayName = SelectPrimitive.Content.displayName;
const SelectLabel = React.forwardRef<
React.ElementRef<typeof SelectPrimitive.Label>,
@@ -71,8 +72,8 @@ const SelectLabel = React.forwardRef<
className={cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className)}
{...props}
/>
-))
-SelectLabel.displayName = SelectPrimitive.Label.displayName
+));
+SelectLabel.displayName = SelectPrimitive.Label.displayName;
const SelectItem = React.forwardRef<
React.ElementRef<typeof SelectPrimitive.Item>,
@@ -82,7 +83,7 @@ const SelectItem = React.forwardRef<
ref={ref}
className={cn(
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
- className
+ className,
)}
{...props}
>
@@ -94,8 +95,8 @@ const SelectItem = React.forwardRef<
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
</SelectPrimitive.Item>
-))
-SelectItem.displayName = SelectPrimitive.Item.displayName
+));
+SelectItem.displayName = SelectPrimitive.Item.displayName;
const SelectSeparator = React.forwardRef<
React.ElementRef<typeof SelectPrimitive.Separator>,
@@ -106,8 +107,8 @@ const SelectSeparator = React.forwardRef<
className={cn("-mx-1 my-1 h-px bg-muted", className)}
{...props}
/>
-))
-SelectSeparator.displayName = SelectPrimitive.Separator.displayName
+));
+SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
export {
Select,
@@ -118,4 +119,4 @@ export {
SelectLabel,
SelectItem,
SelectSeparator,
-}
+};
diff --git a/components/ui/separator.tsx b/components/ui/separator.tsx
index 5b6774dc..6861a12c 100644
--- a/components/ui/separator.tsx
+++ b/components/ui/separator.tsx
@@ -1,6 +1,7 @@
"use client";
import * as React from "react";
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
import { cn } from "@/lib/utils";
@@ -11,7 +12,7 @@ const Separator = React.forwardRef<
>(
(
{ className, orientation = "horizontal", decorative = true, ...props },
- ref
+ ref,
) => (
<SeparatorPrimitive.Root
ref={ref}
@@ -20,11 +21,11 @@ const Separator = React.forwardRef<
className={cn(
"shrink-0 bg-border",
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
- className
+ className,
)}
{...props}
/>
- )
+ ),
);
Separator.displayName = SeparatorPrimitive.Root.displayName;
diff --git a/components/ui/sheet.tsx b/components/ui/sheet.tsx
index ae353cb7..54d9d691 100644
--- a/components/ui/sheet.tsx
+++ b/components/ui/sheet.tsx
@@ -1,8 +1,10 @@
"use client";
import * as React from "react";
+
import * as SheetPrimitive from "@radix-ui/react-dialog";
-import { cva, type VariantProps } from "class-variance-authority";
+import { type VariantProps, cva } from "class-variance-authority";
+
import X from "@/components/shared/icons/x";
import { cn } from "@/lib/utils";
diff --git a/components/ui/skeleton.tsx b/components/ui/skeleton.tsx
index cb0d427f..c07672e3 100644
--- a/components/ui/skeleton.tsx
+++ b/components/ui/skeleton.tsx
@@ -1,4 +1,4 @@
-import { cn } from "@/lib/utils"
+import { cn } from "@/lib/utils";
function Skeleton({
className,
@@ -15,4 +15,4 @@ function Skeleton({
);
}
-export { Skeleton }
+export { Skeleton };
diff --git a/components/ui/switch.tsx b/components/ui/switch.tsx
index 7693ab07..99c4e93c 100644
--- a/components/ui/switch.tsx
+++ b/components/ui/switch.tsx
@@ -1,6 +1,7 @@
"use client";
import * as React from "react";
+
import * as SwitchPrimitives from "@radix-ui/react-switch";
import { cn } from "@/lib/utils";
@@ -12,14 +13,14 @@ const Switch = React.forwardRef<
<SwitchPrimitives.Root
className={cn(
"peer inline-flex h-[24px] w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
- className
+ className,
)}
{...props}
ref={ref}
>
<SwitchPrimitives.Thumb
className={cn(
- "pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
+ "pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",
)}
/>
</SwitchPrimitives.Root>
diff --git a/components/ui/table.tsx b/components/ui/table.tsx
index 34b1da02..71b086a0 100644
--- a/components/ui/table.tsx
+++ b/components/ui/table.tsx
@@ -56,7 +56,7 @@ const TableRow = React.forwardRef<
ref={ref}
className={cn(
"border-b transition-colors hover:bg-gray-100 data-[state=selected]:bg-gray-100 hover:dark:bg-muted/50 data-[state=selected]:dark:bg-muted",
- className
+ className,
)}
{...props}
/>
@@ -71,7 +71,7 @@ const TableHead = React.forwardRef<
ref={ref}
className={cn(
"h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
- className
+ className,
)}
{...props}
/>
diff --git a/components/ui/tabs.tsx b/components/ui/tabs.tsx
index f57fffdb..cfc53231 100644
--- a/components/ui/tabs.tsx
+++ b/components/ui/tabs.tsx
@@ -1,9 +1,10 @@
-import * as React from "react"
-import * as TabsPrimitive from "@radix-ui/react-tabs"
+import * as React from "react";
-import { cn } from "@/lib/utils"
+import * as TabsPrimitive from "@radix-ui/react-tabs";
-const Tabs = TabsPrimitive.Root
+import { cn } from "@/lib/utils";
+
+const Tabs = TabsPrimitive.Root;
const TabsList = React.forwardRef<
React.ElementRef<typeof TabsPrimitive.List>,
@@ -13,12 +14,12 @@ const TabsList = React.forwardRef<
ref={ref}
className={cn(
"inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",
- className
+ className,
)}
{...props}
/>
-))
-TabsList.displayName = TabsPrimitive.List.displayName
+));
+TabsList.displayName = TabsPrimitive.List.displayName;
const TabsTrigger = React.forwardRef<
React.ElementRef<typeof TabsPrimitive.Trigger>,
@@ -28,12 +29,12 @@ const TabsTrigger = React.forwardRef<
ref={ref}
className={cn(
"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",
- className
+ className,
)}
{...props}
/>
-))
-TabsTrigger.displayName = TabsPrimitive.Trigger.displayName
+));
+TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
const TabsContent = React.forwardRef<
React.ElementRef<typeof TabsPrimitive.Content>,
@@ -43,11 +44,11 @@ const TabsContent = React.forwardRef<
ref={ref}
className={cn(
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
- className
+ className,
)}
{...props}
/>
-))
-TabsContent.displayName = TabsPrimitive.Content.displayName
+));
+TabsContent.displayName = TabsPrimitive.Content.displayName;
-export { Tabs, TabsList, TabsTrigger, TabsContent }
+export { Tabs, TabsList, TabsTrigger, TabsContent };
diff --git a/components/ui/textarea.tsx b/components/ui/textarea.tsx
index 9f9a6dc5..9f005734 100644
--- a/components/ui/textarea.tsx
+++ b/components/ui/textarea.tsx
@@ -1,6 +1,6 @@
-import * as React from "react"
+import * as React from "react";
-import { cn } from "@/lib/utils"
+import { cn } from "@/lib/utils";
export interface TextareaProps
extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {}
@@ -11,14 +11,14 @@ const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
<textarea
className={cn(
"flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
- className
+ className,
)}
ref={ref}
{...props}
/>
- )
- }
-)
-Textarea.displayName = "Textarea"
+ );
+ },
+);
+Textarea.displayName = "Textarea";
-export { Textarea }
+export { Textarea };
diff --git a/components/ui/tooltip.tsx b/components/ui/tooltip.tsx
index 19e4483c..8a2e0f27 100644
--- a/components/ui/tooltip.tsx
+++ b/components/ui/tooltip.tsx
@@ -1,4 +1,5 @@
import * as React from "react";
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
import { cn } from "@/lib/utils";
diff --git a/components/view/DataroomViewer.tsx b/components/view/DataroomViewer.tsx
index 44f9802a..7b1dc9a6 100644
--- a/components/view/DataroomViewer.tsx
+++ b/components/view/DataroomViewer.tsx
@@ -1,10 +1,15 @@
-import { Brand, Dataroom, DataroomBrand, DataroomFolder } from "@prisma/client";
-import Nav from "./nav";
-import { Button } from "../ui/button";
-import FolderCard from "./dataroom/folder-card";
-import DocumentCard from "./dataroom/document-card";
+import Link from "next/link";
+
import { useState } from "react";
-import { ScrollArea } from "../ui/scroll-area";
+import React from "react";
+
+import { Brand, Dataroom, DataroomBrand, DataroomFolder } from "@prisma/client";
+import * as SheetPrimitive from "@radix-ui/react-dialog";
+import { MenuIcon, PanelLeftIcon, XIcon } from "lucide-react";
+
+import { cn } from "@/lib/utils";
+
+import { ViewFolderTree } from "../datarooms/folders";
import {
Breadcrumb,
BreadcrumbItem,
@@ -13,11 +18,9 @@ import {
BreadcrumbPage,
BreadcrumbSeparator,
} from "../ui/breadcrumb";
-import Link from "next/link";
-import DataroomNav from "./dataroom/nav-dataroom";
+import { Button } from "../ui/button";
import { FileTree } from "../ui/nextra-filetree";
-import { ViewFolderTree } from "../datarooms/folders";
-import React from "react";
+import { ScrollArea } from "../ui/scroll-area";
import {
Sheet,
SheetContent,
@@ -25,9 +28,10 @@ import {
SheetPortal,
SheetTrigger,
} from "../ui/sheet";
-import { MenuIcon, PanelLeftIcon, XIcon } from "lucide-react";
-import * as SheetPrimitive from "@radix-ui/react-dialog";
-import { cn } from "@/lib/utils";
+import DocumentCard from "./dataroom/document-card";
+import FolderCard from "./dataroom/folder-card";
+import DataroomNav from "./dataroom/nav-dataroom";
+import Nav from "./nav";
type DataroomDocument = {
dataroomDocumentId: string;
@@ -80,11 +84,11 @@ export default function DataroomViewer({
<DataroomNav brand={brand} viewId={viewId} dataroom={dataroom} />
<div
style={{ height: "calc(100vh - 64px)" }}
- className="flex items-center relative bg-white dark:bg-black"
+ className="relative flex items-center bg-white dark:bg-black"
>
- <div className="flex items-start justify-center mx-auto relative h-full w-full">
+ <div className="relative mx-auto flex h-full w-full items-start justify-center">
{/* Tree view */}
- <div className="hidden md:flex h-full overflow-auto md:mx-5 lg:mx-7 xl:mx-10 mt-4 md:mt-5 lg:mt-8 mb-10 space-y-8 py-3 w-1/4 ">
+ <div className="mb-10 mt-4 hidden h-full w-1/4 space-y-8 overflow-auto py-3 md:mx-5 md:mt-5 md:flex lg:mx-7 lg:mt-8 xl:mx-10 ">
<ViewFolderTree
folders={folders}
documents={documents}
@@ -94,14 +98,14 @@ export default function DataroomViewer({
</div>
{/* Detail view */}
- <ScrollArea className="flex-grow h-full" showScrollbar>
- <div className="md:mx-5 lg:mx-7 xl:mx-10 mt-4 md:mt-5 lg:mt-8 mb-10 space-y-8 p-3">
+ <ScrollArea className="h-full flex-grow" showScrollbar>
+ <div className="mb-10 mt-4 space-y-8 p-3 md:mx-5 md:mt-5 lg:mx-7 lg:mt-8 xl:mx-10">
<div className="flex items-center gap-x-2">
{/* sidebar for mobile */}
<div className="flex md:hidden">
<Sheet>
<SheetTrigger asChild>
- <button className="text-muted-foreground lg:hidden hover:text-black">
+ <button className="text-muted-foreground hover:text-black lg:hidden">
<PanelLeftIcon className="h-5 w-5" aria-hidden="true" />
</button>
</SheetTrigger>
@@ -109,12 +113,12 @@ export default function DataroomViewer({
<SheetOverlay className="fixed top-[35dvh] z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0" />
<SheetPrimitive.Content
className={cn(
- "fixed top-[35dvh] 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",
+ "fixed top-[35dvh] z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",
"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-lg",
- "w-[280px] sm:w-[300px] lg:hidden p-0 m-0",
+ "m-0 w-[280px] p-0 sm:w-[300px] lg:hidden",
)}
>
- <div className="h-full overflow-auto mt-8 space-y-8 py-3 px-2">
+ <div className="mt-8 h-full space-y-8 overflow-auto px-2 py-3">
<ViewFolderTree
folders={folders}
documents={documents}
diff --git a/components/view/PDFViewer.tsx b/components/view/PDFViewer.tsx
index 6948f5b4..6759136d 100644
--- a/components/view/PDFViewer.tsx
+++ b/components/view/PDFViewer.tsx
@@ -1,7 +1,9 @@
-import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
import { useEffect, useRef, useState } from "react";
-import { Document, Page, pdfjs } from "react-pdf";
+
import { useTeam } from "@/context/team-context";
+import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
+import { Document, Page, pdfjs } from "react-pdf";
+
import Nav from "./nav";
pdfjs.GlobalWorkerOptions.workerSrc = `//cdnjs.cloudflare.com/ajax/libs/pdf.js/${pdfjs.version}/pdf.worker.js`;
@@ -174,12 +176,12 @@ export default function PDFViewer(props: any) {
className="flex items-center"
>
<div
- className={`flex items-center justify-between w-full absolute z-10 px-2`}
+ className={`absolute z-10 flex w-full items-center justify-between px-2`}
>
<button
onClick={goToPreviousPage}
disabled={pageNumber <= 1}
- className="relative h-[calc(100vh - 64px)] px-2 py-24 text-gray-400 hover:text-gray-50 focus:z-20"
+ className="h-[calc(100vh - 64px)] relative px-2 py-24 text-gray-400 hover:text-gray-50 focus:z-20"
>
<span className="sr-only">Previous</span>
<ChevronLeftIcon className="h-10 w-10" aria-hidden="true" />
@@ -187,14 +189,14 @@ export default function PDFViewer(props: any) {
<button
onClick={goToNextPage}
disabled={pageNumber >= numPages!}
- className="relative h-[calc(100vh - 64px)] px-2 py-24 text-gray-400 hover:text-gray-50 focus:z-20"
+ className="h-[calc(100vh - 64px)] relative px-2 py-24 text-gray-400 hover:text-gray-50 focus:z-20"
>
<span className="sr-only">Next</span>
<ChevronRightIcon className="h-10 w-10" aria-hidden="true" />
</button>
</div>
- <div className="h-full flex justify-center mx-auto">
+ <div className="mx-auto flex h-full justify-center">
<Document
file={props.file}
onLoadSuccess={onDocumentLoadSuccess}
diff --git a/components/view/PagesViewer.tsx b/components/view/PagesViewer.tsx
index ad4ab392..ab78c157 100644
--- a/components/view/PagesViewer.tsx
+++ b/components/view/PagesViewer.tsx
@@ -1,17 +1,22 @@
-import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
-import { useEffect, useRef, useState } from "react";
import Image from "next/image";
-import LoadingSpinner from "@/components/ui/loading-spinner";
+import { useRouter } from "next/router";
+
+import { useEffect, useRef, useState } from "react";
+
import BlankImg from "@/public/_static/blank.gif";
-import Nav from "./nav";
-import Toolbar from "./toolbar";
import { Brand, DataroomBrand } from "@prisma/client";
-import { useRouter } from "next/router";
-import { PoweredBy } from "./powered-by";
-import Question from "./question";
+import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
+import { toast } from "sonner";
+
+import LoadingSpinner from "@/components/ui/loading-spinner";
+
import { cn } from "@/lib/utils";
+
import { ScreenProtector } from "./ScreenProtection";
-import { toast } from "sonner";
+import Nav from "./nav";
+import { PoweredBy } from "./powered-by";
+import Question from "./question";
+import Toolbar from "./toolbar";
const DEFAULT_PRELOADED_IMAGES_NUM = 5;
@@ -236,18 +241,18 @@ export default function PagesViewer({
/>
<div
style={{ height: "calc(100vh - 64px)" }}
- className="flex items-center relative"
+ className="relative flex items-center"
>
<button
onClick={goToPreviousPage}
disabled={pageNumber == 1}
className={cn(
- "absolute left-0 h-[calc(100vh - 64px)] px-2 py-24 z-20",
+ "h-[calc(100vh - 64px)] absolute left-0 z-20 px-2 py-24",
pageNumber == 1 && "hidden",
)}
>
<span className="sr-only">Previous</span>
- <div className="bg-gray-950/50 hover:bg-gray-950/75 rounded-full relative flex items-center justify-center p-1">
+ <div className="relative flex items-center justify-center rounded-full bg-gray-950/50 p-1 hover:bg-gray-950/75">
<ChevronLeftIcon
className="h-10 w-10 text-white"
aria-hidden="true"
@@ -258,12 +263,12 @@ export default function PagesViewer({
onClick={goToNextPage}
disabled={pageNumber >= numPagesWithFeedback}
className={cn(
- "absolute right-0 h-[calc(100vh - 64px)] px-2 py-24 z-20",
+ "h-[calc(100vh - 64px)] absolute right-0 z-20 px-2 py-24",
pageNumber >= numPagesWithFeedback && "hidden",
)}
>
<span className="sr-only">Next</span>
- <div className="bg-gray-950/50 hover:bg-gray-950/75 rounded-full relative flex items-center justify-center p-1">
+ <div className="relative flex items-center justify-center rounded-full bg-gray-950/50 p-1 hover:bg-gray-950/75">
<ChevronRightIcon
className="h-10 w-10 text-white"
aria-hidden="true"
@@ -272,7 +277,7 @@ export default function PagesViewer({
</button>
<div
- className="flex justify-center mx-auto relative h-full w-full"
+ className="relative mx-auto flex h-full w-full justify-center"
onContextMenu={handleContextMenu}
>
{pageNumber <= numPages &&
@@ -283,7 +288,7 @@ export default function PagesViewer({
return (
<img
key={index}
- className={`object-contain mx-auto ${
+ className={`mx-auto object-contain ${
pageNumber - 1 === index ? "block" : "hidden"
}`}
src={
@@ -300,7 +305,7 @@ export default function PagesViewer({
return (
<Image
key={index}
- className={`object-contain mx-auto ${
+ className={`mx-auto object-contain ${
pageNumber - 1 === index ? "block" : "hidden"
}`}
src={loadedImages[index] ? page.file : BlankImg}
@@ -316,7 +321,7 @@ export default function PagesViewer({
<LoadingSpinner className="h-20 w-20 text-foreground" />
))}
{enableQuestion && feedback && pageNumber === numPagesWithFeedback ? (
- <div className="flex items-center justify-center w-full">
+ <div className="flex w-full items-center justify-center">
<Question
feedback={feedback}
viewId={viewId}
diff --git a/components/view/ScreenProtection.tsx b/components/view/ScreenProtection.tsx
index 5593ebfc..db634b50 100644
--- a/components/view/ScreenProtection.tsx
+++ b/components/view/ScreenProtection.tsx
@@ -1,7 +1,9 @@
import { useState } from "react";
+
+import { XOctagonIcon } from "lucide-react";
import { useHotkeys } from "react-hotkeys-hook";
+
import { Button } from "@/components/ui/button";
-import { XOctagonIcon } from "lucide-react";
export const ScreenProtector = () => {
const [blockScreen, setBlockScreen] = useState<boolean>(false);
@@ -14,7 +16,7 @@ export const ScreenProtector = () => {
if (blockScreen) {
return (
- <div className="absolute bg-white inset-0 w-screen h-screen flex items-center justify-center z-50">
+ <div className="absolute inset-0 z-50 flex h-screen w-screen items-center justify-center bg-white">
<div className="flex flex-col gap-4">
<div className="flex gap-2">
<XOctagonIcon className="size-5 text-destructive" />
@@ -32,6 +34,6 @@ export const ScreenProtector = () => {
// will be hidden unless user prints the screen
return (
- <div className="absolute bg-white inset-0 w-screen h-screen hidden print:block"></div>
+ <div className="absolute inset-0 hidden h-screen w-screen bg-white print:block"></div>
);
};
diff --git a/components/view/access-form/email-section.tsx b/components/view/access-form/email-section.tsx
index a79680a7..4dfdee46 100644
--- a/components/view/access-form/email-section.tsx
+++ b/components/view/access-form/email-section.tsx
@@ -1,4 +1,5 @@
import { Dispatch, SetStateAction, useEffect } from "react";
+
import { DEFAULT_ACCESS_FORM_TYPE } from ".";
export default function EmailSection({
@@ -28,7 +29,7 @@ export default function EmailSection({
return (
<div className="pb-5">
- <div className="relative rounded-md shadow-sm space-y-2">
+ <div className="relative space-y-2 rounded-md shadow-sm">
<label
htmlFor="email"
className="block text-sm font-medium leading-6 text-white"
@@ -42,7 +43,7 @@ export default function EmailSection({
autoCorrect="off"
autoComplete="email"
autoFocus
- className="flex w-full rounded-md border-0 py-1.5 text-white bg-black shadow-sm ring-1 ring-inset ring-gray-600 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-gray-300 sm:text-sm sm:leading-6"
+ className="flex w-full rounded-md border-0 bg-black py-1.5 text-white shadow-sm ring-1 ring-inset ring-gray-600 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-gray-300 sm:text-sm sm:leading-6"
value={email || ""}
placeholder="Enter email"
onChange={handleEmailChange}
diff --git a/components/view/access-form/index.tsx b/components/view/access-form/index.tsx
index 5e1d9662..59906969 100644
--- a/components/view/access-form/index.tsx
+++ b/components/view/access-form/index.tsx
@@ -1,8 +1,10 @@
import { useEffect } from "react";
-import PasswordSection from "./password-section";
-import EmailSection from "./email-section";
+
import { Button } from "@/components/ui/button";
+import EmailSection from "./email-section";
+import PasswordSection from "./password-section";
+
export const DEFAULT_ACCESS_FORM_DATA = {
email: null,
password: null,
@@ -42,7 +44,7 @@ export default function AccessForm({
return (
<>
- <div className="flex h-screen flex-1 flex-col px-6 py-12 lg:px-8 bg-black">
+ <div className="flex h-screen flex-1 flex-col bg-black px-6 py-12 lg:px-8">
<div className="sm:mx-auto sm:w-full sm:max-w-md">
<h1 className="mt-10 text-2xl font-bold leading-9 tracking-tight text-white">
Your action is requested to continue
diff --git a/components/view/access-form/password-section.tsx b/components/view/access-form/password-section.tsx
index 0e00bd80..802f0abb 100644
--- a/components/view/access-form/password-section.tsx
+++ b/components/view/access-form/password-section.tsx
@@ -1,6 +1,8 @@
import { Dispatch, SetStateAction, useState } from "react";
+
import Eye from "@/components/shared/icons/eye";
import EyeOff from "@/components/shared/icons/eye-off";
+
import { DEFAULT_ACCESS_FORM_TYPE } from ".";
export default function PasswordSection({
@@ -15,7 +17,7 @@ export default function PasswordSection({
return (
<div className="pb-5">
- <div className="rounded-md shadow-sm space-y-2">
+ <div className="space-y-2 rounded-md shadow-sm">
<label
htmlFor="password"
className="block text-sm font-medium leading-6 text-white"
@@ -29,7 +31,7 @@ export default function PasswordSection({
type={showPassword ? "text" : "password"}
autoCorrect="off"
autoComplete="off"
- className="flex w-full rounded-md border-0 py-1.5 text-white bg-black shadow-sm ring-1 ring-inset ring-gray-600 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-gray-300 sm:text-sm sm:leading-6"
+ className="flex w-full rounded-md border-0 bg-black py-1.5 text-white shadow-sm ring-1 ring-inset ring-gray-600 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-gray-300 sm:text-sm sm:leading-6"
value={password || ""}
placeholder="Enter passcode"
onChange={(e) => {
diff --git a/components/view/dataroom/dataroom-view.tsx b/components/view/dataroom/dataroom-view.tsx
index 5ee88eaa..798706a9 100644
--- a/components/view/dataroom/dataroom-view.tsx
+++ b/components/view/dataroom/dataroom-view.tsx
@@ -1,21 +1,25 @@
+import { useRouter } from "next/router";
+
import React, { useEffect, useRef, useState } from "react";
+
+import { LinkWithDataroom } from "@/pages/view/d/[linkId]";
+import { Brand, DataroomBrand } from "@prisma/client";
+import { usePlausible } from "next-plausible";
+import { ExtendedRecordMap } from "notion-types";
+import { toast } from "sonner";
+
+import { NotionPage } from "@/components/NotionPage";
+import LoadingSpinner from "@/components/ui/loading-spinner";
import AccessForm, {
DEFAULT_ACCESS_FORM_DATA,
DEFAULT_ACCESS_FORM_TYPE,
} from "@/components/view/access-form";
-import { usePlausible } from "next-plausible";
-import { toast } from "sonner";
-import LoadingSpinner from "@/components/ui/loading-spinner";
-import EmailVerificationMessage from "../email-verification-form";
-import { ExtendedRecordMap } from "notion-types";
-import { Brand, DataroomBrand } from "@prisma/client";
-import { useRouter } from "next/router";
import { useAnalytics } from "@/lib/analytics";
+
import DataroomViewer from "../DataroomViewer";
import PagesViewer from "../PagesViewer";
-import { LinkWithDataroom } from "@/pages/view/d/[linkId]";
-import { NotionPage } from "@/components/NotionPage";
+import EmailVerificationMessage from "../email-verification-form";
export type DEFAULT_DOCUMENT_VIEW_TYPE = {
viewId: string;
@@ -208,7 +212,7 @@ export default function DataroomView({
if (isLoading) {
return (
- <div className="h-screen flex items-center justify-center">
+ <div className="flex h-screen items-center justify-center">
<LoadingSpinner className="h-20 w-20" />
</div>
);
@@ -266,7 +270,7 @@ export default function DataroomView({
return (
<div className="bg-gray-950">
- <div className="h-screen flex items-center justify-center">
+ <div className="flex h-screen items-center justify-center">
<LoadingSpinner className="h-20 w-20" />
</div>
</div>
diff --git a/components/view/dataroom/document-card.tsx b/components/view/dataroom/document-card.tsx
index 7778628e..dc53c90c 100644
--- a/components/view/dataroom/document-card.tsx
+++ b/components/view/dataroom/document-card.tsx
@@ -1,11 +1,19 @@
-import { nFormatter, timeAgo } from "@/lib/utils";
+import Image from "next/image";
import Link from "next/link";
-import { type DocumentWithLinksAndLinkCountAndViewCount } from "@/lib/types";
+
+import { useEffect, useRef, useState } from "react";
+
import { TeamContextType } from "@/context/team-context";
+import { FolderInputIcon, MoreVertical, TrashIcon } from "lucide-react";
+import { useTheme } from "next-themes";
+import { toast } from "sonner";
+import { mutate } from "swr";
+
+import { MoveToFolderModal } from "@/components/documents/move-folder-modal";
import BarChart from "@/components/shared/icons/bar-chart";
-import Image from "next/image";
+import Check from "@/components/shared/icons/check";
+import Copy from "@/components/shared/icons/copy";
import NotionIcon from "@/components/shared/icons/notion";
-import { toast } from "sonner";
import { Button } from "@/components/ui/button";
import {
DropdownMenu,
@@ -15,15 +23,11 @@ import {
DropdownMenuSeparator,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
-import { TrashIcon, MoreVertical, FolderInputIcon } from "lucide-react";
-import { mutate } from "swr";
-import { useCopyToClipboard } from "@/lib/utils/use-copy-to-clipboard";
-import Check from "@/components/shared/icons/check";
-import Copy from "@/components/shared/icons/copy";
-import { useEffect, useRef, useState } from "react";
-import { useTheme } from "next-themes";
-import { MoveToFolderModal } from "@/components/documents/move-folder-modal";
+
import { type DataroomFolderDocument } from "@/lib/swr/use-dataroom";
+import { type DocumentWithLinksAndLinkCountAndViewCount } from "@/lib/types";
+import { nFormatter, timeAgo } from "@/lib/utils";
+import { useCopyToClipboard } from "@/lib/utils/use-copy-to-clipboard";
type DRDocument = {
dataroomDocumentId: string;
@@ -60,11 +64,11 @@ export default function DocumentCard({
return (
<>
- <li className="group/row relative rounded-lg p-3 border-0 dark:bg-secondary ring-1 ring-gray-200 dark:ring-gray-700 transition-all hover:ring-gray-300 hover:dark:ring-gray-500 hover:bg-secondary sm:p-4 flex justify-between items-center">
- <div className="min-w-0 flex shrink items-center space-x-2 sm:space-x-4">
- <div className="w-8 mx-0.5 sm:mx-1 text-center flex justify-center items-center">
+ <li className="group/row relative flex items-center justify-between rounded-lg border-0 p-3 ring-1 ring-gray-200 transition-all hover:bg-secondary hover:ring-gray-300 dark:bg-secondary dark:ring-gray-700 hover:dark:ring-gray-500 sm:p-4">
+ <div className="flex min-w-0 shrink items-center space-x-2 sm:space-x-4">
+ <div className="mx-0.5 flex w-8 items-center justify-center text-center sm:mx-1">
{document.versions[0].type === "notion" ? (
- <NotionIcon className="w-8 h-8" />
+ <NotionIcon className="h-8 w-8" />
) : (
<Image
src={`/_icons/pdf${isLight ? "-light" : ""}.svg`}
@@ -77,7 +81,7 @@ export default function DocumentCard({
<div className="flex-col">
<div className="flex items-center">
- <h2 className="min-w-0 text-sm font-semibold leading-6 text-foreground truncate max-w-[150px] sm:max-w-md">
+ <h2 className="min-w-0 max-w-[150px] truncate text-sm font-semibold leading-6 text-foreground sm:max-w-md">
<Link
href="#"
onClick={() => {
@@ -93,7 +97,7 @@ export default function DocumentCard({
documentVersionNumber: document.versions[0].versionNumber,
});
}}
- className="truncate w-full"
+ className="w-full truncate"
>
<span>{document.name}</span>
<span className="absolute inset-0" />
diff --git a/components/view/dataroom/folder-card.tsx b/components/view/dataroom/folder-card.tsx
index 379e2d4b..c12d3b88 100644
--- a/components/view/dataroom/folder-card.tsx
+++ b/components/view/dataroom/folder-card.tsx
@@ -1,6 +1,11 @@
-import { timeAgo } from "@/lib/utils";
import Link from "next/link";
+
+import { useRef } from "react";
+
import { TeamContextType } from "@/context/team-context";
+import { DataroomFolder } from "@prisma/client";
+import { FolderIcon, MoreVertical } from "lucide-react";
+
import { Button } from "@/components/ui/button";
import {
DropdownMenu,
@@ -10,11 +15,10 @@ import {
DropdownMenuSeparator,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
-import { MoreVertical, FolderIcon } from "lucide-react";
-import { useRef } from "react";
-import { FolderWithCount } from "@/lib/swr/use-documents";
+
import { DataroomFolderWithCount } from "@/lib/swr/use-dataroom";
-import { DataroomFolder } from "@prisma/client";
+import { FolderWithCount } from "@/lib/swr/use-documents";
+import { timeAgo } from "@/lib/utils";
type FolderCardProps = {
folder: DataroomFolder;
@@ -27,18 +31,18 @@ export default function FolderCard({
setFolderId,
}: FolderCardProps) {
return (
- <li className="group/row relative rounded-lg p-3 border-0 dark:bg-secondary ring-1 ring-gray-400 dark:ring-gray-500 transition-all hover:ring-gray-500 hover:dark:ring-gray-400 hover:bg-secondary sm:p-4 flex justify-between items-center">
- <div className="min-w-0 flex shrink items-center space-x-2 sm:space-x-4">
- <div className="w-8 mx-0.5 sm:mx-1 text-center flex justify-center items-center">
- <FolderIcon className="w-8 h-8 " strokeWidth={1} />
+ <li className="group/row relative flex items-center justify-between rounded-lg border-0 p-3 ring-1 ring-gray-400 transition-all hover:bg-secondary hover:ring-gray-500 dark:bg-secondary dark:ring-gray-500 hover:dark:ring-gray-400 sm:p-4">
+ <div className="flex min-w-0 shrink items-center space-x-2 sm:space-x-4">
+ <div className="mx-0.5 flex w-8 items-center justify-center text-center sm:mx-1">
+ <FolderIcon className="h-8 w-8 " strokeWidth={1} />
</div>
<div className="flex-col">
<div className="flex items-center">
- <h2 className="min-w-0 text-sm font-semibold leading-6 text-foreground truncate max-w-[150px] sm:max-w-md">
+ <h2 className="min-w-0 max-w-[150px] truncate text-sm font-semibold leading-6 text-foreground sm:max-w-md">
<div
onClick={() => setFolderId(folder.id)}
- className="truncate w-full"
+ className="w-full truncate"
>
<span>{folder.name}</span>
<span className="absolute inset-0" />
diff --git a/components/view/dataroom/nav-dataroom.tsx b/components/view/dataroom/nav-dataroom.tsx
index 17ac8451..db199fef 100644
--- a/components/view/dataroom/nav-dataroom.tsx
+++ b/components/view/dataroom/nav-dataroom.tsx
@@ -1,21 +1,25 @@
+import Image from "next/image";
import Link from "next/link";
-import { Button } from "../../ui/button";
-import PapermarkSparkle from "../../shared/icons/papermark-sparkle";
-import { ArrowUpRight, Download } from "lucide-react";
+
import { Brand, DataroomBrand } from "@prisma/client";
-import Image from "next/image";
+import { ArrowUpRight, Download } from "lucide-react";
import { toast } from "sonner";
+
import {
DropdownMenu,
DropdownMenuContent,
- DropdownMenuTrigger,
DropdownMenuItem,
DropdownMenuLabel,
DropdownMenuSeparator,
DropdownMenuShortcut,
+ DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
+
import { timeAgo } from "@/lib/utils";
+import PapermarkSparkle from "../../shared/icons/papermark-sparkle";
+import { Button } from "../../ui/button";
+
export default function DataroomNav({
pageNumber,
numPages,
@@ -75,8 +79,8 @@ export default function DataroomNav({
>
<div className="mx-auto px-2 sm:px-6 lg:px-8">
<div className="relative flex h-12 items-center justify-between">
- <div className="flex flex-1 justify-start items-center">
- <div className="flex flex-shrink-0 items-center relative h-6 w-36">
+ <div className="flex flex-1 items-center justify-start">
+ <div className="relative flex h-6 w-36 flex-shrink-0 items-center">
{brand && brand.logo ? (
<Image
className="object-contain"
@@ -100,7 +104,7 @@ export default function DataroomNav({
<div>
<Button
onClick={() => setDocumentData(null)}
- className="text-white text-sm font-medium"
+ className="text-sm font-medium text-white"
variant="link"
>
Dataroom Home
@@ -108,11 +112,11 @@ export default function DataroomNav({
</div>
) : null}
</div>
- <div className="absolute inset-y-0 right-0 flex items-center pr-2 sm:static sm:inset-auto sm:ml-6 sm:pr-0 space-x-4">
+ <div className="absolute inset-y-0 right-0 flex items-center space-x-4 pr-2 sm:static sm:inset-auto sm:ml-6 sm:pr-0">
{embeddedLinks && embeddedLinks.length > 0 ? (
<DropdownMenu>
<DropdownMenuTrigger>
- <Button className="text-sm font-medium text-white bg-gray-900 hover:bg-gray-900/80">
+ <Button className="bg-gray-900 text-sm font-medium text-white hover:bg-gray-900/80">
Links on Page
</Button>
</DropdownMenuTrigger>
@@ -127,7 +131,7 @@ export default function DataroomNav({
key={index}
>
<DropdownMenuItem className="group h-10">
- <span className="w-[200px] truncate group-focus:text-clip group-focus:overflow-x-auto">
+ <span className="w-[200px] truncate group-focus:overflow-x-auto group-focus:text-clip">
{link}
</span>
<DropdownMenuShortcut className="pl-2 opacity-0 group-hover:opacity-60 group-focus:opacity-60">
@@ -142,7 +146,7 @@ export default function DataroomNav({
{assistantEnabled ? (
<Link href={`/view/${linkId}/chat`}>
<Button
- className="text-white bg-gray-900 hover:bg-gray-900/80 m-1"
+ className="m-1 bg-gray-900 text-white hover:bg-gray-900/80"
variant={"special"}
size={"icon"}
style={{
@@ -157,15 +161,15 @@ export default function DataroomNav({
{allowDownload ? (
<Button
onClick={downloadFile}
- className="text-white bg-gray-900 hover:bg-gray-900/80 m-1"
+ className="m-1 bg-gray-900 text-white hover:bg-gray-900/80"
size="icon"
title="Download document"
>
- <Download className="w-5 h-5" />
+ <Download className="h-5 w-5" />
</Button>
) : null}
{pageNumber && numPages ? (
- <div className="bg-gray-900 text-white rounded-md h-10 px-4 py-2 items-center flex text-sm font-medium">
+ <div className="flex h-10 items-center rounded-md bg-gray-900 px-4 py-2 text-sm font-medium text-white">
<span>{pageNumber}</span>
<span className="text-gray-400"> / {numPages}</span>
</div>
@@ -176,7 +180,7 @@ export default function DataroomNav({
{brand && brand.banner ? (
<div className="relative h-[30vh]">
<Image
- className="object-cover w-full h-[30vh]"
+ className="h-[30vh] w-full object-cover"
src={brand.banner}
alt="Banner"
width={1920}
@@ -184,8 +188,8 @@ export default function DataroomNav({
quality={100}
priority
/>
- <div className="absolute bottom-5 w-fit backdrop-blur-md bg-white/30 rounded-r-md">
- <div className="px-5 sm:px-10 py-2">
+ <div className="absolute bottom-5 w-fit rounded-r-md bg-white/30 backdrop-blur-md">
+ <div className="px-5 py-2 sm:px-10">
<div className="text-3xl">{dataroom.name}</div>
<time
className="text-sm"
diff --git a/components/view/document-view.tsx b/components/view/document-view.tsx
index 7c5d16ab..04f987de 100644
--- a/components/view/document-view.tsx
+++ b/components/view/document-view.tsx
@@ -1,18 +1,23 @@
+import { useRouter } from "next/router";
+
import React, { useEffect, useRef, useState } from "react";
+
+import { Brand } from "@prisma/client";
+import { usePlausible } from "next-plausible";
+import { ExtendedRecordMap } from "notion-types";
+import { toast } from "sonner";
+
+import LoadingSpinner from "@/components/ui/loading-spinner";
import AccessForm, {
DEFAULT_ACCESS_FORM_DATA,
DEFAULT_ACCESS_FORM_TYPE,
} from "@/components/view/access-form";
-import { usePlausible } from "next-plausible";
-import { toast } from "sonner";
+
+import { useAnalytics } from "@/lib/analytics";
import { LinkWithDocument } from "@/lib/types";
-import LoadingSpinner from "@/components/ui/loading-spinner";
-import { ExtendedRecordMap } from "notion-types";
+
import EmailVerificationMessage from "./email-verification-form";
import ViewData from "./view-data";
-import { Brand } from "@prisma/client";
-import { useRouter } from "next/router";
-import { useAnalytics } from "@/lib/analytics";
export type DEFAULT_DOCUMENT_VIEW_TYPE = {
viewId: string;
@@ -162,7 +167,7 @@ export default function DocumentView({
if (isLoading) {
return (
- <div className="h-screen flex items-center justify-center">
+ <div className="flex h-screen items-center justify-center">
<LoadingSpinner className="h-20 w-20" />
</div>
);
@@ -178,7 +183,7 @@ export default function DocumentView({
showPoweredByBanner={showPoweredByBanner}
/>
) : (
- <div className="h-screen flex items-center justify-center">
+ <div className="flex h-screen items-center justify-center">
<LoadingSpinner className="h-20 w-20" />
</div>
)}
diff --git a/components/view/email-verification-form.tsx b/components/view/email-verification-form.tsx
index 6e51c3f2..b2fac372 100644
--- a/components/view/email-verification-form.tsx
+++ b/components/view/email-verification-form.tsx
@@ -12,12 +12,12 @@ export default function EmailVerificationMessage({
}) {
return (
<>
- <div className="flex h-screen flex-1 flex-col px-6 py-12 lg:px-8 bg-black">
+ <div className="flex h-screen flex-1 flex-col bg-black px-6 py-12 lg:px-8">
<div className="sm:mx-auto sm:w-full sm:max-w-md">
<h2 className="mt-10 text-2xl font-bold leading-9 tracking-tight text-white">
Please verify your email
</h2>
- <p className="text-sm leading-6 text-white text-pretty">
+ <p className="text-pretty text-sm leading-6 text-white">
A verification link has been send to your email:{" "}
<span className="font-medium">{data.email}</span>
</p>
@@ -30,7 +30,7 @@ export default function EmailVerificationMessage({
type="submit"
variant="link"
size="sm"
- className="text-sm text-gray-400 font-normal"
+ className="text-sm font-normal text-gray-400"
loading={isLoading}
>
Resend Link
diff --git a/components/view/nav.tsx b/components/view/nav.tsx
index 9a20d4e6..34c142fe 100644
--- a/components/view/nav.tsx
+++ b/components/view/nav.tsx
@@ -1,20 +1,23 @@
+import Image from "next/image";
import Link from "next/link";
-import { Button } from "../ui/button";
-import PapermarkSparkle from "../shared/icons/papermark-sparkle";
-import { ArrowUpRight, Download, Slash } from "lucide-react";
+
import { Brand, DataroomBrand } from "@prisma/client";
-import Image from "next/image";
+import { ArrowUpRight, Download, Slash } from "lucide-react";
import { toast } from "sonner";
+
import {
DropdownMenu,
DropdownMenuContent,
- DropdownMenuTrigger,
DropdownMenuItem,
DropdownMenuLabel,
DropdownMenuSeparator,
DropdownMenuShortcut,
+ DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
+
import { determineTextColor } from "@/lib/utils/determine-text-color";
+
+import PapermarkSparkle from "../shared/icons/papermark-sparkle";
import {
Breadcrumb,
BreadcrumbItem,
@@ -23,6 +26,7 @@ import {
BreadcrumbPage,
BreadcrumbSeparator,
} from "../ui/breadcrumb";
+import { Button } from "../ui/button";
export default function Nav({
pageNumber,
@@ -83,8 +87,8 @@ export default function Nav({
>
<div className="mx-auto px-2 sm:px-6 lg:px-8">
<div className="relative flex h-16 items-center justify-between">
- <div className="flex flex-1 justify-start items-center">
- <div className="flex flex-shrink-0 items-center relative h-8 w-36">
+ <div className="flex flex-1 items-center justify-start">
+ <div className="relative flex h-8 w-36 flex-shrink-0 items-center">
{brand && brand.logo ? (
<Image
className="object-contain"
@@ -141,11 +145,11 @@ export default function Nav({
</Breadcrumb>
) : null}
</div>
- <div className="absolute inset-y-0 right-0 flex items-center pr-2 sm:static sm:inset-auto sm:ml-6 sm:pr-0 space-x-4">
+ <div className="absolute inset-y-0 right-0 flex items-center space-x-4 pr-2 sm:static sm:inset-auto sm:ml-6 sm:pr-0">
{embeddedLinks && embeddedLinks.length > 0 ? (
<DropdownMenu>
<DropdownMenuTrigger>
- <Button className="text-sm font-medium text-white bg-gray-900 hover:bg-gray-900/80">
+ <Button className="bg-gray-900 text-sm font-medium text-white hover:bg-gray-900/80">
Links on Page
</Button>
</DropdownMenuTrigger>
@@ -160,7 +164,7 @@ export default function Nav({
key={index}
>
<DropdownMenuItem className="group h-10">
- <span className="w-[200px] truncate group-focus:text-clip group-focus:overflow-x-auto">
+ <span className="w-[200px] truncate group-focus:overflow-x-auto group-focus:text-clip">
{link}
</span>
<DropdownMenuShortcut className="pl-2 opacity-0 group-hover:opacity-60 group-focus:opacity-60">
@@ -175,7 +179,7 @@ export default function Nav({
{assistantEnabled ? (
<Link href={`/view/${linkId}/chat`}>
<Button
- className="text-white bg-gray-900 hover:bg-gray-900/80 m-1"
+ className="m-1 bg-gray-900 text-white hover:bg-gray-900/80"
variant={"special"}
size={"icon"}
style={{
@@ -190,15 +194,15 @@ export default function Nav({
{allowDownload ? (
<Button
onClick={downloadFile}
- className="text-white bg-gray-900 hover:bg-gray-900/80 m-1"
+ className="m-1 bg-gray-900 text-white hover:bg-gray-900/80"
size="icon"
title="Download document"
>
- <Download className="w-5 h-5" />
+ <Download className="h-5 w-5" />
</Button>
) : null}
{pageNumber && numPages ? (
- <div className="bg-gray-900 text-white rounded-md h-10 px-4 py-2 items-center flex text-sm font-medium">
+ <div className="flex h-10 items-center rounded-md bg-gray-900 px-4 py-2 text-sm font-medium text-white">
<span>{pageNumber}</span>
<span className="text-gray-400"> / {numPages}</span>
</div>
diff --git a/components/view/powered-by.tsx b/components/view/powered-by.tsx
index de53cb4a..d2d61dc2 100644
--- a/components/view/powered-by.tsx
+++ b/components/view/powered-by.tsx
@@ -1,12 +1,12 @@
export const PoweredBy = ({ linkId }: { linkId: string }) => {
return (
<div
- className="flex flex-col absolute bottom-0 left-0 right-0"
+ className="absolute bottom-0 left-0 right-0 flex flex-col"
style={{ insetBlockEnd: "0px", insetInline: "0px" }}
>
<div className="flex w-full flex-col">
- <div className="flex w-full justify-start flex-row-reverse p-6">
- <div className="z-20 flex justify-end w-auto rounded-md whitespace-nowrap pointer-events-auto relative min-h-8 bg-black text-white items-center ring-1 ring-white/40 hover:ring-white/90">
+ <div className="flex w-full flex-row-reverse justify-start p-6">
+ <div className="pointer-events-auto relative z-20 flex min-h-8 w-auto items-center justify-end whitespace-nowrap rounded-md bg-black text-white ring-1 ring-white/40 hover:ring-white/90">
<a
href={`https://www.papermark.io?utm_campaign=poweredby&utm_medium=poweredby&utm_source=papermark-${linkId}`}
target="_blank"
diff --git a/components/view/question.tsx b/components/view/question.tsx
index 67235c15..f9fcd417 100644
--- a/components/view/question.tsx
+++ b/components/view/question.tsx
@@ -1,8 +1,10 @@
-import { STAGGER_CHILD_VARIANTS } from "@/lib/constants";
-import { cn } from "@/lib/utils";
+import { useState } from "react";
+
import { motion } from "framer-motion";
import { ThumbsDownIcon, ThumbsUpIcon } from "lucide-react";
-import { useState } from "react";
+
+import { STAGGER_CHILD_VARIANTS } from "@/lib/constants";
+import { cn } from "@/lib/utils";
export default function Question({
feedback,
@@ -59,7 +61,7 @@ export default function Question({
variants={STAGGER_CHILD_VARIANTS}
className="flex flex-col items-center space-y-10 text-center"
>
- <h1 className="font-display max-w-lg text-3xl font-semibold transition-colors sm:text-4xl text-white">
+ <h1 className="font-display max-w-lg text-3xl font-semibold text-white transition-colors sm:text-4xl">
Thanks for your feedback!
</h1>
</motion.div>
@@ -69,7 +71,7 @@ export default function Question({
return (
<motion.div
- className="z-10 flex flex-col items-center space-y-10 text-center w-full"
+ className="z-10 flex w-full flex-col items-center space-y-10 text-center"
variants={{
hidden: { opacity: 0, scale: 0.95 },
show: {
@@ -87,25 +89,25 @@ export default function Question({
>
<motion.div
variants={STAGGER_CHILD_VARIANTS}
- className="flex flex-col items-center space-y-10 text-center w-full"
+ className="flex w-full flex-col items-center space-y-10 text-center"
>
- <h1 className="font-display max-w-xl text-3xl font-semibold transition-colors sm:text-4xl text-white">
+ <h1 className="font-display max-w-xl text-3xl font-semibold text-white transition-colors sm:text-4xl">
{feedback.data.question}
</h1>
</motion.div>
<motion.div
variants={STAGGER_CHILD_VARIANTS}
- className="grid w-full max-w-sm grid-cols-1 divide-border text-white rounded-md border border-border md:grid-cols-2 md:divide-x md:divide-y-0 divide-y"
+ className="grid w-full max-w-sm grid-cols-1 divide-y divide-border rounded-md border border-border text-white md:grid-cols-2 md:divide-x md:divide-y-0"
>
<button
onClick={() => handleQuestionSubmit("yes")}
className={cn(
- "flex flex-col items-center justify-center overflow-hidden p-5 space-y-5 transition-colors hover:text-black hover:bg-gray-200 hover:dark:bg-gray-800 md:p-10 min-h-[200px]",
+ "flex min-h-[200px] flex-col items-center justify-center space-y-5 overflow-hidden p-5 transition-colors hover:bg-gray-200 hover:text-black hover:dark:bg-gray-800 md:p-10",
answer === "yes" ? "bg-gray-200 dark:bg-gray-800" : "",
)}
>
<ThumbsUpIcon
- className="h-auto pointer-events-none w-12 sm:w-12"
+ className="pointer-events-none h-auto w-12 sm:w-12"
strokeWidth={1}
/>
<p>Yes</p>
@@ -113,12 +115,12 @@ export default function Question({
<button
onClick={() => handleQuestionSubmit("no")}
className={cn(
- "flex flex-col items-center justify-center overflow-hidden p-5 space-y-5 transition-colors hover:text-black hover:bg-gray-200 hover:dark:bg-gray-800 md:p-10 min-h-[200px]",
+ "flex min-h-[200px] flex-col items-center justify-center space-y-5 overflow-hidden p-5 transition-colors hover:bg-gray-200 hover:text-black hover:dark:bg-gray-800 md:p-10",
answer === "no" ? "bg-gray-200 dark:bg-gray-800" : "",
)}
>
<ThumbsDownIcon
- className="h-auto pointer-events-none w-12 sm:w-12"
+ className="pointer-events-none h-auto w-12 sm:w-12"
strokeWidth={1}
/>
<p>No</p>
diff --git a/components/view/toolbar.tsx b/components/view/toolbar.tsx
index d496f383..b7528c5b 100644
--- a/components/view/toolbar.tsx
+++ b/components/view/toolbar.tsx
@@ -1,7 +1,10 @@
import { useEffect, useRef, useState } from "react";
+
+import Draggable from "react-draggable";
+
import { REACTIONS } from "@/lib/constants";
+
import GripVertical from "../shared/icons/grip-vertical";
-import Draggable from "react-draggable";
export default function Toolbar({
viewId,
@@ -58,7 +61,7 @@ export default function Toolbar({
const Emoji = ({ label, emoji }: { label: string; emoji: string }) => (
<div className="relative w-fit">
<button
- className="font-emoji text-xl leading-6 bg-transparent py-1 px-1.5 relative transition-bg-color duration-600 inline-flex justify-center items-center align-middle rounded-full ease-in-out hover:bg-gray-200 active:bg-gray-400 active:duration-0"
+ className="font-emoji transition-bg-color duration-600 relative inline-flex items-center justify-center rounded-full bg-transparent px-1.5 py-1 align-middle text-xl leading-6 ease-in-out hover:bg-gray-200 active:bg-gray-400 active:duration-0"
role="img"
aria-label={label ? label : ""}
aria-hidden={label ? "false" : "true"}
@@ -68,7 +71,7 @@ export default function Toolbar({
{currentEmoji && currentEmoji.emoji === emoji && (
<span
key={currentEmoji.id}
- className="font-emoji absolute -top-10 left-0 right-0 mx-auto animate-flyEmoji duration-3000"
+ className="font-emoji duration-3000 absolute -top-10 left-0 right-0 mx-auto animate-flyEmoji"
>
{currentEmoji.emoji}
</span>
@@ -80,14 +83,14 @@ export default function Toolbar({
return (
<>
<div
- className="fixed top-16 left-0 w-dvw justify-center items-end flex z-10"
+ className="fixed left-0 top-16 z-10 flex w-dvw items-end justify-center"
style={{ height: "calc(100vh - 64px)" }}
>
<Draggable bounds="parent" handle=".moveable-icon">
- <div className="bg-gray-950/40 rounded-full w-max mt-4 mb-4">
+ <div className="mb-4 mt-4 w-max rounded-full bg-gray-950/40">
<div className="grid items-center justify-start">
<div className="px-2 py-1">
- <div className="grid items-center justify-start grid-flow-col">
+ <div className="grid grid-flow-col items-center justify-start">
{REACTIONS.map((reaction) => (
<Emoji
key={reaction.emoji}
@@ -95,7 +98,7 @@ export default function Toolbar({
label={reaction.label}
/>
))}
- <GripVertical className="h-5 w-5 text-gray-100 active:text-gray-300 moveable-icon" />
+ <GripVertical className="moveable-icon h-5 w-5 text-gray-100 active:text-gray-300" />
</div>
</div>
</div>
diff --git a/components/view/view-data.tsx b/components/view/view-data.tsx
index 522dd82d..390a346a 100644
--- a/components/view/view-data.tsx
+++ b/components/view/view-data.tsx
@@ -1,10 +1,13 @@
-import { DEFAULT_DOCUMENT_VIEW_TYPE } from "./document-view";
-import { LinkWithDocument } from "@/lib/types";
-import PagesViewer from "@/components/view/PagesViewer";
-import PDFViewer from "@/components/view/PDFViewer";
-import { NotionPage } from "@/components/NotionPage";
-import { ExtendedRecordMap } from "notion-types";
import { Brand } from "@prisma/client";
+import { ExtendedRecordMap } from "notion-types";
+
+import { NotionPage } from "@/components/NotionPage";
+import PDFViewer from "@/components/view/PDFViewer";
+import PagesViewer from "@/components/view/PagesViewer";
+
+import { LinkWithDocument } from "@/lib/types";
+
+import { DEFAULT_DOCUMENT_VIEW_TYPE } from "./document-view";
export default function ViewData({
viewData,
diff --git a/components/visitors/dataroom-viewers.tsx b/components/visitors/dataroom-viewers.tsx
index 30be93f2..fecaf49f 100644
--- a/components/visitors/dataroom-viewers.tsx
+++ b/components/visitors/dataroom-viewers.tsx
@@ -1,30 +1,32 @@
import {
- Table,
- TableBody,
- TableCell,
- TableHead,
- TableHeader,
- TableRow,
-} from "@/components/ui/table";
+ BadgeCheckIcon,
+ BadgeInfoIcon,
+ MailOpenIcon,
+ SendIcon,
+} from "lucide-react";
+
+import ChevronDown from "@/components/shared/icons/chevron-down";
import {
Collapsible,
CollapsibleContent,
CollapsibleTrigger,
} from "@/components/ui/collapsible";
import { Skeleton } from "@/components/ui/skeleton";
-
-import { timeAgo } from "@/lib/utils";
-import ChevronDown from "@/components/shared/icons/chevron-down";
-import { VisitorAvatar } from "./visitor-avatar";
import {
- BadgeCheckIcon,
- BadgeInfoIcon,
- MailOpenIcon,
- SendIcon,
-} from "lucide-react";
+ Table,
+ TableBody,
+ TableCell,
+ TableHead,
+ TableHeader,
+ TableRow,
+} from "@/components/ui/table";
import { BadgeTooltip } from "@/components/ui/tooltip";
+
import { useDataroomViewers } from "@/lib/swr/use-dataroom";
+import { timeAgo } from "@/lib/utils";
+
import DataroomVisitHistory from "./dataroom-visitors-history";
+import { VisitorAvatar } from "./visitor-avatar";
export default function DataroomViewersTable({
dataroomId,
@@ -41,7 +43,7 @@ export default function DataroomViewersTable({
<div className="rounded-md border">
<Table>
<TableHeader>
- <TableRow className="hover:bg-transparent *:font-medium *:whitespace-nowrap">
+ <TableRow className="*:whitespace-nowrap *:font-medium hover:bg-transparent">
<TableHead>Name</TableHead>
{/* <TableHead>Visit Duration</TableHead> */}
{/* <TableHead>Last Viewed Document</TableHead> */}
@@ -53,7 +55,7 @@ export default function DataroomViewersTable({
{viewers?.length === 0 && (
<TableRow>
<TableCell colSpan={5}>
- <div className="w-full h-40 flex items-center justify-center">
+ <div className="flex h-40 w-full items-center justify-center">
<p>No Data Available</p>
</div>
</TableCell>
@@ -66,11 +68,11 @@ export default function DataroomViewersTable({
<TableRow key={viewer.id} className="group/row">
{/* Name */}
<TableCell className="">
- <div className="flex items-center sm:space-x-3 overflow-visible">
+ <div className="flex items-center overflow-visible sm:space-x-3">
<VisitorAvatar viewerEmail={viewer.email} />
<div className="min-w-0 flex-1">
<div className="focus:outline-none">
- <p className="text-sm font-medium text-gray-800 dark:text-gray-200 overflow-visible flex items-center gap-x-2">
+ <p className="flex items-center gap-x-2 overflow-visible text-sm font-medium text-gray-800 dark:text-gray-200">
{viewer.email ? (
<>
{viewer.email}{" "}
@@ -103,7 +105,7 @@ export default function DataroomViewersTable({
"Anonymous"
)}
</p>
- <p className="text-xs sm:text-sm text-muted-foreground/60">
+ <p className="text-xs text-muted-foreground/60 sm:text-sm">
{/* {view.link.name ? view.link.name : view.linkId} */}
</p>
</div>
@@ -137,11 +139,11 @@ export default function DataroomViewersTable({
</time>
</TableCell>
{/* Actions */}
- <TableCell className="text-center sm:text-right cursor-pointer p-0">
+ <TableCell className="cursor-pointer p-0 text-center sm:text-right">
{viewer.views.length > 0 ? (
<CollapsibleTrigger asChild>
- <div className="flex justify-end p-5 space-x-1 [&[data-state=open]>svg.chevron]:rotate-180">
- <ChevronDown className="h-4 w-4 shrink-0 transition-transform duration-200 chevron" />
+ <div className="flex justify-end space-x-1 p-5 [&[data-state=open]>svg.chevron]:rotate-180">
+ <ChevronDown className="chevron h-4 w-4 shrink-0 transition-transform duration-200" />
</div>
</CollapsibleTrigger>
) : null}
diff --git a/components/visitors/dataroom-visitors-history.tsx b/components/visitors/dataroom-visitors-history.tsx
index bc67bc00..68242f56 100644
--- a/components/visitors/dataroom-visitors-history.tsx
+++ b/components/visitors/dataroom-visitors-history.tsx
@@ -1,10 +1,13 @@
-import { timeAgo } from "@/lib/utils";
-import { TableCell, TableRow } from "@/components/ui/table";
-import { Skeleton } from "@/components/ui/skeleton";
-import { useDataroomVisitHistory } from "@/lib/swr/use-dataroom";
import Link from "next/link";
+
import { FileCheckIcon } from "lucide-react";
+
import { Button } from "@/components/ui/button";
+import { Skeleton } from "@/components/ui/skeleton";
+import { TableCell, TableRow } from "@/components/ui/table";
+
+import { useDataroomVisitHistory } from "@/lib/swr/use-dataroom";
+import { timeAgo } from "@/lib/utils";
export default function DataroomVisitHistory({
viewId,
diff --git a/components/visitors/dataroom-visitors-table.tsx b/components/visitors/dataroom-visitors-table.tsx
index b9bd2844..ec593a35 100644
--- a/components/visitors/dataroom-visitors-table.tsx
+++ b/components/visitors/dataroom-visitors-table.tsx
@@ -1,3 +1,12 @@
+import { BadgeCheckIcon, BadgeInfoIcon, MailOpenIcon } from "lucide-react";
+
+import ChevronDown from "@/components/shared/icons/chevron-down";
+import {
+ Collapsible,
+ CollapsibleContent,
+ CollapsibleTrigger,
+} from "@/components/ui/collapsible";
+import { Skeleton } from "@/components/ui/skeleton";
import {
Table,
TableBody,
@@ -6,20 +15,13 @@ import {
TableHeader,
TableRow,
} from "@/components/ui/table";
-import {
- Collapsible,
- CollapsibleContent,
- CollapsibleTrigger,
-} from "@/components/ui/collapsible";
-import { Skeleton } from "@/components/ui/skeleton";
-
-import { durationFormat, timeAgo } from "@/lib/utils";
-import ChevronDown from "@/components/shared/icons/chevron-down";
-import { VisitorAvatar } from "./visitor-avatar";
-import { BadgeCheckIcon, BadgeInfoIcon, MailOpenIcon } from "lucide-react";
import { BadgeTooltip } from "@/components/ui/tooltip";
+
import { useDataroomVisits } from "@/lib/swr/use-dataroom";
+import { durationFormat, timeAgo } from "@/lib/utils";
+
import DataroomVisitHistory from "./dataroom-visitors-history";
+import { VisitorAvatar } from "./visitor-avatar";
export default function DataroomVisitorsTable({
dataroomId,
@@ -36,7 +38,7 @@ export default function DataroomVisitorsTable({
<div className="rounded-md border">
<Table>
<TableHeader>
- <TableRow className="hover:bg-transparent *:font-medium *:whitespace-nowrap">
+ <TableRow className="*:whitespace-nowrap *:font-medium hover:bg-transparent">
<TableHead>Name</TableHead>
{/* <TableHead>Visit Duration</TableHead> */}
{/* <TableHead>Last Viewed Document</TableHead> */}
@@ -48,7 +50,7 @@ export default function DataroomVisitorsTable({
{views?.length === 0 && (
<TableRow>
<TableCell colSpan={5}>
- <div className="w-full h-40 flex items-center justify-center">
+ <div className="flex h-40 w-full items-center justify-center">
<p>No Data Available</p>
</div>
</TableCell>
@@ -61,11 +63,11 @@ export default function DataroomVisitorsTable({
<TableRow key={view.id} className="group/row">
{/* Name */}
<TableCell className="">
- <div className="flex items-center sm:space-x-3 overflow-visible">
+ <div className="flex items-center overflow-visible sm:space-x-3">
<VisitorAvatar viewerEmail={view.viewerEmail} />
<div className="min-w-0 flex-1">
<div className="focus:outline-none">
- <p className="text-sm font-medium text-gray-800 dark:text-gray-200 overflow-visible flex items-center gap-x-2">
+ <p className="flex items-center gap-x-2 overflow-visible text-sm font-medium text-gray-800 dark:text-gray-200">
{view.viewerEmail ? (
<>
{view.viewerEmail}{" "}
@@ -90,7 +92,7 @@ export default function DataroomVisitorsTable({
"Anonymous"
)}
</p>
- <p className="text-xs sm:text-sm text-muted-foreground/60">
+ <p className="text-xs text-muted-foreground/60 sm:text-sm">
{view.link.name ? view.link.name : view.linkId}
</p>
</div>
@@ -120,10 +122,10 @@ export default function DataroomVisitorsTable({
</time>
</TableCell>
{/* Actions */}
- <TableCell className="text-center sm:text-right cursor-pointer p-0">
+ <TableCell className="cursor-pointer p-0 text-center sm:text-right">
<CollapsibleTrigger asChild>
- <div className="flex justify-end p-5 space-x-1 [&[data-state=open]>svg.chevron]:rotate-180">
- <ChevronDown className="h-4 w-4 shrink-0 transition-transform duration-200 chevron" />
+ <div className="flex justify-end space-x-1 p-5 [&[data-state=open]>svg.chevron]:rotate-180">
+ <ChevronDown className="chevron h-4 w-4 shrink-0 transition-transform duration-200" />
</div>
</CollapsibleTrigger>
</TableCell>
diff --git a/components/visitors/visitor-avatar.tsx b/components/visitors/visitor-avatar.tsx
index 65cd83dc..9605e6e8 100644
--- a/components/visitors/visitor-avatar.tsx
+++ b/components/visitors/visitor-avatar.tsx
@@ -1,4 +1,5 @@
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
+
import { generateGravatarHash } from "@/lib/utils";
import { cn } from "@/lib/utils";
@@ -39,7 +40,7 @@ export const VisitorAvatar = ({
if (!viewerEmail) {
return (
- <Avatar className={cn("flex-shrink-0 hidden sm:inline-flex", className)}>
+ <Avatar className={cn("hidden flex-shrink-0 sm:inline-flex", className)}>
<AvatarFallback className="bg-gray-200/50 dark:bg-gray-200/50">
AN
</AvatarFallback>
@@ -48,7 +49,7 @@ export const VisitorAvatar = ({
}
return (
- <Avatar className={cn("flex-shrink-0 hidden sm:inline-flex", className)}>
+ <Avatar className={cn("hidden flex-shrink-0 sm:inline-flex", className)}>
<AvatarImage
src={`https://gravatar.com/avatar/${generateGravatarHash(
viewerEmail,
diff --git a/components/visitors/visitor-chart.tsx b/components/visitors/visitor-chart.tsx
index c86b48a8..d8bf676c 100644
--- a/components/visitors/visitor-chart.tsx
+++ b/components/visitors/visitor-chart.tsx
@@ -1,6 +1,9 @@
-import { useVisitorStats } from "@/lib/swr/use-stats";
import ErrorPage from "next/error";
+
import BarChartComponent from "@/components/charts/bar-chart";
+
+import { useVisitorStats } from "@/lib/swr/use-stats";
+
import StatsChartSkeleton from "../documents/stats-chart-skeleton";
export default function VisitorChart({
@@ -37,7 +40,7 @@ export default function VisitorChart({
});
return (
- <div className="pl-0.5 md:pl-1 pb-0.5 md:pb-1 border-l border-b rounded-bl-lg">
+ <div className="rounded-bl-lg border-b border-l pb-0.5 pl-0.5 md:pb-1 md:pl-1">
<BarChartComponent data={durationData} isSum={true} />
</div>
);
diff --git a/components/visitors/visitors-table.tsx b/components/visitors/visitors-table.tsx
index cfb1bfcf..33206c29 100644
--- a/components/visitors/visitors-table.tsx
+++ b/components/visitors/visitors-table.tsx
@@ -1,24 +1,5 @@
-import {
- Table,
- TableBody,
- TableCell,
- TableHead,
- TableHeader,
- TableRow,
-} from "@/components/ui/table";
-import {
- Collapsible,
- CollapsibleContent,
- CollapsibleTrigger,
-} from "@/components/ui/collapsible";
-import { Gauge } from "@/components/ui/gauge";
-import { Skeleton } from "@/components/ui/skeleton";
+import { useState } from "react";
-import { useDocumentVisits } from "@/lib/swr/use-document";
-import { durationFormat, timeAgo } from "@/lib/utils";
-import ChevronDown from "@/components/shared/icons/chevron-down";
-import VisitorChart from "./visitor-chart";
-import { VisitorAvatar } from "./visitor-avatar";
import {
AlertTriangleIcon,
BadgeCheckIcon,
@@ -28,11 +9,31 @@ import {
ThumbsDownIcon,
ThumbsUpIcon,
} from "lucide-react";
+
+import ChevronDown from "@/components/shared/icons/chevron-down";
+import {
+ Collapsible,
+ CollapsibleContent,
+ CollapsibleTrigger,
+} from "@/components/ui/collapsible";
+import { Gauge } from "@/components/ui/gauge";
+import { Skeleton } from "@/components/ui/skeleton";
+import {
+ Table,
+ TableBody,
+ TableCell,
+ TableHead,
+ TableHeader,
+ TableRow,
+} from "@/components/ui/table";
import { BadgeTooltip } from "@/components/ui/tooltip";
+
import { usePlan } from "@/lib/swr/use-billing";
+import { useDocumentVisits } from "@/lib/swr/use-document";
+import { durationFormat, timeAgo } from "@/lib/utils";
+
import { UpgradePlanModal } from "../billing/upgrade-plan-modal";
import { Button } from "../ui/button";
-import { useState } from "react";
import {
Pagination,
PaginationContent,
@@ -42,6 +43,8 @@ import {
PaginationNext,
PaginationPrevious,
} from "../ui/pagination";
+import { VisitorAvatar } from "./visitor-avatar";
+import VisitorChart from "./visitor-chart";
export default function VisitorsTable({ numPages }: { numPages: number }) {
const [currentPage, setCurrentPage] = useState<number>(1);
@@ -59,7 +62,7 @@ export default function VisitorsTable({ numPages }: { numPages: number }) {
<div className="rounded-md border">
<Table>
<TableHeader>
- <TableRow className="hover:bg-transparent *:font-medium *:whitespace-nowrap">
+ <TableRow className="*:whitespace-nowrap *:font-medium hover:bg-transparent">
<TableHead>Name</TableHead>
<TableHead>Visit Duration</TableHead>
<TableHead>Visit Completion</TableHead>
@@ -72,7 +75,7 @@ export default function VisitorsTable({ numPages }: { numPages: number }) {
views?.hiddenViewCount === 0 && (
<TableRow>
<TableCell colSpan={5}>
- <div className="w-full h-40 flex items-center justify-center">
+ <div className="flex h-40 w-full items-center justify-center">
<p>No Data Available</p>
</div>
</TableCell>
@@ -85,11 +88,11 @@ export default function VisitorsTable({ numPages }: { numPages: number }) {
<TableRow key={view.id} className="group/row">
{/* Name */}
<TableCell className="">
- <div className="flex items-center sm:space-x-3 overflow-visible">
+ <div className="flex items-center overflow-visible sm:space-x-3">
<VisitorAvatar viewerEmail={view.viewerEmail} />
<div className="min-w-0 flex-1">
<div className="focus:outline-none">
- <p className="text-sm font-medium text-gray-800 dark:text-gray-200 overflow-visible flex items-center gap-x-2">
+ <p className="flex items-center gap-x-2 overflow-visible text-sm font-medium text-gray-800 dark:text-gray-200">
{view.viewerEmail ? (
<>
{view.viewerEmail}{" "}
@@ -143,7 +146,7 @@ export default function VisitorsTable({ numPages }: { numPages: number }) {
"Anonymous"
)}
</p>
- <p className="text-xs sm:text-sm text-muted-foreground/60">
+ <p className="text-xs text-muted-foreground/60 sm:text-sm">
{view.link.name ? view.link.name : view.linkId}
</p>
</div>
@@ -173,10 +176,10 @@ export default function VisitorsTable({ numPages }: { numPages: number }) {
</time>
</TableCell>
{/* Actions */}
- <TableCell className="text-center sm:text-right cursor-pointer p-0">
+ <TableCell className="cursor-pointer p-0 text-center sm:text-right">
<CollapsibleTrigger asChild>
- <div className="flex justify-end p-5 space-x-1 [&[data-state=open]>svg.chevron]:rotate-180">
- <ChevronDown className="h-4 w-4 shrink-0 transition-transform duration-200 chevron" />
+ <div className="flex justify-end space-x-1 p-5 [&[data-state=open]>svg.chevron]:rotate-180">
+ <ChevronDown className="chevron h-4 w-4 shrink-0 transition-transform duration-200" />
</div>
</CollapsibleTrigger>
</TableCell>
@@ -218,9 +221,9 @@ export default function VisitorsTable({ numPages }: { numPages: number }) {
<>
<TableRow className="">
<TableCell colSpan={5} className="text-left sm:text-center">
- <div className="flex flex-col sm:flex-row items-start sm:items-center justify-center gap-1">
+ <div className="flex flex-col items-start justify-center gap-1 sm:flex-row sm:items-center">
<span className="flex items-center gap-x-1">
- <AlertTriangleIcon className="h-4 w-4 inline-block text-yellow-500" />
+ <AlertTriangleIcon className="inline-block h-4 w-4 text-yellow-500" />
Some older visits may not be shown because your document
has more than 20 views.{" "}
</span>
@@ -241,8 +244,8 @@ export default function VisitorsTable({ numPages }: { numPages: number }) {
</Table>
</div>
{/* Pagination Controls */}
- <div className="mt-2 w-full flex items-center">
- <div className="text-sm w-full">
+ <div className="mt-2 flex w-full items-center">
+ <div className="w-full text-sm">
Showing{" "}
<span className="font-semibold">
{views?.totalViews && views?.totalViews > 10
@@ -305,14 +308,14 @@ const VisitorBlurred = () => {
return (
<TableRow className="blur-sm">
<TableCell className="">
- <div className="flex items-center sm:space-x-3 overflow-visible">
+ <div className="flex items-center overflow-visible sm:space-x-3">
<VisitorAvatar viewerEmail={"[email protected]"} />
<div className="min-w-0 flex-1">
<div className="focus:outline-none">
- <p className="text-sm font-medium text-gray-800 dark:text-gray-200 overflow-visible flex items-center gap-x-2">
+ <p className="flex items-center gap-x-2 overflow-visible text-sm font-medium text-gray-800 dark:text-gray-200">
Anonymous
</p>
- <p className="text-xs sm:text-sm text-muted-foreground/60">
+ <p className="text-xs text-muted-foreground/60 sm:text-sm">
Demo link
</p>
</div>
@@ -342,9 +345,9 @@ const VisitorBlurred = () => {
</time>
</TableCell>
{/* Actions */}
- <TableCell className="text-center sm:text-right cursor-pointer p-0">
- <div className="flex justify-end p-5 space-x-1 [&[data-state=open]>svg.chevron]:rotate-180">
- <ChevronDown className="h-4 w-4 shrink-0 transition-transform duration-200 chevron" />
+ <TableCell className="cursor-pointer p-0 text-center sm:text-right">
+ <div className="flex justify-end space-x-1 p-5 [&[data-state=open]>svg.chevron]:rotate-180">
+ <ChevronDown className="chevron h-4 w-4 shrink-0 transition-transform duration-200" />
</div>
</TableCell>
</TableRow>
diff --git a/components/web/alternatives/alternativesgrid.tsx b/components/web/alternatives/alternativesgrid.tsx
index ef1e8b03..01f0e303 100644
--- a/components/web/alternatives/alternativesgrid.tsx
+++ b/components/web/alternatives/alternativesgrid.tsx
@@ -55,10 +55,10 @@ const files = [
export default function Gridalternatives() {
return (
- <div className="bg-gray-100 py-10 sm:py-10 px-6 sm:px-8 lg:px-20 my-20 ">
- <div className="px-6 py-12 sm:px-6 sm:py-20 lg:px-8 pb-20">
+ <div className="my-20 bg-gray-100 px-6 py-10 sm:px-8 sm:py-10 lg:px-20 ">
+ <div className="px-6 py-12 pb-20 sm:px-6 sm:py-20 lg:px-8">
<div className="mx-auto max-w-5xl text-center">
- <h2 className="text-4xl font-bold text-balance text-gray-900 ">
+ <h2 className="text-balance text-4xl font-bold text-gray-900 ">
Learn more about Docsend Alternatives in 2024
<br />
</h2>
@@ -75,7 +75,7 @@ export default function Gridalternatives() {
{files.map((file) => (
<li key={file.source} className="relative">
<a href={file.link} className="block focus:outline-none">
- <div className="group aspect-h-7 aspect-w-10 block w-full overflow-hidden rounded-lg bg-gray-200 focus-within:ring-2 focus-within:ring-indigo-500 focus-within:ring-offset-2 focus-within:ring-offset-gray-100">
+ <div className="aspect-h-7 aspect-w-10 group block w-full overflow-hidden rounded-lg bg-gray-200 focus-within:ring-2 focus-within:ring-indigo-500 focus-within:ring-offset-2 focus-within:ring-offset-gray-100">
<img
src={file.source}
alt=""
diff --git a/components/web/alternatives/docsendtext.tsx b/components/web/alternatives/docsendtext.tsx
index 7fe63b7c..8be466c8 100644
--- a/components/web/alternatives/docsendtext.tsx
+++ b/components/web/alternatives/docsendtext.tsx
@@ -1,14 +1,15 @@
+import Link from "next/link";
+
import BlurImage from "@/components/blur-image";
import { Button } from "@/components/ui/button";
-import Link from "next/link";
const DocSendAlternatives = () => {
return (
<>
<div className="relative">
- <div className="grid grid-cols-4 gap-10 py-10 max-w-7xl w-full mx-auto px-4 md:px-8">
- <div className="relative col-span-4 mb-10 flex flex-col space-y-8 bg-white md:col-span-3 sm:border-r sm:border-orange-500/50">
- <div className="prose prose-h2:mb-2 first:prose-h2:mt-0 prose-h2:mt-10 prose-headings:font-medium sm:max-w-screen-md sm:pr-2 md:pr-0">
+ <div className="mx-auto grid w-full max-w-7xl grid-cols-4 gap-10 px-4 py-10 md:px-8">
+ <div className="relative col-span-4 mb-10 flex flex-col space-y-8 bg-white sm:border-r sm:border-orange-500/50 md:col-span-3">
+ <div className="prose prose-headings:font-medium prose-h2:mb-2 prose-h2:mt-10 first:prose-h2:mt-0 sm:max-w-screen-md sm:pr-2 md:pr-0">
<>
<h2 id="quick-recap-of-alternatives-to-docsend">
Quick recap of alternatives to Docsend
@@ -291,7 +292,7 @@ const DocSendAlternatives = () => {
target="_blank"
rel="noopener noreferrer"
>
- <Button variant="orange" className="text-base rounded-3xl">
+ <Button variant="orange" className="rounded-3xl text-base">
Start with Docsend alternative for free
</Button>
</Link>
@@ -1356,7 +1357,7 @@ const DocSendAlternatives = () => {
target="_blank"
rel="noopener noreferrer"
>
- <Button variant="orange" className="text-base rounded-3xl">
+ <Button variant="orange" className="rounded-3xl text-base">
Start with Docsend alternative for free
</Button>
</Link>
diff --git a/components/web/alternatives/dropdownproto.tsx b/components/web/alternatives/dropdownproto.tsx
index b8430b73..6a729d2a 100644
--- a/components/web/alternatives/dropdownproto.tsx
+++ b/components/web/alternatives/dropdownproto.tsx
@@ -1,6 +1,7 @@
+import { Dispatch, Fragment, SetStateAction } from "react";
+
import { Menu, Transition } from "@headlessui/react";
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
-import { Fragment, Dispatch, SetStateAction } from "react";
function classNames(...classes: string[]) {
return classes.filter(Boolean).join(" ");
@@ -18,16 +19,16 @@ export default function DropDown({
setOption,
}: DropDownProps) {
return (
- <Menu as="div" className="relative block text-left w-full">
+ <Menu as="div" className="relative block w-full text-left">
<div>
- <Menu.Button className="inline-flex w-full justify-between items-center rounded-md border border-black bg-white px-4 py-2 text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none">
+ <Menu.Button className="inline-flex w-full items-center justify-between rounded-md border border-black bg-white px-4 py-2 text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none">
{option}
<ChevronDownIcon
className="-mr-1 ml-2 h-5 w-5 ui-open:hidden"
aria-hidden="true"
/>
<ChevronUpIcon
- className="-mr-1 ml-2 h-5 w-5 hidden ui-open:block"
+ className="-mr-1 ml-2 hidden h-5 w-5 ui-open:block"
aria-hidden="true"
/>
</Menu.Button>
@@ -55,12 +56,12 @@ export default function DropDown({
className={classNames(
active ? "bg-gray-100 text-gray-900" : "text-gray-700",
option === optionItem ? "bg-gray-200" : "",
- "px-4 py-2 text-sm w-full text-left flex items-center space-x-2 justify-between",
+ "flex w-full items-center justify-between space-x-2 px-4 py-2 text-left text-sm",
)}
>
<span>{optionItem}</span>
{option === optionItem ? (
- <CheckIcon className="w-4 h-4 text-bold" />
+ <CheckIcon className="text-bold h-4 w-4" />
) : null}
</button>
)}
diff --git a/components/web/alternatives/feature.tsx b/components/web/alternatives/feature.tsx
index 9bae05e7..3a6d9052 100644
--- a/components/web/alternatives/feature.tsx
+++ b/components/web/alternatives/feature.tsx
@@ -32,10 +32,10 @@ const Feature: React.FC<Props> = ({
<button
key={feat}
onClick={() => toggleFeature(feat)}
- className={`py-2 px-4 rounded-md mb-2 ${
+ className={`mb-2 rounded-md px-4 py-2 ${
selectedFeatures.includes(feat)
- ? "bg-black text-white border-black"
- : "bg-white text-black border-2 border-black"
+ ? "border-black bg-black text-white"
+ : "border-2 border-black bg-white text-black"
}`}
>
{feat}
diff --git a/components/web/alternatives/features.tsx b/components/web/alternatives/features.tsx
index a0f655f0..b6f847cf 100644
--- a/components/web/alternatives/features.tsx
+++ b/components/web/alternatives/features.tsx
@@ -58,7 +58,7 @@ export default function Features() {
className="h-10 w-10 text-gray-800"
aria-hidden="true"
/>
- <dt className="inline text-gray-500 text-xl">{feature.name}</dt>{" "}
+ <dt className="inline text-xl text-gray-500">{feature.name}</dt>{" "}
<dd className="inline text-balance">{feature.description}</dd>
</div>
))}
diff --git a/components/web/alternatives/featurestable.tsx b/components/web/alternatives/featurestable.tsx
index d8e995d8..f3efaa8e 100644
--- a/components/web/alternatives/featurestable.tsx
+++ b/components/web/alternatives/featurestable.tsx
@@ -178,7 +178,7 @@ export default function ComparisonTable() {
</div>
</div> */}
<div className="mt-6 flow-root">
- <div className="rounded-lg border border-gray-300 bg-gray- mx-4 my-2 overflow-x-auto">
+ <div className="bg-gray- mx-4 my-2 overflow-x-auto rounded-lg border border-gray-300">
<div className="inline-block min-w-full align-middle">
<table className="min-w-full divide-y divide-gray-300">
<thead>
@@ -207,7 +207,7 @@ export default function ComparisonTable() {
key={tool.name}
className={`px-3 py-4 text-sm ${
tool.name === "Papermark"
- ? "bg-green-50 text-green-700 font-semibold"
+ ? "bg-green-50 font-semibold text-green-700"
: ""
}`} // Consistent text color, conditional background color
>
diff --git a/components/web/alternatives/papermarktext.tsx b/components/web/alternatives/papermarktext.tsx
index 0b1f8565..7d5c8373 100644
--- a/components/web/alternatives/papermarktext.tsx
+++ b/components/web/alternatives/papermarktext.tsx
@@ -3,15 +3,15 @@ import Link from "next/link";
const PapermarkText = () => {
return (
<>
- <div className="bg-gray-100 p-8 mt-16">
- <div className="max-w-3xl mx-auto space-y-6 bg-white text-black p-6 rounded-lg shadow-sm">
+ <div className="mt-16 bg-gray-100 p-8">
+ <div className="mx-auto max-w-3xl space-y-6 rounded-lg bg-white p-6 text-black shadow-sm">
<h1 className="text-4xl font-bold ">DocSend vs Papermark</h1>
<p className="mb-4">
Papermark emphasizes security and user interface, offering features
like watermarking, password protection, and custom branding.
</p>
- <ul className="list-disc list-inside mb-4">
+ <ul className="mb-4 list-inside list-disc">
<li className="">Founder First</li>
<li className="">Budget Friendly</li>
<li className="">Open Source</li>
@@ -20,20 +20,20 @@ const PapermarkText = () => {
<p className="mb-4">
<a
href="https://github.com/mfts/papermark"
- className="text-blue-600 underline px-2"
+ className="px-2 text-blue-600 underline"
>
Self-host Papermark
</a>
or let us host it for you
- <Link href="/login" className="text-blue-600 underline px-2">
+ <Link href="/login" className="px-2 text-blue-600 underline">
for free
</Link>
</p>
- <h2 className="text-2xl font-bold mt-4">Papermark reviews</h2>
+ <h2 className="mt-4 text-2xl font-bold">Papermark reviews</h2>
<p>⭐️⭐️⭐️⭐️⭐️</p>
- <h3 className="text-2xl font-semi-bold mt-4">
+ <h3 className="font-semi-bold mt-4 text-2xl">
Users love our customer support
</h3>
<img
@@ -41,7 +41,7 @@ const PapermarkText = () => {
alt="Papermark reviews"
className="my-4"
/>
- <h3 className="text-2xl font-semi-bold mt-4">
+ <h3 className="font-semi-bold mt-4 text-2xl">
Papermark focuses on UI and core features
</h3>
<img
@@ -49,7 +49,7 @@ const PapermarkText = () => {
alt="Papermark reviews"
className="my-4"
/>
- <h3 className="text-2xl font-semi-bold mt-4">
+ <h3 className="font-semi-bold mt-4 text-2xl">
Actively used by founders, VC funds and developers
</h3>
<img
@@ -57,7 +57,7 @@ const PapermarkText = () => {
alt="Papermark reviews"
className="my-4"
/>
- <h2 className="text-2xl font-bold mt-4">
+ <h2 className="mt-4 text-2xl font-bold">
Papermark plans and pricing
</h2>
<p>
diff --git a/components/web/alternatives/plan.tsx b/components/web/alternatives/plan.tsx
index d7f6f40c..c6ff77f7 100644
--- a/components/web/alternatives/plan.tsx
+++ b/components/web/alternatives/plan.tsx
@@ -1,4 +1,5 @@
import { Dispatch, SetStateAction } from "react";
+
import DropdownProto from "@/components/web/alternatives/dropdownproto";
interface PlanProps {
diff --git a/components/web/alternatives/pricingtable.tsx b/components/web/alternatives/pricingtable.tsx
index e8df3b79..b6ced00b 100644
--- a/components/web/alternatives/pricingtable.tsx
+++ b/components/web/alternatives/pricingtable.tsx
@@ -59,7 +59,7 @@ export default function ComparisonTable() {
</div>
</div>
<div className="mt-6 flow-root">
- <div className="rounded-lg border border-gray-300 mx-4 my-2 overflow-x-auto">
+ <div className="mx-4 my-2 overflow-x-auto rounded-lg border border-gray-300">
<div className="inline-block min-w-full align-middle">
<table className="min-w-full divide-y divide-gray-300">
<thead>
diff --git a/components/web/alternatives/usecase.tsx b/components/web/alternatives/usecase.tsx
index aa3d74fd..de33accd 100644
--- a/components/web/alternatives/usecase.tsx
+++ b/components/web/alternatives/usecase.tsx
@@ -1,4 +1,5 @@
import { Dispatch, SetStateAction } from "react";
+
import DropdownProto from "@/components/web/alternatives/dropdownproto";
interface UsecaseProps {
diff --git a/components/web/alternatives/usecasetable.tsx b/components/web/alternatives/usecasetable.tsx
index 636a195c..c7f1424c 100644
--- a/components/web/alternatives/usecasetable.tsx
+++ b/components/web/alternatives/usecasetable.tsx
@@ -88,7 +88,7 @@ export default function ComparisonTable() {
</div>
</div>
<div className="mt-6 flow-root">
- <div className="rounded-lg border border-gray-300 mx-4 my-2 overflow-x-auto">
+ <div className="mx-4 my-2 overflow-x-auto rounded-lg border border-gray-300">
<div className="inline-block min-w-full align-middle">
<table className="min-w-full divide-y divide-gray-300">
<thead>
diff --git a/components/web/assistant/public-chat.tsx b/components/web/assistant/public-chat.tsx
index 6d6db4be..7130a4f2 100644
--- a/components/web/assistant/public-chat.tsx
+++ b/components/web/assistant/public-chat.tsx
@@ -1,4 +1,5 @@
import { type Message } from "ai/react";
+
import { Chat } from "@/components/chat/chat";
export default function ChatPage() {
diff --git a/components/web/banner-launch-week.tsx b/components/web/banner-launch-week.tsx
index 1a5984cb..3f9f7490 100644
--- a/components/web/banner-launch-week.tsx
+++ b/components/web/banner-launch-week.tsx
@@ -25,7 +25,7 @@ export default function Banner() {
}}
/>
</div>
- <div className="flex justify-center items-center gap-x-4 gap-y-2">
+ <div className="flex items-center justify-center gap-x-4 gap-y-2">
<p className="text-sm leading-6 text-white">
<strong className="font-semibold">Papermark AI</strong> on Product
Hunt
diff --git a/components/web/dataroom-component.tsx b/components/web/dataroom-component.tsx
index 5239649a..0c83199c 100644
--- a/components/web/dataroom-component.tsx
+++ b/components/web/dataroom-component.tsx
@@ -1,4 +1,5 @@
import { CheckCircle2Icon, MinusIcon } from "lucide-react";
+
interface ToolFeature {
name: string;
features: { [feature: string]: string };
@@ -142,28 +143,28 @@ export default function ComparisonTable() {
</div>
</div> */}
<div className="mt-6 flow-root">
- <div className="rounded-lg border border-gray-300 bg-gray-100 overflow-x-auto ">
+ <div className="overflow-x-auto rounded-lg border border-gray-300 bg-gray-100 ">
<div className="inline-block min-w-full align-middle">
<table className="min-w-full divide-y divide-gray-300 border border-gray-300 ">
<thead>
<tr>
- <th className="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 text-balance">
+ <th className="text-balance px-3 py-3.5 text-left text-sm font-semibold text-gray-900">
Data Room Feature
</th>
{tools.map((tool) => (
<th
key={tool.name}
- className="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 text-balance"
+ className="text-balance px-3 py-3.5 text-left text-sm font-semibold text-gray-900"
>
{tool.name}
</th>
))}
</tr>
</thead>
- <tbody className="divide-y divide-gray-200 bg-white border border-gray-300 ">
+ <tbody className="divide-y divide-gray-200 border border-gray-300 bg-white ">
{featuresList.map((feature) => (
<tr key={feature}>
- <td className="px-3 py-4 text-sm text-gray-900 text-balance border border-gray-300 font-semibold ">
+ <td className="text-balance border border-gray-300 px-3 py-4 text-sm font-semibold text-gray-900 ">
{featureDisplayNames[feature]}
</td>
{tools.map((tool) => (
@@ -171,7 +172,7 @@ export default function ComparisonTable() {
key={tool.name}
className={`px-3 py-4 text-sm ${
tool.name === "Papermark"
- ? "bg-green-50 text-green-700 font-semibold text-balance"
+ ? "text-balance bg-green-50 font-semibold text-green-700"
: ""
}`} // Consistent text color, conditional background color
>
diff --git a/components/web/faq.tsx b/components/web/faq.tsx
index e5f3337b..20d91083 100644
--- a/components/web/faq.tsx
+++ b/components/web/faq.tsx
@@ -1,7 +1,7 @@
"use client";
-import { Plus as PlusSmallIcon, Minus as MinusSmallIcon } from "lucide-react";
import { Disclosure } from "@headlessui/react";
+import { Minus as MinusSmallIcon, Plus as PlusSmallIcon } from "lucide-react";
const faqs = [
{
diff --git a/components/web/footer.tsx b/components/web/footer.tsx
index 7b2772bc..85aa1d92 100644
--- a/components/web/footer.tsx
+++ b/components/web/footer.tsx
@@ -1,9 +1,12 @@
+import Image from "next/image";
+
+import PapermarkLogo from "@/public/_static/papermark-logo.svg";
+
import GitHubIcon from "@/components/shared/icons/github";
-import TwitterIcon from "@/components/shared/icons/twitter";
import LinkedinIcon from "@/components/shared/icons/linkedin";
+import TwitterIcon from "@/components/shared/icons/twitter";
+
import { StatusWidget } from "./status-widget";
-import PapermarkLogo from "@/public/_static/papermark-logo.svg";
-import Image from "next/image";
const navigation = {
product: [
@@ -68,7 +71,7 @@ export default function Footer() {
<h2 id="footer-heading" className="sr-only">
Footer
</h2>
- <div className="mx-auto max-w-7xl pt-20 pb-4 px-4 md:px-8">
+ <div className="mx-auto max-w-7xl px-4 pb-4 pt-20 md:px-8">
{" "}
{/* px-6 pb-8 pt-16 sm:pt-24 lg:px-8 lg:pt-32 */}
<div className="xl:grid xl:grid-cols-3 xl:gap-8">
@@ -89,7 +92,7 @@ export default function Footer() {
href={item.href}
target="_blank"
rel="noopener noreferrer"
- className="inline-flex items-center justify-center h-10 rounded-md px-2.5 py-1 font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50"
+ className="inline-flex h-10 items-center justify-center rounded-md px-2.5 py-1 font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50"
>
<span className="sr-only">{item.name}</span>
<item.icon />
diff --git a/components/web/header.tsx b/components/web/header.tsx
index 4bb33b27..acc31e2c 100644
--- a/components/web/header.tsx
+++ b/components/web/header.tsx
@@ -1,5 +1,7 @@
import Link from "next/link";
+
import GitHubIcon from "@/components/shared/icons/github";
+
import { Button } from "../ui/button";
export default function Header() {
@@ -32,7 +34,7 @@ export default function Header() {
<h1 className="text-4xl font-bold tracking-tight text-gray-900 sm:text-6xl">
The Open-Source DocSend Alternative
</h1>
- <p className="mt-6 max-w-xl mx-auto text-lg leading-8 text-gray-600">
+ <p className="mx-auto mt-6 max-w-xl text-lg leading-8 text-gray-600">
Share pitch decks, sales proposals and other docs securely with
real-time analytics and white-labeling options.
</p>
@@ -47,7 +49,7 @@ export default function Header() {
href="https://github.com/mfts/papermark"
target="_blank"
rel="noopener noreferrer"
- className="text-sm font-semibold leading-6 text-gray-900 flex items-center"
+ className="flex items-center text-sm font-semibold leading-6 text-gray-900"
>
<GitHubIcon className="mr-2 h-5 w-5" /> Star on GitHub
</Link>
diff --git a/components/web/landing-page/logo-cloud.tsx b/components/web/landing-page/logo-cloud.tsx
index 0e76cb39..f6f8298c 100644
--- a/components/web/landing-page/logo-cloud.tsx
+++ b/components/web/landing-page/logo-cloud.tsx
@@ -1,7 +1,7 @@
export const LogoCloud = () => {
return (
<div>
- <div className="text-2xl font-medium leading-6 mb-4 text-center">
+ <div className="mb-4 text-center text-2xl font-medium leading-6">
<p>Used by companies and employees of</p>
</div>
<div className="overflow-hidden border border-l-0 border-r-0 border-gray-100 bg-gray-100 lg:rounded-xl lg:border-l lg:border-r">
@@ -9,7 +9,7 @@ export const LogoCloud = () => {
<a
target="_blank"
rel="noopener noreferrer"
- className="group col-span-1 flex items-center justify-center p-8 text-black hover:text-white bg-white hover:bg-[#249edc] transition-colors"
+ className="group col-span-1 flex items-center justify-center bg-white p-8 text-black transition-colors hover:bg-[#249edc] hover:text-white"
href="https://snowflake.com"
>
<svg
@@ -30,7 +30,7 @@ export const LogoCloud = () => {
<a
target="_blank"
rel="noopener noreferrer"
- className="group col-span-1 flex items-center justify-center p-8 text-black hover:text-white bg-white hover:bg-black transition-colors"
+ className="group col-span-1 flex items-center justify-center bg-white p-8 text-black transition-colors hover:bg-black hover:text-white"
href="https://vercel.com"
>
<svg
@@ -73,7 +73,7 @@ export const LogoCloud = () => {
<a
target="_blank"
rel="noopener noreferrer"
- className="group col-span-1 flex items-center justify-center p-8 text-black hover:text-white bg-white hover:bg-[#c0c0c0] transition-colors h-[100px]"
+ className="group col-span-1 flex h-[100px] items-center justify-center bg-white p-8 text-black transition-colors hover:bg-[#c0c0c0] hover:text-white"
href="https://backtrace.vc"
>
<svg
@@ -95,7 +95,7 @@ export const LogoCloud = () => {
<a
target="_blank"
rel="noopener noreferrer"
- className="group col-span-1 flex items-center justify-center p-8 text-black hover:text-white bg-white hover:bg-[#d82227] transition-colors"
+ className="group col-span-1 flex items-center justify-center bg-white p-8 text-black transition-colors hover:bg-[#d82227] hover:text-white"
href="https://realtor.com"
>
<svg
@@ -166,7 +166,7 @@ export const LogoCloud = () => {
<a
target="_blank"
rel="noopener noreferrer"
- className="group col-span-1 flex items-center justify-center p-8 text-black hover:text-white bg-white hover:bg-[#FF6D2D] transition-colors"
+ className="group col-span-1 flex items-center justify-center bg-white p-8 text-black transition-colors hover:bg-[#FF6D2D] hover:text-white"
href="https://appsmith.com"
>
<svg
@@ -234,7 +234,7 @@ export const LogoCloud = () => {
<a
target="_blank"
rel="noopener noreferrer"
- className="group col-span-1 flex items-center justify-center p-8 text-black hover:text-white bg-white hover:bg-[#3A5CFC] transition-colors"
+ className="group col-span-1 flex items-center justify-center bg-white p-8 text-black transition-colors hover:bg-[#3A5CFC] hover:text-white"
href="https://www.coinweb.com/"
>
<svg
@@ -297,7 +297,7 @@ export const LogoCloud = () => {
<a
target="_blank"
rel="noopener noreferrer"
- className="group col-span-1 flex items-center justify-center p-8 text-black hover:text-white bg-white hover:bg-[#E94F2E] transition-colors"
+ className="group col-span-1 flex items-center justify-center bg-white p-8 text-black transition-colors hover:bg-[#E94F2E] hover:text-white"
href="https://crowd.dev"
>
<svg
@@ -357,7 +357,7 @@ export const LogoCloud = () => {
<a
target="_blank"
rel="noopener noreferrer"
- className="group col-span-1 flex items-center justify-center p-8 text-black hover:text-white bg-white hover:bg-[#8C1515] transition-colors h-[100px]"
+ className="group col-span-1 flex h-[100px] items-center justify-center bg-white p-8 text-black transition-colors hover:bg-[#8C1515] hover:text-white"
href="https://standford.com"
>
<svg
@@ -472,5 +472,5 @@ export const LogoCloud = () => {
</div>
</div>
</div>
- )
-}
\ No newline at end of file
+ );
+};
diff --git a/components/web/launch/daysgrid.tsx b/components/web/launch/daysgrid.tsx
index b01aa5d6..718ec3d5 100644
--- a/components/web/launch/daysgrid.tsx
+++ b/components/web/launch/daysgrid.tsx
@@ -1,5 +1,6 @@
import Image from "next/image";
import Link from "next/link";
+
import oneImg from "@/public/_static/day1.webp";
import twoImg from "@/public/_static/day2.png";
import threeImg from "@/public/_static/day3.png";
diff --git a/components/web/launch/hero.tsx b/components/web/launch/hero.tsx
index c7150fec..228251e9 100644
--- a/components/web/launch/hero.tsx
+++ b/components/web/launch/hero.tsx
@@ -1,4 +1,5 @@
import Image from "next/image";
+
import michaelImg from "@/public/_static/michael.png";
export default function Example() {
@@ -27,11 +28,11 @@ export default function Example() {
Follow live updates
</a>
</div>
- <div className="mt-10 mx-auto w-full max-w-xs">
+ <div className="mx-auto mt-10 w-full max-w-xs">
<Image
src={michaelImg}
alt="Description of Image"
- className="mx-auto w-48 h-auto object-cover rounded-md "
+ className="mx-auto h-auto w-48 rounded-md object-cover "
/>
</div>
</div>
diff --git a/components/web/logos.tsx b/components/web/logos.tsx
index 6a3b7f96..fd5bd8a3 100644
--- a/components/web/logos.tsx
+++ b/components/web/logos.tsx
@@ -15,7 +15,7 @@ export default function Logos() {
].map((logo, index) => (
<img
key={index}
- className="w-20 h-20 object-contain lg:w-32 lg:h-32"
+ className="h-20 w-20 object-contain lg:h-32 lg:w-32"
src={`/_static/${logo}`}
alt=""
// Note: These width and height attributes can be removed since we're using CSS to control the image size.
diff --git a/components/web/navbar.tsx b/components/web/navbar.tsx
index e08eff0b..915e0f19 100644
--- a/components/web/navbar.tsx
+++ b/components/web/navbar.tsx
@@ -1,13 +1,15 @@
+import Image from "next/image";
import Link from "next/link";
-import GitHubIcon from "@/components/shared/icons/github";
+
import PapermarkLogo from "@/public/_static/papermark-logo.svg";
-import Image from "next/image";
+
+import GitHubIcon from "@/components/shared/icons/github";
export default function Navbar() {
return (
<>
<div className="sticky top-0 z-50">
- <div className="flex h-14 w-full mx-auto items-center justify-center bg-white/75 backdrop-blur-lg">
+ <div className="mx-auto flex h-14 w-full items-center justify-center bg-white/75 backdrop-blur-lg">
<div className="mx-auto flex w-full max-w-7xl items-center justify-between self-center px-4 md:px-8">
<div className="flex items-center space-x-10">
<Link
diff --git a/components/web/pricing-component.tsx b/components/web/pricing-component.tsx
index 70549839..7329f035 100644
--- a/components/web/pricing-component.tsx
+++ b/components/web/pricing-component.tsx
@@ -1,6 +1,7 @@
-import { ArrowRightIcon, CheckCircle2Icon, MinusIcon } from "lucide-react";
import Link from "next/link";
+import { ArrowRightIcon, CheckCircle2Icon, MinusIcon } from "lucide-react";
+
const featureGroups: {
name: string;
features: {
@@ -539,59 +540,59 @@ export function PricingComparison() {
}
};
return (
- <div className="max-w-full w-auto block">
- <h2 className="text-3xl w-full sticky z-30 top-0 mt-[-80px] pt-[100px] border-b-0 pb-[40px] bg-white">
+ <div className="block w-auto max-w-full">
+ <h2 className="sticky top-0 z-30 mt-[-80px] w-full border-b-0 bg-white pb-[40px] pt-[100px] text-3xl">
Compare features
</h2>
<div className="sticky top-[158px] z-40">
- <div className="grid grid-cols-16 border border-black rounded-t-xl overflow-hidden">
- <ul className="grid col-[span_16_/_span_16] grid-cols-16 overflow-hidden bg-gray-100 text-gray-900">
- <li className="col-span-4 p-6 text-xl leading-8 list-none border-r border-black ">
+ <div className="grid grid-cols-16 overflow-hidden rounded-t-xl border border-black">
+ <ul className="col-[span_16_/_span_16] grid grid-cols-16 overflow-hidden bg-gray-100 text-gray-900">
+ <li className="col-span-4 list-none border-r border-black p-6 text-xl leading-8 ">
Features
</li>
- <li className="col-span-3 p-6 text-xl leading-8 list-none border-r border-black">
+ <li className="col-span-3 list-none border-r border-black p-6 text-xl leading-8">
Free
</li>
- <li className="col-span-3 p-6 text-xl leading-8 list-none border-r border-black">
+ <li className="col-span-3 list-none border-r border-black p-6 text-xl leading-8">
Pro
</li>
- <li className="col-span-3 p-6 text-xl leading-8 list-none border-r border-black">
+ <li className="col-span-3 list-none border-r border-black p-6 text-xl leading-8">
Business
</li>
- <li className="col-span-3 p-6 text-xl leading-8 list-none border-r-0">
+ <li className="col-span-3 list-none border-r-0 p-6 text-xl leading-8">
Data Rooms
</li>
</ul>
</div>
<div className="grid grid-cols-16 border-x border-black">
- <ul className="grid col-[span_16_/_span_16] grid-cols-16 overflow-hidden">
- <li className="col-span-4 bg-white px-6 py-4 text-sm list-none border-r border-black"></li>
- <li className="col-span-3 bg-white px-6 py-4 text-sm list-none border-r border-black hover:bg-black hover:text-white">
- <Link href="/login" className="flex items-center gap-x-1 group">
+ <ul className="col-[span_16_/_span_16] grid grid-cols-16 overflow-hidden">
+ <li className="col-span-4 list-none border-r border-black bg-white px-6 py-4 text-sm"></li>
+ <li className="col-span-3 list-none border-r border-black bg-white px-6 py-4 text-sm hover:bg-black hover:text-white">
+ <Link href="/login" className="group flex items-center gap-x-1">
Start sharing <ArrowRightIcon className="h-4 w-4" />
</Link>
</li>
- <li className="col-span-3 bg-white px-6 py-4 text-sm list-none border-r border-black hover:bg-black hover:text-white">
+ <li className="col-span-3 list-none border-r border-black bg-white px-6 py-4 text-sm hover:bg-black hover:text-white">
<Link
href="/login?next=/settings/billing"
- className="flex items-center gap-x-1 group"
+ className="group flex items-center gap-x-1"
>
Choose Pro <ArrowRightIcon className="h-4 w-4" />
</Link>
</li>
- <li className="col-span-3 bg-white px-6 py-4 text-sm list-none border-r border-black hover:bg-[#fb7a00] ">
+ <li className="col-span-3 list-none border-r border-black bg-white px-6 py-4 text-sm hover:bg-[#fb7a00] ">
<Link
href="/login?next=/settings/billing"
- className="flex items-center gap-x-1 group"
+ className="group flex items-center gap-x-1"
>
Choose Business <ArrowRightIcon className="h-4 w-4" />
</Link>
</li>
- <li className="col-span-3 bg-white px-6 py-4 text-sm list-none border-r-0 hover:bg-black hover:text-white">
+ <li className="col-span-3 list-none border-r-0 bg-white px-6 py-4 text-sm hover:bg-black hover:text-white">
<Link
href="/login?next=/settings/billing"
target="_blank"
- className="flex items-center gap-x-1 group"
+ className="group flex items-center gap-x-1"
>
Create Data Rooms <ArrowRightIcon className="h-4 w-4" />
</Link>
@@ -600,34 +601,34 @@ export function PricingComparison() {
</div>
</div>
<div className="relative z-0">
- <div className="w-full border-collapse overflow-visible bg-none border border-black rounded-b-xl">
+ <div className="w-full border-collapse overflow-visible rounded-b-xl border border-black bg-none">
<div>
{featureGroups.map((group) => (
<>
<h3
- className="text-base sticky top-[292px] text-white z-30 w-full bg-black m-0 py-3 px-6 font-normal"
+ className="sticky top-[292px] z-30 m-0 w-full bg-black px-6 py-3 text-base font-normal text-white"
key={group.name}
>
{group.name}
</h3>
{group.features.map((feature) => (
<div
- className="grid grid-cols-16 w-full relative odd:bg-gray-100 last:rounded-b-xl"
+ className="relative grid w-full grid-cols-16 last:rounded-b-xl odd:bg-gray-100"
key={feature.name}
>
- <div className="relative py-7 px-6 text-base text-left flex flex-wrap font-normal col-end-[span_4] items-center text-black border-r border-black last:border-r-0">
+ <div className="relative col-end-[span_4] flex flex-wrap items-center border-r border-black px-6 py-7 text-left text-base font-normal text-black last:border-r-0">
{feature.name}
</div>
- <div className="relative py-7 px-6 text-base text-left flex flex-wrap font-base col-end-[span_3] items-center text-black border-r border-black last:border-r-0">
+ <div className="font-base relative col-end-[span_3] flex flex-wrap items-center border-r border-black px-6 py-7 text-left text-base text-black last:border-r-0">
{renderFeatureName(feature.tiers.free)}
</div>
- <div className="relative py-7 px-6 text-base text-left flex flex-wrap font-base col-end-[span_3] items-center text-black border-r border-black last:border-r-0">
+ <div className="font-base relative col-end-[span_3] flex flex-wrap items-center border-r border-black px-6 py-7 text-left text-base text-black last:border-r-0">
{renderFeatureName(feature.tiers.pro)}
</div>
- <div className="relative py-7 px-6 text-base text-left flex flex-wrap font-base col-end-[span_3] items-center text-black border-r border-black last:border-r-0">
+ <div className="font-base relative col-end-[span_3] flex flex-wrap items-center border-r border-black px-6 py-7 text-left text-base text-black last:border-r-0">
{renderFeatureName(feature.tiers.business)}
</div>
- <div className="relative py-7 px-6 text-base text-left flex flex-wrap font-base col-end-[span_3] items-center text-black border-r border-black last:border-r-0">
+ <div className="font-base relative col-end-[span_3] flex flex-wrap items-center border-r border-black px-6 py-7 text-left text-base text-black last:border-r-0">
{renderFeatureName(feature.tiers.enterprise)}
</div>
</div>
diff --git a/components/web/section2.tsx b/components/web/section2.tsx
index b1e08334..2cea5f0c 100644
--- a/components/web/section2.tsx
+++ b/components/web/section2.tsx
@@ -1,4 +1,5 @@
import Link from "next/link";
+
import GitHubIcon from "@/components/shared/icons/github";
export default function Section2() {
@@ -16,25 +17,25 @@ export default function Section2() {
<div className="mt-10 flex items-center justify-center gap-x-6">
<Link
href="/login"
- className="rounded-md bg-black px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm hover:shadow-md hover:bg-gray-800 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
+ className="rounded-md bg-black px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-gray-800 hover:shadow-md focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
>
Start now
</Link>
<Link
target="_blank"
rel="noopener noreferrer"
- className="rounded-md px-3.5 py-2.5 text-sm font-semibold text-black hover:shadow-md hover:text-gray-800 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-400 flex items-center"
+ className="flex items-center rounded-md px-3.5 py-2.5 text-sm font-semibold text-black hover:text-gray-800 hover:shadow-md focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-400"
href="https://github.com/mfts/papermark"
>
<GitHubIcon className="mr-2 h-5 w-5" /> Star on GitHub
</Link>
</div>
{/* Image added below */}
- <div className="mt-10 mx-auto w-full max-w-md">
+ <div className="mx-auto mt-10 w-full max-w-md">
<img
src="https://www.papermark.io/_static/image2.png"
alt="Description of Image"
- className="mx-auto w-full h-auto object-cover rounded-md "
+ className="mx-auto h-auto w-full rounded-md object-cover "
/>
</div>
</div>
diff --git a/components/web/section3.tsx b/components/web/section3.tsx
index 1ab091b2..50054011 100644
--- a/components/web/section3.tsx
+++ b/components/web/section3.tsx
@@ -12,7 +12,7 @@ export default function Section3() {
</p>
</div>
{/* Video added below */}
- <div className="mt-10 mx-auto w-full max-w-6xl">
+ <div className="mx-auto mt-10 w-full max-w-6xl">
<video
width="100%"
id="video1"
diff --git a/components/web/status-widget.tsx b/components/web/status-widget.tsx
index 4c28a5ea..bc046463 100644
--- a/components/web/status-widget.tsx
+++ b/components/web/status-widget.tsx
@@ -1,9 +1,11 @@
"use client";
-import { cn } from "@/lib/utils";
-import { getStatus } from "@openstatus/react";
import { useEffect, useState } from "react";
+import { getStatus } from "@openstatus/react";
+
+import { cn } from "@/lib/utils";
+
export function StatusWidget() {
const [status, setStatus] = useState("operational");
@@ -69,7 +71,7 @@ export function StatusWidget() {
return (
<a
- className="flex justify-between space-x-2 items-center w-full border border-border rounded-md px-3 py-1"
+ className="flex w-full items-center justify-between space-x-2 rounded-md border border-border px-3 py-1"
href="https://papermark.openstatus.dev"
target="_blank"
rel="noreferrer"
@@ -81,13 +83,13 @@ export function StatusWidget() {
<span className="relative ml-auto flex h-2 w-2">
<span
className={cn(
- "animate-ping absolute inline-flex h-full w-full rounded-full opacity-75",
+ "absolute inline-flex h-full w-full animate-ping rounded-full opacity-75",
level.color2,
)}
/>
<span
className={cn(
- "relative inline-flex rounded-full h-2 w-2",
+ "relative inline-flex h-2 w-2 rounded-full",
level.color,
)}
/>
diff --git a/components/web/testimonials.tsx b/components/web/testimonials.tsx
index 7bc405c2..068998e0 100644
--- a/components/web/testimonials.tsx
+++ b/components/web/testimonials.tsx
@@ -1,4 +1,5 @@
import Image from "next/image";
+
import ProductHuntIcon from "@/components/shared/icons/producthunt";
import TwitterIcon from "@/components/shared/icons/twitter";
@@ -74,22 +75,22 @@ const testimonials = [
export default function Testimonials() {
return (
<div className="bg-white py-24">
- <div className="w-full mx-auto max-w-7xl px-4 md:px-8">
- <h2 className="text-4xl text-balance">
+ <div className="mx-auto w-full max-w-7xl px-4 md:px-8">
+ <h2 className="text-balance text-4xl">
Loved by over 5000 customers and users.
<br />
<span className="text-gray-500">
Here&apos;s what they have to say about us.
</span>
</h2>
- <div className="mx-auto max-w-2xl lg:max-w-none mt-8">
+ <div className="mx-auto mt-8 max-w-2xl lg:max-w-none">
<div className="space-y-6 py-8 sm:block sm:columns-2 sm:gap-6 lg:columns-3">
{testimonials.map((testimonial) => (
<div
key={testimonial.author.handle}
- className="flex w-full relative"
+ className="relative flex w-full"
>
- <div className="rounded-lg shadow-lg border-gray-500 bg-white p-6 text-base leading-6 border relative">
+ <div className="relative rounded-lg border border-gray-500 bg-white p-6 text-base leading-6 shadow-lg">
<div className="flex flex-col justify-between">
<div className="flex items-center justify-between gap-x-4">
<div className="flex items-center gap-x-4">
@@ -119,9 +120,9 @@ export default function Testimonials() {
className=""
>
{testimonial.producthunt ? (
- <ProductHuntIcon className="w-6 h-6 text-gray-800" />
+ <ProductHuntIcon className="h-6 w-6 text-gray-800" />
) : (
- <TwitterIcon className="w-5 h-5 text-gray-800" />
+ <TwitterIcon className="h-5 w-5 text-gray-800" />
)}
</a>
</div>
diff --git a/components/web/testimonials2.tsx b/components/web/testimonials2.tsx
index 17b7c2cb..ebba49c0 100644
--- a/components/web/testimonials2.tsx
+++ b/components/web/testimonials2.tsx
@@ -1,36 +1,37 @@
+import Image from "next/image";
+
+import dominikimage from "@/public/testimonials/dominik.jpg";
import jaskiimage from "@/public/testimonials/jaski.jpeg";
import vatanyutaimage from "@/public/testimonials/vatanyuta.png";
-import dominikimage from "@/public/testimonials/dominik.jpg";
-import Image from "next/image";
export default function Testimonials() {
return (
<div className="bg-white py-24">
- <div className="w-full mx-auto max-w-7xl px-4 md:px-8">
- <h2 className="text-4xl text-balance">
+ <div className="mx-auto w-full max-w-7xl px-4 md:px-8">
+ <h2 className="text-balance text-4xl">
Loved by over 5000 customers and users.
<br />
<span className="text-gray-500">
Here&apos;s what they have to say about us.
</span>
</h2>
- <div className="flex justify-center w-full bg-white">
+ <div className="flex w-full justify-center bg-white">
<div className="flex w-full max-w-7xl py-12">
- <div className="flex w-full justify-center bg-white rounded-3xl">
- <div className="grid grid-cols-1 md:grid-cols-3 gap-8 w-full">
+ <div className="flex w-full justify-center rounded-3xl bg-white">
+ <div className="grid w-full grid-cols-1 gap-8 md:grid-cols-3">
{/* Column 1 */}
<div className="flex flex-col items-center">
{/* Image container */}
- <div className="flex flex-col items-center bg-white rounded-3xl shadow-xl overflow-hidden">
+ <div className="flex flex-col items-center overflow-hidden rounded-3xl bg-white shadow-xl">
{/* Image container */}
<Image
- className="w-full h-80 object-cover"
+ className="h-80 w-full object-cover"
src={jaskiimage}
alt="Testimonial 1"
/>
{/* Text content */}
<div className="p-8">
- <blockquote className="text-gray-700 text-lg">
+ <blockquote className="text-lg text-gray-700">
<p>
Papermark team listens to their users. Thanks for
solving a big pain. DocSend monopoly will end soon!
@@ -49,16 +50,16 @@ export default function Testimonials() {
<div className="flex flex-col items-center">
{/* Image container */}
{/* Image container */}
- <div className="flex flex-col items-center bg-white rounded-3xl shadow-xl overflow-hidden">
+ <div className="flex flex-col items-center overflow-hidden rounded-3xl bg-white shadow-xl">
{/* Image container */}
<Image
- className="w-full h-80 object-cover"
+ className="h-80 w-full object-cover"
src={vatanyutaimage}
alt="Testimonial 1"
/>
{/* Text content */}
<div className="p-8">
- <blockquote className="text-gray-700 text-lg">
+ <blockquote className="text-lg text-gray-700">
<p>
We actively use Papermark to create many links and
track analytics for our branded data room!
@@ -77,16 +78,16 @@ export default function Testimonials() {
<div className="flex flex-col items-center">
{/* Image container */}
{/* Image container */}
- <div className="flex flex-col items-center bg-white rounded-3xl shadow-xl overflow-hidden">
+ <div className="flex flex-col items-center overflow-hidden rounded-3xl bg-white shadow-xl">
{/* Image container */}
<Image
- className="w-full h-80 object-cover"
+ className="h-80 w-full object-cover"
src={dominikimage}
alt="Testimonial 1"
/>
{/* Text content */}
<div className="p-8">
- <blockquote className="text-gray-700 text-lg">
+ <blockquote className="text-lg text-gray-700">
<p>
I am using Papermark daily sharing documents to LPs
and viewing the pitch decks from founders.
diff --git a/components/welcome/dataroom-trial.tsx b/components/welcome/dataroom-trial.tsx
index bb23dcce..f51d1836 100644
--- a/components/welcome/dataroom-trial.tsx
+++ b/components/welcome/dataroom-trial.tsx
@@ -1,8 +1,16 @@
import { useRouter } from "next/router";
+
+import { useState } from "react";
+
+import { useTeam } from "@/context/team-context";
import { motion } from "framer-motion";
-import { STAGGER_CHILD_VARIANTS } from "@/lib/constants";
+import { E164Number } from "libphonenumber-js/types.cjs";
+import { toast } from "sonner";
+import { mutate } from "swr";
+
import { Button } from "@/components/ui/button";
import { Label } from "@/components/ui/label";
+import { PhoneInput } from "@/components/ui/phone-input";
import {
Select,
SelectContent,
@@ -10,13 +18,10 @@ import {
SelectTrigger,
SelectValue,
} from "@/components/ui/select";
-import { PhoneInput } from "@/components/ui/phone-input";
-import { useTeam } from "@/context/team-context";
+
import { useAnalytics } from "@/lib/analytics";
-import { mutate } from "swr";
-import { toast } from "sonner";
-import { useState } from "react";
-import { E164Number } from "libphonenumber-js/types.cjs";
+import { STAGGER_CHILD_VARIANTS } from "@/lib/constants";
+
import { UpgradePlanModal } from "../billing/upgrade-plan-modal";
import { Input } from "../ui/input";
@@ -118,7 +123,7 @@ export default function DataroomTrial() {
</motion.div>
<motion.div
variants={STAGGER_CHILD_VARIANTS}
- className="mt-24 mx-auto max-w-md w-full text-left"
+ className="mx-auto mt-24 w-full max-w-md text-left"
>
<form onSubmit={handleSubmit} className="space-y-4">
<div className="space-y-1">
@@ -131,7 +136,7 @@ export default function DataroomTrial() {
autoComplete="off"
data-1p-ignore
placeholder="John Doe"
- className="w-full mt-1 mb-4"
+ className="mb-4 mt-1 w-full"
onChange={(e) => setName(e.target.value)}
/>
</div>
@@ -145,7 +150,7 @@ export default function DataroomTrial() {
autoComplete="off"
data-1p-ignore
placeholder="ACME Inc."
- className="w-full mt-1 mb-4"
+ className="mb-4 mt-1 w-full"
onChange={(e) => setCompanyName(e.target.value)}
/>
</div>
@@ -209,10 +214,10 @@ export default function DataroomTrial() {
/>
</div>
- <div className="text-center space-y-4">
+ <div className="space-y-4 text-center">
<Button
type="submit"
- className="w-full h-9"
+ className="h-9 w-full"
disabled={
!phoneNumber ||
!companySize ||
diff --git a/components/welcome/dataroom.tsx b/components/welcome/dataroom.tsx
index 38d71ddf..06bffbe2 100644
--- a/components/welcome/dataroom.tsx
+++ b/components/welcome/dataroom.tsx
@@ -1,9 +1,12 @@
import { useRouter } from "next/router";
+
import { motion } from "framer-motion";
import { File as DocumentIcon, ServerIcon } from "lucide-react";
+
import { STAGGER_CHILD_VARIANTS } from "@/lib/constants";
-import { Button } from "../ui/button";
+
import { DataroomTrialModal } from "../datarooms/dataroom-trial-modal";
+import { Button } from "../ui/button";
export default function Dataroom() {
const router = useRouter();
@@ -38,7 +41,7 @@ export default function Dataroom() {
</motion.div>
<motion.div
variants={STAGGER_CHILD_VARIANTS}
- className="mt-24 mx-auto w-full"
+ className="mx-auto mt-24 w-full"
>
<video
width="100%"
@@ -59,10 +62,10 @@ export default function Dataroom() {
</motion.div>
<motion.div
variants={STAGGER_CHILD_VARIANTS}
- className="flex flex-col items-center space-y-4 text-center mt-10"
+ className="mt-10 flex flex-col items-center space-y-4 text-center"
>
<Button
- className="px-10 font-medium text-base"
+ className="px-10 text-base font-medium"
onClick={() =>
router.push({
pathname: "/welcome",
diff --git a/components/welcome/intro.tsx b/components/welcome/intro.tsx
index 5e4a0a68..926c9472 100644
--- a/components/welcome/intro.tsx
+++ b/components/welcome/intro.tsx
@@ -1,6 +1,9 @@
import { useRouter } from "next/router";
+
import { motion } from "framer-motion";
+
import { STAGGER_CHILD_VARIANTS } from "@/lib/constants";
+
import { Button } from "../ui/button";
export default function Intro() {
@@ -43,7 +46,7 @@ export default function Intro() {
// className="rounded px-10 py-2 font-medium transition-colors text-gray-900 bg-gray-100 hover:text-gray-100 hover:bg-gray-500"
>
<Button
- className="px-10 font-medium text-base"
+ className="px-10 text-base font-medium"
onClick={() =>
router.push({
pathname: "/welcome",
diff --git a/components/welcome/next.tsx b/components/welcome/next.tsx
index 962919ce..b637f242 100644
--- a/components/welcome/next.tsx
+++ b/components/welcome/next.tsx
@@ -1,12 +1,15 @@
import { useRouter } from "next/router";
+
import { motion } from "framer-motion";
import {
File as DocumentIcon,
Presentation as PresentationChartBarIcon,
} from "lucide-react";
-import { STAGGER_CHILD_VARIANTS } from "@/lib/constants";
+
import NotionIcon from "@/components/shared/icons/notion";
+import { STAGGER_CHILD_VARIANTS } from "@/lib/constants";
+
export default function Next() {
const router = useRouter();
return (
@@ -40,7 +43,7 @@ export default function Next() {
</motion.div>
<motion.div
variants={STAGGER_CHILD_VARIANTS}
- className="grid w-full grid-cols-1 divide-y divide-border text-foreground rounded-md border border-border md:grid-cols-3 md:divide-x"
+ className="grid w-full grid-cols-1 divide-y divide-border rounded-md border border-border text-foreground md:grid-cols-3 md:divide-x"
>
<button
onClick={() =>
@@ -51,9 +54,9 @@ export default function Next() {
},
})
}
- className="flex flex-col items-center justify-center overflow-hidden p-5 space-y-5 transition-colors hover:bg-gray-200 hover:dark:bg-gray-800 md:p-10 min-h-[200px]"
+ className="flex min-h-[200px] flex-col items-center justify-center space-y-5 overflow-hidden p-5 transition-colors hover:bg-gray-200 hover:dark:bg-gray-800 md:p-10"
>
- <PresentationChartBarIcon className="h-auto pointer-events-none w-12 sm:w-12" />
+ <PresentationChartBarIcon className="pointer-events-none h-auto w-12 sm:w-12" />
<p>Pitchdeck</p>
</button>
<button
@@ -65,9 +68,9 @@ export default function Next() {
},
})
}
- className="flex flex-col items-center justify-center overflow-hidden p-5 space-y-5 transition-colors hover:bg-gray-200 hover:dark:bg-gray-800 md:p-10 min-h-[200px]"
+ className="flex min-h-[200px] flex-col items-center justify-center space-y-5 overflow-hidden p-5 transition-colors hover:bg-gray-200 hover:dark:bg-gray-800 md:p-10"
>
- <DocumentIcon className="h-auto pointer-events-none w-12 sm:w-12" />
+ <DocumentIcon className="pointer-events-none h-auto w-12 sm:w-12" />
<p>Another document</p>
</button>
<button
@@ -79,16 +82,16 @@ export default function Next() {
},
})
}
- className="flex flex-col items-center justify-center overflow-hidden p-5 space-y-5 transition-colors hover:bg-gray-200 hover:dark:bg-gray-800 md:p-10 min-h-[200px]"
+ className="flex min-h-[200px] flex-col items-center justify-center space-y-5 overflow-hidden p-5 transition-colors hover:bg-gray-200 hover:dark:bg-gray-800 md:p-10"
>
- <NotionIcon className="h-auto pointer-events-none w-12 sm:w-12" />
+ <NotionIcon className="pointer-events-none h-auto w-12 sm:w-12" />
<p>Notion Page</p>
</button>
</motion.div>
<motion.div variants={STAGGER_CHILD_VARIANTS} className="text-center">
<button
- className="text-center text-sm text-muted-foreground underline-offset-4 transition-all hover:text-gray-800 hover:dark:text-muted-foreground/80 hover:underline"
+ className="text-center text-sm text-muted-foreground underline-offset-4 transition-all hover:text-gray-800 hover:underline hover:dark:text-muted-foreground/80"
onClick={() =>
router.push({
pathname: "/welcome",
diff --git a/components/welcome/notion-form.tsx b/components/welcome/notion-form.tsx
index fcb01cdc..6db7e35c 100644
--- a/components/welcome/notion-form.tsx
+++ b/components/welcome/notion-form.tsx
@@ -1,31 +1,36 @@
import { useRouter } from "next/router";
+
+import { type FormEvent, use, useState } from "react";
+
+import { useTeam } from "@/context/team-context";
import { motion } from "framer-motion";
-import { use, useState, type FormEvent } from "react";
-import { toast } from "sonner";
-import Skeleton from "../Skeleton";
-import { STAGGER_CHILD_VARIANTS } from "@/lib/constants";
-import {
- convertDataUrlToFile,
- copyToClipboard,
- uploadImage,
-} from "@/lib/utils";
-import { Button } from "@/components/ui/button";
import { usePlausible } from "next-plausible";
-import { useTeam } from "@/context/team-context";
-import { Label } from "@/components/ui/label";
import { parsePageId } from "notion-utils";
-import { LinkOptions } from "@/components/links/link-sheet/link-options";
+import { toast } from "sonner";
+
import {
DEFAULT_LINK_PROPS,
DEFAULT_LINK_TYPE,
} from "@/components/links/link-sheet";
+import { LinkOptions } from "@/components/links/link-sheet/link-options";
import {
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,
} from "@/components/ui/accordion";
+import { Button } from "@/components/ui/button";
+import { Label } from "@/components/ui/label";
+
import { useAnalytics } from "@/lib/analytics";
+import { STAGGER_CHILD_VARIANTS } from "@/lib/constants";
+import {
+ convertDataUrlToFile,
+ copyToClipboard,
+ uploadImage,
+} from "@/lib/utils";
+
+import Skeleton from "../Skeleton";
export default function NotionForm() {
const router = useRouter();
@@ -183,7 +188,7 @@ export default function NotionForm() {
<>
{!currentDocId && (
<motion.div
- className="z-10 flex flex-col space-y-10 -mt-10"
+ className="z-10 -mt-10 flex flex-col space-y-10"
variants={{
hidden: { opacity: 0, scale: 0.95 },
show: {
@@ -221,7 +226,7 @@ export default function NotionForm() {
name="notion-link"
id="notion-link"
placeholder="notion.site/..."
- className="flex w-full rounded-md border-0 py-1.5 text-foreground bg-background shadow-sm ring-1 ring-inset ring-input placeholder:text-muted-foreground focus:ring-2 focus:ring-inset focus:ring-gray-400 sm:text-sm sm:leading-6"
+ className="flex w-full rounded-md border-0 bg-background py-1.5 text-foreground shadow-sm ring-1 ring-inset ring-input placeholder:text-muted-foreground focus:ring-2 focus:ring-inset focus:ring-gray-400 sm:text-sm sm:leading-6"
value={notionLink || ""}
onChange={(e) => setNotionLink(e.target.value)}
/>
@@ -246,7 +251,7 @@ export default function NotionForm() {
<span>Use our</span>{" "}
<Button
variant="link"
- className="text-xs font-normal px-0 underline text-muted-foreground hover:text-gray-700"
+ className="px-0 text-xs font-normal text-muted-foreground underline hover:text-gray-700"
onClick={async () => {
setNotionLink(
"https://mfts.notion.site/Papermark-7b582345016b42b6951396f6ee626121",
@@ -304,17 +309,17 @@ export default function NotionForm() {
<div className="flex flex-col justify-center">
<div className="relative">
<div className="flex py-8">
- <div className="flex w-full max-w-xs sm:max-w-lg focus-within:z-10">
- <p className="block w-full md:min-w-[500px] rounded-md px-4 text-left border-0 py-1.5 text-secondary-foreground bg-secondary leading-6 overflow-y-scroll">
+ <div className="flex w-full max-w-xs focus-within:z-10 sm:max-w-lg">
+ <p className="block w-full overflow-y-scroll rounded-md border-0 bg-secondary px-4 py-1.5 text-left leading-6 text-secondary-foreground md:min-w-[500px]">
{`${process.env.NEXT_PUBLIC_BASE_URL}/view/${currentLinkId}`}
</p>
</div>
</div>
</div>
- <div className="w-full max-w-xs sm:max-w-lg pb-8">
+ <div className="w-full max-w-xs pb-8 sm:max-w-lg">
<Accordion type="single" collapsible>
<AccordionItem value="item-1" className="border-none">
- <AccordionTrigger className="py-0 rounded-lg space-x-2">
+ <AccordionTrigger className="space-x-2 rounded-lg py-0">
<span className="text-sm font-medium leading-6 text-foreground">
Configure Link Options
</span>
@@ -325,7 +330,7 @@ export default function NotionForm() {
</AccordionItem>
</Accordion>
</div>
- <div className="flex items-center justify-center mb-4">
+ <div className="mb-4 flex items-center justify-center">
<Button loading={isLoading} onClick={handleSubmit}>
Share document link
</Button>
diff --git a/components/welcome/upload.tsx b/components/welcome/upload.tsx
index b91db7ad..8ab8b554 100644
--- a/components/welcome/upload.tsx
+++ b/components/welcome/upload.tsx
@@ -1,29 +1,34 @@
import { useRouter } from "next/router";
-import { motion } from "framer-motion";
+
import { useState } from "react";
-import DocumentUpload from "@/components/document-upload";
-import { toast } from "sonner";
-import Skeleton from "../Skeleton";
-import { STAGGER_CHILD_VARIANTS } from "@/lib/constants";
-import {
- convertDataUrlToFile,
- copyToClipboard,
- uploadImage,
-} from "@/lib/utils";
-import { Button } from "@/components/ui/button";
-import { usePlausible } from "next-plausible";
+
import { useTeam } from "@/context/team-context";
+import { motion } from "framer-motion";
+import { usePlausible } from "next-plausible";
+import { toast } from "sonner";
+
+import DocumentUpload from "@/components/document-upload";
import {
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,
} from "@/components/ui/accordion";
-import { LinkOptions } from "../links/link-sheet/link-options";
-import { DEFAULT_LINK_PROPS, DEFAULT_LINK_TYPE } from "../links/link-sheet";
+import { Button } from "@/components/ui/button";
+
import { useAnalytics } from "@/lib/analytics";
-import { putFile } from "@/lib/files/put-file";
+import { STAGGER_CHILD_VARIANTS } from "@/lib/constants";
import { DocumentData, createDocument } from "@/lib/documents/create-document";
+import { putFile } from "@/lib/files/put-file";
+import {
+ convertDataUrlToFile,
+ copyToClipboard,
+ uploadImage,
+} from "@/lib/utils";
+
+import Skeleton from "../Skeleton";
+import { DEFAULT_LINK_PROPS, DEFAULT_LINK_TYPE } from "../links/link-sheet";
+import { LinkOptions } from "../links/link-sheet/link-options";
export default function Upload() {
const router = useRouter();
@@ -213,7 +218,7 @@ export default function Upload() {
<span>Use our</span>{" "}
<Button
variant="link"
- className="text-xs font-normal px-0 underline text-muted-foreground hover:text-gray-700"
+ className="px-0 text-xs font-normal text-muted-foreground underline hover:text-gray-700"
onClick={async () => {
const response = await fetch(
"/_example/papermark-example-document.pdf",
@@ -281,17 +286,17 @@ export default function Upload() {
<div className="flex flex-col justify-center">
<div className="relative">
<div className="flex py-8">
- <div className="flex w-full max-w-xs sm:max-w-lg focus-within:z-10">
- <p className="block w-full md:min-w-[500px] rounded-md px-4 text-left border-0 py-1.5 text-secondary-foreground bg-secondary leading-6 overflow-y-scroll">
+ <div className="flex w-full max-w-xs focus-within:z-10 sm:max-w-lg">
+ <p className="block w-full overflow-y-scroll rounded-md border-0 bg-secondary px-4 py-1.5 text-left leading-6 text-secondary-foreground md:min-w-[500px]">
{`${process.env.NEXT_PUBLIC_BASE_URL}/view/${currentLinkId}`}
</p>
</div>
</div>
</div>
- <div className="w-full max-w-xs sm:max-w-lg pb-8">
+ <div className="w-full max-w-xs pb-8 sm:max-w-lg">
<Accordion type="single" collapsible>
<AccordionItem value="item-1" className="border-none">
- <AccordionTrigger className="py-0 rounded-lg space-x-2">
+ <AccordionTrigger className="space-x-2 rounded-lg py-0">
<span className="text-sm font-medium leading-6 text-foreground">
Configure Link Options
</span>
@@ -302,7 +307,7 @@ export default function Upload() {
</AccordionItem>
</Accordion>
</div>
- <div className="flex items-center justify-center mb-4">
+ <div className="mb-4 flex items-center justify-center">
<Button onClick={handleSubmit} loading={isLoading}>
Share Document
</Button>
diff --git a/context/team-context.tsx b/context/team-context.tsx
index dce7d139..e90bb5c9 100644
--- a/context/team-context.tsx
+++ b/context/team-context.tsx
@@ -5,6 +5,7 @@ import {
useMemo,
useState,
} from "react";
+
import { useTeams } from "@/lib/swr/use-teams";
import { Team } from "@/lib/types";
diff --git a/ee/limits/handler.ts b/ee/limits/handler.ts
index 8305df83..a93dba4c 100644
--- a/ee/limits/handler.ts
+++ b/ee/limits/handler.ts
@@ -1,8 +1,10 @@
import { NextApiRequest, NextApiResponse } from "next";
-import { getServerSession } from "next-auth";
-import { CustomUser } from "@/lib/types";
+
import { getLimits } from "@/ee/limits/server";
import { authOptions } from "@/pages/api/auth/[...nextauth]";
+import { getServerSession } from "next-auth";
+
+import { CustomUser } from "@/lib/types";
export default async function handle(
req: NextApiRequest,
diff --git a/ee/limits/server.ts b/ee/limits/server.ts
index 321c617b..2a9cdbb2 100644
--- a/ee/limits/server.ts
+++ b/ee/limits/server.ts
@@ -1,6 +1,7 @@
-import prisma from "@/lib/prisma";
import { z } from "zod";
+import prisma from "@/lib/prisma";
+
export async function getLimits({
teamId,
userId,
diff --git a/ee/limits/swr-handler.ts b/ee/limits/swr-handler.ts
index 1db08d16..1aa229fb 100644
--- a/ee/limits/swr-handler.ts
+++ b/ee/limits/swr-handler.ts
@@ -1,5 +1,6 @@
import { useTeam } from "@/context/team-context";
import useSWR from "swr";
+
import { fetcher } from "@/lib/utils";
export type LimitProps = {
diff --git a/jobs/convert-pdf-to-image.ts b/jobs/convert-pdf-to-image.ts
index 1d5cb38e..cb5c3945 100644
--- a/jobs/convert-pdf-to-image.ts
+++ b/jobs/convert-pdf-to-image.ts
@@ -1,8 +1,9 @@
import { client } from "@/trigger";
import { eventTrigger, retry } from "@trigger.dev/sdk";
import { z } from "zod";
-import prisma from "@/lib/prisma";
+
import { getFile } from "@/lib/files/get-file";
+import prisma from "@/lib/prisma";
client.defineJob({
id: "convert-pdf-to-image",
diff --git a/jobs/send-dataroom-notification.ts b/jobs/send-dataroom-notification.ts
index 4f6293f7..da0f24d8 100644
--- a/jobs/send-dataroom-notification.ts
+++ b/jobs/send-dataroom-notification.ts
@@ -1,6 +1,7 @@
import { client } from "@/trigger";
import { eventTrigger } from "@trigger.dev/sdk";
import { z } from "zod";
+
import prisma from "@/lib/prisma";
client.defineJob({
diff --git a/lib/analytics/index.ts b/lib/analytics/index.ts
index 9ae8672d..3817cdad 100644
--- a/lib/analytics/index.ts
+++ b/lib/analytics/index.ts
@@ -1,8 +1,9 @@
import { emptyAnalytics, jitsuAnalytics } from "@jitsu/js";
-import { AnalyticsEvents } from "@/lib/types";
-import { getPostHogConfig } from "@/lib/posthog";
import { posthog } from "posthog-js";
+import { getPostHogConfig } from "@/lib/posthog";
+import { AnalyticsEvents } from "@/lib/types";
+
export function useAnalytics() {
const isPostHogEnabled = getPostHogConfig();
diff --git a/lib/api/auth/passkey.ts b/lib/api/auth/passkey.ts
index 969db583..5916228a 100644
--- a/lib/api/auth/passkey.ts
+++ b/lib/api/auth/passkey.ts
@@ -1,7 +1,8 @@
-import hanko from "@/lib/hanko";
-import { CustomUser } from "@/lib/types";
import { type Session } from "next-auth";
+
+import hanko from "@/lib/hanko";
import prisma from "@/lib/prisma";
+import { CustomUser } from "@/lib/types";
export async function startServerPasskeyRegistration({
session,
diff --git a/lib/api/domains.ts b/lib/api/domains.ts
index f8799ea2..6bf8f831 100644
--- a/lib/api/domains.ts
+++ b/lib/api/domains.ts
@@ -1,4 +1,5 @@
import prisma from "@/lib/prisma";
+
import { getApexDomain, removeDomainFromVercel } from "../domains";
// calculate the domainCount
diff --git a/lib/api/notification-helper.ts b/lib/api/notification-helper.ts
index 9c2eb56d..9171d197 100644
--- a/lib/api/notification-helper.ts
+++ b/lib/api/notification-helper.ts
@@ -1,4 +1,5 @@
import { getTriggerClient } from "@/trigger";
+
import { log } from "@/lib/utils";
export default async function sendNotification({ viewId }: { viewId: string }) {
diff --git a/lib/content/blog.ts b/lib/content/blog.ts
index e71fde9c..874723e8 100644
--- a/lib/content/blog.ts
+++ b/lib/content/blog.ts
@@ -1,5 +1,7 @@
-import matter from "gray-matter";
import { cache } from "react";
+
+import matter from "gray-matter";
+
import { getHeadings } from "./utils";
type Post = {
diff --git a/lib/content/help.ts b/lib/content/help.ts
index d6c6b9ca..d905d5da 100644
--- a/lib/content/help.ts
+++ b/lib/content/help.ts
@@ -1,5 +1,7 @@
-import matter from "gray-matter";
import { cache } from "react";
+
+import matter from "gray-matter";
+
import { getHeadings } from "./utils";
type Article = {
diff --git a/lib/cron/index.ts b/lib/cron/index.ts
index 07015e97..570ca49d 100644
--- a/lib/cron/index.ts
+++ b/lib/cron/index.ts
@@ -1,6 +1,6 @@
-import Bottleneck from "bottleneck";
import { Receiver } from "@upstash/qstash";
import { Client } from "@upstash/qstash";
+import Bottleneck from "bottleneck";
// we're using Bottleneck to avoid running into Resend's rate limit of 10 req/s
export const limiter = new Bottleneck({
diff --git a/lib/domains.ts b/lib/domains.ts
index a7554764..a52ef778 100644
--- a/lib/domains.ts
+++ b/lib/domains.ts
@@ -1,6 +1,6 @@
import {
- DomainResponse,
DomainConfigResponse,
+ DomainResponse,
DomainVerificationResponse,
} from "@/lib/types";
diff --git a/lib/emails/send-dataroom-notification.ts b/lib/emails/send-dataroom-notification.ts
index 7fbf6865..3dd61834 100644
--- a/lib/emails/send-dataroom-notification.ts
+++ b/lib/emails/send-dataroom-notification.ts
@@ -1,4 +1,5 @@
import DataroomNotification from "@/components/emails/dataroom-notification";
+
import { sendEmail } from "@/lib/resend";
export const sendDataroomNotification = async ({
diff --git a/lib/emails/send-dataroom-viewer-invite.ts b/lib/emails/send-dataroom-viewer-invite.ts
index c4f0b32e..d6dfd118 100644
--- a/lib/emails/send-dataroom-viewer-invite.ts
+++ b/lib/emails/send-dataroom-viewer-invite.ts
@@ -1,4 +1,5 @@
import DataroomViewerInvitation from "@/components/emails/dataroom-viewer-invitation";
+
import { sendEmail } from "@/lib/resend";
export const sendDataroomViewerInvite = async ({
diff --git a/lib/emails/send-deleted-domain.ts b/lib/emails/send-deleted-domain.ts
index 239d30e9..b2f9f6ad 100644
--- a/lib/emails/send-deleted-domain.ts
+++ b/lib/emails/send-deleted-domain.ts
@@ -1,6 +1,7 @@
-import { sendEmail } from "@/lib/resend";
import DeletedDomainEmail from "@/components/emails/deleted-domain";
+import { sendEmail } from "@/lib/resend";
+
export const sendDeletedDomainEmail = async (email: string, domain: string) => {
const emailTemplate = DeletedDomainEmail({ domain });
try {
diff --git a/lib/emails/send-email-verification.ts b/lib/emails/send-email-verification.ts
index 0e55d51a..3f8b7d6e 100644
--- a/lib/emails/send-email-verification.ts
+++ b/lib/emails/send-email-verification.ts
@@ -1,6 +1,7 @@
-import { sendEmail } from "@/lib/resend";
import EmailVerification from "@/components/emails/email-verification";
+import { sendEmail } from "@/lib/resend";
+
export const sendVerificationEmail = async (
email: string,
verificationURL: string,
diff --git a/lib/emails/send-invalid-domain.ts b/lib/emails/send-invalid-domain.ts
index d6c0a540..cbb9703c 100644
--- a/lib/emails/send-invalid-domain.ts
+++ b/lib/emails/send-invalid-domain.ts
@@ -1,6 +1,7 @@
-import { sendEmail } from "@/lib/resend";
import InvalidDomainEmail from "@/components/emails/invalid-domain";
+import { sendEmail } from "@/lib/resend";
+
export const sendInvalidDomainEmail = async (
email: string,
domain: string,
diff --git a/lib/emails/send-teammate-invite.ts b/lib/emails/send-teammate-invite.ts
index 107a5e4f..0c714fb1 100644
--- a/lib/emails/send-teammate-invite.ts
+++ b/lib/emails/send-teammate-invite.ts
@@ -1,4 +1,5 @@
import TeamInvitation from "@/components/emails/team-invitation";
+
import { sendEmail } from "@/lib/resend";
export const sendTeammateInviteEmail = async ({
diff --git a/lib/emails/send-trial-end-final-reminder.ts b/lib/emails/send-trial-end-final-reminder.ts
index e46c1556..44c5e503 100644
--- a/lib/emails/send-trial-end-final-reminder.ts
+++ b/lib/emails/send-trial-end-final-reminder.ts
@@ -1,6 +1,7 @@
-import { sendEmail } from "@/lib/resend";
import TrialEndFinalReminderEmail from "@/components/emails/trial-end-final-reminder";
+import { sendEmail } from "@/lib/resend";
+
export const sendTrialEndFinalReminderEmail = async (
email: string,
name: string | null,
diff --git a/lib/emails/send-trial-end-reminder.ts b/lib/emails/send-trial-end-reminder.ts
index ac0e8e23..fa4c206f 100644
--- a/lib/emails/send-trial-end-reminder.ts
+++ b/lib/emails/send-trial-end-reminder.ts
@@ -1,6 +1,7 @@
-import { sendEmail } from "@/lib/resend";
import TrialEndReminderEmail from "@/components/emails/trial-end-reminder";
+import { sendEmail } from "@/lib/resend";
+
export const sendTrialEndReminderEmail = async (
email: string,
name: string | null,
diff --git a/lib/emails/send-upgrade-plan.ts b/lib/emails/send-upgrade-plan.ts
index bc4790e4..e9c3ce85 100644
--- a/lib/emails/send-upgrade-plan.ts
+++ b/lib/emails/send-upgrade-plan.ts
@@ -1,5 +1,7 @@
-import { sendEmail } from "@/lib/resend";
import UpgradePlanEmail from "@/components/emails/upgrade-plan";
+
+import { sendEmail } from "@/lib/resend";
+
import { CreateUserEmailProps } from "../types";
export const sendUpgradePlanEmail = async (params: CreateUserEmailProps) => {
diff --git a/lib/emails/send-verification-request.ts b/lib/emails/send-verification-request.ts
index 234a01f6..d372c0cf 100644
--- a/lib/emails/send-verification-request.ts
+++ b/lib/emails/send-verification-request.ts
@@ -1,6 +1,7 @@
-import { sendEmail } from "@/lib/resend";
import LoginLink from "@/components/emails/verification-link";
+import { sendEmail } from "@/lib/resend";
+
export const sendVerificationRequestEmail = async (params: {
email: string;
url: string;
diff --git a/lib/emails/send-viewed-document.ts b/lib/emails/send-viewed-document.ts
index ade06360..ef05c0db 100644
--- a/lib/emails/send-viewed-document.ts
+++ b/lib/emails/send-viewed-document.ts
@@ -1,6 +1,7 @@
-import { sendEmail } from "@/lib/resend";
import ViewedDocumentEmail from "@/components/emails/viewed-document";
+import { sendEmail } from "@/lib/resend";
+
export const sendViewedDocumentEmail = async ({
ownerEmail,
documentId,
diff --git a/lib/emails/send-welcome.ts b/lib/emails/send-welcome.ts
index 2da9f53c..f81bd095 100644
--- a/lib/emails/send-welcome.ts
+++ b/lib/emails/send-welcome.ts
@@ -1,5 +1,7 @@
-import { sendEmail } from "@/lib/resend";
import WelcomeEmail from "@/components/emails/welcome";
+
+import { sendEmail } from "@/lib/resend";
+
import { CreateUserEmailProps } from "../types";
export const sendWelcomeEmail = async (params: CreateUserEmailProps) => {
diff --git a/lib/files/delete-file-server.ts b/lib/files/delete-file-server.ts
index 84c4f750..bcf79908 100644
--- a/lib/files/delete-file-server.ts
+++ b/lib/files/delete-file-server.ts
@@ -1,10 +1,9 @@
-import { match } from "ts-pattern";
-
+import { DeleteObjectsCommand, ListObjectsV2Command } from "@aws-sdk/client-s3";
import { DocumentStorageType } from "@prisma/client";
+import { del } from "@vercel/blob";
+import { match } from "ts-pattern";
import { getS3Client } from "./aws-client";
-import { DeleteObjectsCommand, ListObjectsV2Command } from "@aws-sdk/client-s3";
-import { del } from "@vercel/blob";
export type DeleteFileOptions = {
type: DocumentStorageType;
diff --git a/lib/files/get-file.ts b/lib/files/get-file.ts
index eb46f581..7182c0ed 100644
--- a/lib/files/get-file.ts
+++ b/lib/files/get-file.ts
@@ -1,7 +1,6 @@
-import { match } from "ts-pattern";
-
import { DocumentStorageType } from "@prisma/client";
import { getDownloadUrl } from "@vercel/blob";
+import { match } from "ts-pattern";
export type GetFileOptions = {
type: DocumentStorageType;
diff --git a/lib/files/put-file-server.ts b/lib/files/put-file-server.ts
index 82798ddf..3b57b214 100644
--- a/lib/files/put-file-server.ts
+++ b/lib/files/put-file-server.ts
@@ -1,12 +1,13 @@
+import { PutObjectCommand } from "@aws-sdk/client-s3";
+import { DocumentStorageType } from "@prisma/client";
+import slugify from "@sindresorhus/slugify";
+import { put } from "@vercel/blob";
+import path from "node:path";
import { match } from "ts-pattern";
-import { DocumentStorageType } from "@prisma/client";
import { newId } from "@/lib/id-helper";
-import { put } from "@vercel/blob";
-import { PutObjectCommand } from "@aws-sdk/client-s3";
+
import { getS3Client } from "./aws-client";
-import slugify from "@sindresorhus/slugify";
-import path from "node:path";
// `File` is a web API type and not available server-side, so we need to define our own type
type File = {
diff --git a/lib/files/put-file.ts b/lib/files/put-file.ts
index b90d23ff..279a5ec0 100644
--- a/lib/files/put-file.ts
+++ b/lib/files/put-file.ts
@@ -1,9 +1,9 @@
-import { match } from "ts-pattern";
+import { DocumentStorageType } from "@prisma/client";
import { upload } from "@vercel/blob/client";
+import { match } from "ts-pattern";
-import { DocumentStorageType } from "@prisma/client";
-import { getPagesCount } from "@/lib/utils/get-page-number-count";
import { newId } from "@/lib/id-helper";
+import { getPagesCount } from "@/lib/utils/get-page-number-count";
// type File = {
// name: string;
diff --git a/lib/middleware/app.ts b/lib/middleware/app.ts
index 43072978..e480f277 100644
--- a/lib/middleware/app.ts
+++ b/lib/middleware/app.ts
@@ -1,4 +1,5 @@
import { NextRequest, NextResponse } from "next/server";
+
import { getToken } from "next-auth/jwt";
export default async function AppMiddleware(req: NextRequest) {
diff --git a/lib/middleware/domain.ts b/lib/middleware/domain.ts
index 4bd11bfd..8b740a42 100644
--- a/lib/middleware/domain.ts
+++ b/lib/middleware/domain.ts
@@ -1,4 +1,5 @@
import { NextRequest, NextResponse } from "next/server";
+
import { BLOCKED_PATHNAMES, PAPERMARK_HEADERS } from "@/lib/constants";
export default async function DomainMiddleware(req: NextRequest) {
diff --git a/lib/resend.ts b/lib/resend.ts
index 96fb50ae..c4dfc55e 100644
--- a/lib/resend.ts
+++ b/lib/resend.ts
@@ -1,7 +1,9 @@
-import { log, nanoid } from "@/lib/utils";
-import { ReactElement, JSXElementConstructor } from "react";
+import { JSXElementConstructor, ReactElement } from "react";
+
import { Resend } from "resend";
+import { log, nanoid } from "@/lib/utils";
+
export const resend = process.env.RESEND_API_KEY
? new Resend(process.env.RESEND_API_KEY)
: null;
diff --git a/lib/swr/use-billing.ts b/lib/swr/use-billing.ts
index a5010562..575e16e8 100644
--- a/lib/swr/use-billing.ts
+++ b/lib/swr/use-billing.ts
@@ -1,9 +1,12 @@
import { useRouter } from "next/router";
-import useSWR from "swr";
-import { fetcher } from "@/lib/utils";
+
import { useMemo } from "react";
+
import { useTeam } from "@/context/team-context";
import { parse } from "path";
+import useSWR from "swr";
+
+import { fetcher } from "@/lib/utils";
interface BillingProps {
id: string;
diff --git a/lib/swr/use-brand.ts b/lib/swr/use-brand.ts
index bc5bc049..22b06d9d 100644
--- a/lib/swr/use-brand.ts
+++ b/lib/swr/use-brand.ts
@@ -1,9 +1,12 @@
import { useRouter } from "next/router";
-import useSWR from "swr";
-import { fetcher } from "@/lib/utils";
+
import { useMemo } from "react";
+
import { useTeam } from "@/context/team-context";
import { Brand, DataroomBrand } from "@prisma/client";
+import useSWR from "swr";
+
+import { fetcher } from "@/lib/utils";
export function useBrand() {
const teamInfo = useTeam();
diff --git a/lib/swr/use-dataroom-stats.ts b/lib/swr/use-dataroom-stats.ts
index b89340d9..f62e0542 100644
--- a/lib/swr/use-dataroom-stats.ts
+++ b/lib/swr/use-dataroom-stats.ts
@@ -1,8 +1,10 @@
import { useRouter } from "next/router";
+
+import { useTeam } from "@/context/team-context";
+import { View } from "@prisma/client";
import useSWR from "swr";
+
import { fetcher } from "@/lib/utils";
-import { View } from "@prisma/client";
-import { useTeam } from "@/context/team-context";
export type TDataroomStatsData = {
dataroomViews: View[];
diff --git a/lib/swr/use-dataroom.ts b/lib/swr/use-dataroom.ts
index 208cb6da..f97694fb 100644
--- a/lib/swr/use-dataroom.ts
+++ b/lib/swr/use-dataroom.ts
@@ -1,9 +1,11 @@
import { useRouter } from "next/router";
-import useSWR from "swr";
-import { fetcher } from "@/lib/utils";
-import { Dataroom, DataroomDocument, DataroomFolder } from "@prisma/client";
+
import { useTeam } from "@/context/team-context";
+import { Dataroom, DataroomDocument, DataroomFolder } from "@prisma/client";
+import useSWR from "swr";
+
import { LinkWithViews } from "@/lib/types";
+import { fetcher } from "@/lib/utils";
export type DataroomFolderWithCount = DataroomFolder & {
_count: {
diff --git a/lib/swr/use-datarooms.ts b/lib/swr/use-datarooms.ts
index 191166bb..26c88e8b 100644
--- a/lib/swr/use-datarooms.ts
+++ b/lib/swr/use-datarooms.ts
@@ -1,7 +1,8 @@
-import useSWR from "swr";
-import { fetcher } from "@/lib/utils";
import { useTeam } from "@/context/team-context";
import { Dataroom } from "@prisma/client";
+import useSWR from "swr";
+
+import { fetcher } from "@/lib/utils";
export type DataroomWithCount = Dataroom & {
_count: {
diff --git a/lib/swr/use-document.ts b/lib/swr/use-document.ts
index 48b2e6e0..399ad330 100644
--- a/lib/swr/use-document.ts
+++ b/lib/swr/use-document.ts
@@ -1,10 +1,12 @@
import { useRouter } from "next/router";
+
+import { useTeam } from "@/context/team-context";
+import { View } from "@prisma/client";
import useSWR from "swr";
import useSWRImmutable from "swr/immutable";
-import { fetcher } from "@/lib/utils";
+
import { DocumentWithVersion, LinkWithViews } from "@/lib/types";
-import { View } from "@prisma/client";
-import { useTeam } from "@/context/team-context";
+import { fetcher } from "@/lib/utils";
export function useDocument() {
const router = useRouter();
diff --git a/lib/swr/use-documents.ts b/lib/swr/use-documents.ts
index e262dadb..6b0176c9 100644
--- a/lib/swr/use-documents.ts
+++ b/lib/swr/use-documents.ts
@@ -1,8 +1,9 @@
-import useSWR from "swr";
-import { fetcher } from "@/lib/utils";
-import { DocumentWithLinksAndLinkCountAndViewCount } from "@/lib/types";
import { useTeam } from "@/context/team-context";
import { Folder } from "@prisma/client";
+import useSWR from "swr";
+
+import { DocumentWithLinksAndLinkCountAndViewCount } from "@/lib/types";
+import { fetcher } from "@/lib/utils";
export default function useDocuments() {
const teamInfo = useTeam();
diff --git a/lib/swr/use-domains.ts b/lib/swr/use-domains.ts
index 7ac0790f..a29cb9ba 100644
--- a/lib/swr/use-domains.ts
+++ b/lib/swr/use-domains.ts
@@ -1,7 +1,8 @@
+import { useTeam } from "@/context/team-context";
+import { Domain } from "@prisma/client";
import useSWR from "swr";
+
import { fetcher } from "@/lib/utils";
-import { Domain } from "@prisma/client";
-import { useTeam } from "@/context/team-context";
export function useDomains() {
const teamInfo = useTeam();
diff --git a/lib/swr/use-folders.ts b/lib/swr/use-folders.ts
index efa8e75a..6fae53f1 100644
--- a/lib/swr/use-folders.ts
+++ b/lib/swr/use-folders.ts
@@ -1,5 +1,6 @@
import { useTeam } from "@/context/team-context";
import useSWR from "swr";
+
import { fetcher } from "../utils";
type FolderWithParents = {
diff --git a/lib/swr/use-invitations.ts b/lib/swr/use-invitations.ts
index 70b16bcf..ca82921e 100644
--- a/lib/swr/use-invitations.ts
+++ b/lib/swr/use-invitations.ts
@@ -1,7 +1,8 @@
-import useSWR from "swr";
-import { fetcher } from "@/lib/utils";
import { useTeam } from "@/context/team-context";
import { Invitation } from "@prisma/client";
+import useSWR from "swr";
+
+import { fetcher } from "@/lib/utils";
export function useInvitations() {
const teamInfo = useTeam();
diff --git a/lib/swr/use-link.ts b/lib/swr/use-link.ts
index 1fb36344..1f3ed5c0 100644
--- a/lib/swr/use-link.ts
+++ b/lib/swr/use-link.ts
@@ -1,8 +1,11 @@
import { useRouter } from "next/router";
+
+import { View } from "@prisma/client";
import useSWR from "swr";
+
import { fetcher } from "@/lib/utils";
+
import { LinkWithDocument } from "../types";
-import { View } from "@prisma/client";
export function useLink() {
const router = useRouter();
diff --git a/lib/swr/use-stats.ts b/lib/swr/use-stats.ts
index 071200ff..91f9fccf 100644
--- a/lib/swr/use-stats.ts
+++ b/lib/swr/use-stats.ts
@@ -1,8 +1,10 @@
import { useRouter } from "next/router";
+
+import { useTeam } from "@/context/team-context";
+import { View } from "@prisma/client";
import useSWR from "swr";
+
import { fetcher } from "@/lib/utils";
-import { View } from "@prisma/client";
-import { useTeam } from "@/context/team-context";
export type TStatsData = {
views: View[];
diff --git a/lib/swr/use-team.ts b/lib/swr/use-team.ts
index b7bb3b2d..c42f6b54 100644
--- a/lib/swr/use-team.ts
+++ b/lib/swr/use-team.ts
@@ -1,7 +1,8 @@
-import useSWR from "swr";
import { useTeam } from "@/context/team-context";
-import { fetcher } from "@/lib/utils";
+import useSWR from "swr";
+
import { TeamDetail } from "@/lib/types";
+import { fetcher } from "@/lib/utils";
export function useGetTeam() {
const teamInfo = useTeam();
diff --git a/lib/swr/use-teams.ts b/lib/swr/use-teams.ts
index a701f4be..e2a837d4 100644
--- a/lib/swr/use-teams.ts
+++ b/lib/swr/use-teams.ts
@@ -1,8 +1,10 @@
import { useRouter } from "next/router";
+
+import { useSession } from "next-auth/react";
import useSWR from "swr";
-import { fetcher } from "@/lib/utils";
+
import { Team } from "@/lib/types";
-import { useSession } from "next-auth/react";
+import { fetcher } from "@/lib/utils";
export function useTeams() {
const router = useRouter();
diff --git a/lib/team/helper.ts b/lib/team/helper.ts
index 5a011275..f1ede0fb 100644
--- a/lib/team/helper.ts
+++ b/lib/team/helper.ts
@@ -1,7 +1,10 @@
-import prisma from "@/lib/prisma";
-import { DocumentError, TeamError } from "../errorHandler";
import { Document, DocumentVersion, Domain, Link, View } from "@prisma/client";
+
+import prisma from "@/lib/prisma";
import { decryptEncrpytedPassword } from "@/lib/utils";
+
+import { DocumentError, TeamError } from "../errorHandler";
+
interface ITeamUserAndDocument {
teamId: string;
userId: string;
diff --git a/lib/tinybird/pipes.ts b/lib/tinybird/pipes.ts
index e88e9516..135a39ec 100644
--- a/lib/tinybird/pipes.ts
+++ b/lib/tinybird/pipes.ts
@@ -1,6 +1,5 @@
-import { z } from "zod";
-
import { Tinybird } from "@chronark/zod-bird";
+import { z } from "zod";
const tb = new Tinybird({ token: process.env.TINYBIRD_TOKEN! });
diff --git a/lib/tinybird/publish.ts b/lib/tinybird/publish.ts
index 00f8c8b8..ef1b6e64 100644
--- a/lib/tinybird/publish.ts
+++ b/lib/tinybird/publish.ts
@@ -1,6 +1,5 @@
-import { z } from "zod";
-
import { Tinybird } from "@chronark/zod-bird";
+import { z } from "zod";
const tb = new Tinybird({ token: process.env.TINYBIRD_TOKEN! });
diff --git a/lib/types.ts b/lib/types.ts
index b2cf4e5a..a1bae791 100644
--- a/lib/types.ts
+++ b/lib/types.ts
@@ -1,15 +1,15 @@
-import { User as NextAuthUser } from "next-auth";
import {
- Document,
- Link,
- View,
- User as PrismaUser,
- DocumentVersion,
- DataroomDocument,
Dataroom,
+ DataroomDocument,
DataroomFolder,
+ Document,
+ DocumentVersion,
Feedback,
+ Link,
+ User as PrismaUser,
+ View,
} from "@prisma/client";
+import { User as NextAuthUser } from "next-auth";
export type CustomUser = NextAuthUser & PrismaUser;
diff --git a/lib/utils.ts b/lib/utils.ts
index 92d97460..0823805e 100644
--- a/lib/utils.ts
+++ b/lib/utils.ts
@@ -1,13 +1,13 @@
-import { clsx, type ClassValue } from "clsx";
-import { twMerge } from "tailwind-merge";
-import ms from "ms";
+import { upload } from "@vercel/blob/client";
+import { Message } from "ai";
import bcrypt from "bcryptjs";
-import { toast } from "sonner";
+import { type ClassValue, clsx } from "clsx";
+import crypto from "crypto";
+import ms from "ms";
import { customAlphabet } from "nanoid";
import { ThreadMessage } from "openai/resources/beta/threads/messages/messages";
-import { Message } from "ai";
-import { upload } from "@vercel/blob/client";
-import crypto from "crypto";
+import { toast } from "sonner";
+import { twMerge } from "tailwind-merge";
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
diff --git a/lib/utils/OpenAIStream.ts b/lib/utils/OpenAIStream.ts
index 819970e1..1842f34e 100644
--- a/lib/utils/OpenAIStream.ts
+++ b/lib/utils/OpenAIStream.ts
@@ -1,7 +1,7 @@
import {
- createParser,
ParsedEvent,
ReconnectInterval,
+ createParser,
} from "eventsource-parser";
export type ChatGPTAgent = "user" | "system";
diff --git a/lib/utils/use-copy-to-clipboard.ts b/lib/utils/use-copy-to-clipboard.ts
index c661d05f..9bb165b3 100644
--- a/lib/utils/use-copy-to-clipboard.ts
+++ b/lib/utils/use-copy-to-clipboard.ts
@@ -1,6 +1,7 @@
"use client";
import * as React from "react";
+
import { toast } from "sonner";
export interface useCopyToClipboardProps {
diff --git a/lib/utils/use-enter-submit.ts b/lib/utils/use-enter-submit.ts
index 3aaeb882..d19cbe46 100644
--- a/lib/utils/use-enter-submit.ts
+++ b/lib/utils/use-enter-submit.ts
@@ -1,4 +1,4 @@
-import { useRef, type RefObject } from "react";
+import { type RefObject, useRef } from "react";
export function useEnterSubmit(): {
formRef: RefObject<HTMLFormElement>;
diff --git a/middleware.ts b/middleware.ts
index d400db90..9f8e5d35 100644
--- a/middleware.ts
+++ b/middleware.ts
@@ -1,6 +1,8 @@
import { NextFetchEvent, NextRequest, NextResponse } from "next/server";
+
import AppMiddleware from "@/lib/middleware/app";
import DomainMiddleware from "@/lib/middleware/domain";
+
import { BLOCKED_PATHNAMES } from "./lib/constants";
import PostHogMiddleware from "./lib/middleware/posthog";
diff --git a/pages/404.tsx b/pages/404.tsx
index 01bb42de..3d4cc683 100644
--- a/pages/404.tsx
+++ b/pages/404.tsx
@@ -3,14 +3,14 @@ import Link from "next/link";
export default function NotFound({ message }: { message?: string }) {
return (
<>
- <div className="min-h-screen pt-16 pb-12 flex flex-col">
- <main className="flex-grow flex flex-col justify-center max-w-7xl w-full mx-auto px-4 sm:px-6 lg:px-8">
+ <div className="flex min-h-screen flex-col pb-12 pt-16">
+ <main className="mx-auto flex w-full max-w-7xl flex-grow flex-col justify-center px-4 sm:px-6 lg:px-8">
<div className="py-16">
<div className="text-center">
- <p className="text-sm font-semibold text-indigo-600 uppercase tracking-wide">
+ <p className="text-sm font-semibold uppercase tracking-wide text-indigo-600">
404 error
</p>
- <h1 className="mt-2 text-4xl font-extrabold text-gray-100 tracking-tight sm:text-5xl">
+ <h1 className="mt-2 text-4xl font-extrabold tracking-tight text-gray-100 sm:text-5xl">
Page not found.
</h1>
<p className="mt-2 text-base text-gray-600">
diff --git a/pages/_app.tsx b/pages/_app.tsx
index 53cf97b2..0fff9ed1 100644
--- a/pages/_app.tsx
+++ b/pages/_app.tsx
@@ -1,17 +1,21 @@
-import "@/styles/globals.css";
import type { AppProps } from "next/app";
import { Inter } from "next/font/google";
+import Head from "next/head";
+
+import { TeamProvider } from "@/context/team-context";
import type { Session } from "next-auth";
import { SessionProvider } from "next-auth/react";
-import { Toaster } from "@/components/ui/sonner";
-import Head from "next/head";
import PlausibleProvider from "next-plausible";
+
+import { PostHogCustomProvider } from "@/components/providers/posthog-provider";
+import { TriggerCustomProvider } from "@/components/providers/trigger-provider";
import { ThemeProvider } from "@/components/theme-provider";
-import { TeamProvider } from "@/context/team-context";
+import { Toaster } from "@/components/ui/sonner";
import { TooltipProvider } from "@/components/ui/tooltip";
-import { PostHogCustomProvider } from "@/components/providers/posthog-provider";
+
import { EXCLUDED_PATHS } from "@/lib/constants";
-import { TriggerCustomProvider } from "@/components/providers/trigger-provider";
+
+import "@/styles/globals.css";
const inter = Inter({ subsets: ["latin"] });
diff --git a/pages/_document.tsx b/pages/_document.tsx
index 9abc64dc..47faab55 100644
--- a/pages/_document.tsx
+++ b/pages/_document.tsx
@@ -1,4 +1,4 @@
-import { Html, Head, Main, NextScript } from "next/document";
+import { Head, Html, Main, NextScript } from "next/document";
export default function Document() {
return (
diff --git a/pages/ai.tsx b/pages/ai.tsx
index 35064309..c8a09bb3 100644
--- a/pages/ai.tsx
+++ b/pages/ai.tsx
@@ -1,21 +1,24 @@
import Head from "next/head";
-import Navbar from "@/components/web/navbar";
-import Footer from "@/components/web/footer";
+import Link from "next/link";
+
import { Disclosure } from "@headlessui/react";
-import ChatPage from "@/components/web/assistant/public-chat";
import {
- Plus as PlusSmallIcon,
- Minus as MinusSmallIcon,
RefreshCw as ArrowPathIcon,
GitPullRequestArrow as CloudArrowUpIcon,
Settings as Cog6ToothIcon,
Fingerprint as FingerPrintIcon,
Lock as LockClosedIcon,
+ Minus as MinusSmallIcon,
+ Plus as PlusSmallIcon,
HardDrive as ServerIcon,
} from "lucide-react";
-import Link from "next/link";
-import { classNames } from "@/lib/utils";
+
import PapermarkSparkle from "@/components/shared/icons/papermark-sparkle";
+import ChatPage from "@/components/web/assistant/public-chat";
+import Footer from "@/components/web/footer";
+import Navbar from "@/components/web/navbar";
+
+import { classNames } from "@/lib/utils";
const scrollDown = () => {
window.scrollBy({
@@ -177,7 +180,7 @@ export default function Home() {
<main>
{/* Hero section */}
- <div className="relative isolate overflow-hidden bg-white dark:bg-black pb-16 pt-14 sm:pb-20">
+ <div className="relative isolate overflow-hidden bg-white pb-16 pt-14 dark:bg-black sm:pb-20">
<div
className="absolute inset-x-0 -top-40 -z-10 transform-gpu overflow-hidden blur-3xl sm:-top-80"
aria-hidden="true"
@@ -193,8 +196,8 @@ export default function Home() {
<div className="mx-auto max-w-7xl px-6 lg:px-8">
<div className="mx-auto max-w-2xl py-8 sm:py-12 lg:py-24 ">
<div className="hidden sm:mb-8 sm:flex sm:justify-center">
- <div className="relative rounded-full flex items-center px-3 py-1 text-sm leading-6 text-black dark:text-white ring-1 ring-black/10 dark:ring-white/10 hover:ring-white/20">
- <PapermarkSparkle className="h-4 w-4 mr-1" />
+ <div className="relative flex items-center rounded-full px-3 py-1 text-sm leading-6 text-black ring-1 ring-black/10 hover:ring-white/20 dark:text-white dark:ring-white/10">
+ <PapermarkSparkle className="mr-1 h-4 w-4" />
Papermark AI
</div>
</div>
@@ -208,7 +211,7 @@ export default function Home() {
<div className="mt-10 flex items-center justify-center gap-x-6">
<button
- className="rounded-md bg-black dark:bg-white px-3.5 py-2.5 text-sm font-semibold text-white dark:text-black shadow-sm hover:bg-gray-400 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-400"
+ className="rounded-md bg-black px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-gray-400 focus:outline-none focus:ring-2 focus:ring-indigo-400 focus:ring-offset-2 dark:bg-white dark:text-black"
onClick={scrollDown}
>
Chat with our pitchdeck ↓
@@ -222,7 +225,7 @@ export default function Home() {
</div>
<div className="mt-10 flex items-center justify-center gap-x-6">
<Link
- className="rounded-md bg-black dark:bg-white px-3.5 py-2.5 text-sm font-semibold text-white dark:text-black shadow-sm hover:bg-gray-400 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-400"
+ className="rounded-md bg-black px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-gray-400 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-400 dark:bg-white dark:text-black"
href="/login"
target="_blank"
>
@@ -257,19 +260,19 @@ export default function Home() {
collaboration. It enables secure document sharing, advanced
tracking, and storage, providing users with real-time analytics.
</p>
- <div className="mx-auto mt-16 grid max-w-lg grid-cols-1 gap-x-6 items-center gap-y-6 sm:mt-20 sm:gap-y-0 lg:max-w-4xl lg:grid-cols-2">
+ <div className="mx-auto mt-16 grid max-w-lg grid-cols-1 items-center gap-x-6 gap-y-6 sm:mt-20 sm:gap-y-0 lg:max-w-4xl lg:grid-cols-2">
{tiers.map((tier, tierIdx) => (
<div
key={tier.id}
className={classNames(
tier.featured
- ? " text-gray-800 dark:text-white relative shadow-2xl"
+ ? " relative text-gray-800 shadow-2xl dark:text-white"
: " bg-white dark:bg-transparent sm:mx-8 lg:mx-0",
tier.featured
? ""
: tierIdx === 0
- ? "text-gray-800 dark:text-white rounded-t-3xl lg:rounded-bl-3xl"
- : "bg-black dark:bg-transparent sm:rounded-t-none lg:rounded-tr-3xl lg:rounded-bl-none",
+ ? "rounded-t-3xl text-gray-800 dark:text-white lg:rounded-bl-3xl"
+ : "bg-black dark:bg-transparent sm:rounded-t-none lg:rounded-bl-none lg:rounded-tr-3xl",
"rounded-3xl p-8 ring-1 ring-gray-900/10 dark:ring-gray-200/10 sm:p-10",
)}
>
@@ -323,9 +326,9 @@ export default function Home() {
aria-describedby={tier.id.toString()}
className={classNames(
tier.featured
- ? "bg-black dark:bg-white text-white dark:text-black shadow-sm hover:bg-gray-500 focus:ring-2 focus:ring-indigo-500"
+ ? "bg-black text-white shadow-sm hover:bg-gray-500 focus:ring-2 focus:ring-indigo-500 dark:bg-white dark:text-black"
: "text-transparent ring-1 ring-inset ring-transparent focus:ring-2 focus:ring-indigo-600",
- "mt-8 block rounded-md py-2.5 px-3.5 text-center text-sm font-semibold",
+ "mt-8 block rounded-md px-3.5 py-2.5 text-center text-sm font-semibold",
)}
>
Use Papermark AI
@@ -382,7 +385,7 @@ export default function Home() {
</div>
{/* Testimonial section */}
- <div className="relative z-10 mt-32 bg-white dark:bg-gray-900 pb-20 sm:mt-56 sm:pb-24 xl:pb-0">
+ <div className="relative z-10 mt-32 bg-white pb-20 dark:bg-gray-900 sm:mt-56 sm:pb-24 xl:pb-0">
<div
className="absolute inset-0 overflow-hidden"
aria-hidden="true"
@@ -398,11 +401,11 @@ export default function Home() {
</div>
</div>
<div className="mx-auto flex max-w-7xl flex-col items-center gap-x-8 gap-y-10 px-6 sm:gap-y-8 lg:px-8 xl:flex-row xl:items-stretch">
- <div className="-mt-8 w-full max-w-2xl xl:-mb-8 xl:w-96 xl:flex-none flex items-center justify-center">
- <div className="relative w-64 h-64">
+ <div className="-mt-8 flex w-full max-w-2xl items-center justify-center xl:-mb-8 xl:w-96 xl:flex-none">
+ <div className="relative h-64 w-64">
{" "}
<img
- className="absolute inset-0 object-cover rounded-2xl bg-gray-800 shadow-2xl"
+ className="absolute inset-0 rounded-2xl bg-gray-800 object-cover shadow-2xl"
src="https://pbs.twimg.com/profile_images/1506792347840888834/dS-r50Je_400x400.jpg"
alt=""
/>
diff --git a/pages/api/assistants/chat.ts b/pages/api/assistants/chat.ts
index 13992394..7959a8f5 100644
--- a/pages/api/assistants/chat.ts
+++ b/pages/api/assistants/chat.ts
@@ -1,9 +1,10 @@
+import { Ratelimit } from "@upstash/ratelimit";
import { experimental_AssistantResponse } from "ai";
-import { type Run } from "openai/resources/beta/threads/runs/runs";
import { type MessageContentText } from "openai/resources/beta/threads/messages/messages";
-import { Ratelimit } from "@upstash/ratelimit";
-import { redis } from "@/lib/redis";
+import { type Run } from "openai/resources/beta/threads/runs/runs";
+
import { openai } from "@/lib/openai";
+import { redis } from "@/lib/redis";
const ratelimit = {
public: new Ratelimit({
diff --git a/pages/api/assistants/index.ts b/pages/api/assistants/index.ts
index fd56f1f0..5c2a005b 100644
--- a/pages/api/assistants/index.ts
+++ b/pages/api/assistants/index.ts
@@ -1,10 +1,13 @@
import { NextApiRequest, NextApiResponse } from "next";
+
import { getServerSession } from "next-auth";
-import prisma from "@/lib/prisma";
-import { authOptions } from "../auth/[...nextauth]";
+
import { errorhandler } from "@/lib/errorHandler";
-import { openai } from "@/lib/openai";
import { getFile } from "@/lib/files/get-file";
+import { openai } from "@/lib/openai";
+import prisma from "@/lib/prisma";
+
+import { authOptions } from "../auth/[...nextauth]";
export default async function handle(
req: NextApiRequest,
diff --git a/pages/api/assistants/threads/index.ts b/pages/api/assistants/threads/index.ts
index c4cf5c1e..1753de78 100644
--- a/pages/api/assistants/threads/index.ts
+++ b/pages/api/assistants/threads/index.ts
@@ -1,7 +1,8 @@
import { NextApiRequest, NextApiResponse } from "next";
-import prisma from "@/lib/prisma";
+
import { errorhandler } from "@/lib/errorHandler";
import { openai } from "@/lib/openai";
+import prisma from "@/lib/prisma";
import { convertThreadMessagesToMessages } from "@/lib/utils";
export default async function handle(
diff --git a/pages/api/auth/[...nextauth].ts b/pages/api/auth/[...nextauth].ts
index 02f9efbe..cf9ed33e 100644
--- a/pages/api/auth/[...nextauth].ts
+++ b/pages/api/auth/[...nextauth].ts
@@ -1,15 +1,16 @@
+import { PrismaAdapter } from "@next-auth/prisma-adapter";
+import { PasskeyProvider } from "@teamhanko/passkeys-next-auth-provider";
import NextAuth, { type NextAuthOptions } from "next-auth";
+import EmailProvider from "next-auth/providers/email";
import GoogleProvider from "next-auth/providers/google";
import LinkedInProvider from "next-auth/providers/linkedin";
-import EmailProvider from "next-auth/providers/email";
-import { PasskeyProvider } from "@teamhanko/passkeys-next-auth-provider";
-import { PrismaAdapter } from "@next-auth/prisma-adapter";
-import prisma from "@/lib/prisma";
-import { CreateUserEmailProps, CustomUser } from "@/lib/types";
-import { sendWelcomeEmail } from "@/lib/emails/send-welcome";
+
import { identifyUser, trackAnalytics } from "@/lib/analytics";
import { sendVerificationRequestEmail } from "@/lib/emails/send-verification-request";
+import { sendWelcomeEmail } from "@/lib/emails/send-welcome";
import hanko from "@/lib/hanko";
+import prisma from "@/lib/prisma";
+import { CreateUserEmailProps, CustomUser } from "@/lib/types";
const VERCEL_DEPLOYMENT = !!process.env.VERCEL_URL;
diff --git a/pages/api/feedback/index.ts b/pages/api/feedback/index.ts
index 11450cdf..7995d899 100644
--- a/pages/api/feedback/index.ts
+++ b/pages/api/feedback/index.ts
@@ -1,6 +1,7 @@
import { NextApiRequest, NextApiResponse } from "next";
-import prisma from "@/lib/prisma";
+
import { getFile } from "@/lib/files/get-file";
+import prisma from "@/lib/prisma";
export default async function handle(
req: NextApiRequest,
diff --git a/pages/api/file/browser-upload.ts b/pages/api/file/browser-upload.ts
index 768a7b20..4723fb33 100644
--- a/pages/api/file/browser-upload.ts
+++ b/pages/api/file/browser-upload.ts
@@ -1,9 +1,12 @@
-import { handleUpload, type HandleUploadBody } from "@vercel/blob/client";
-import type { NextApiResponse, NextApiRequest } from "next";
+import type { NextApiRequest, NextApiResponse } from "next";
+
+import { type HandleUploadBody, handleUpload } from "@vercel/blob/client";
import { getServerSession } from "next-auth/next";
-import { authOptions } from "../auth/[...nextauth]";
-import { CustomUser } from "@/lib/types";
+
import prisma from "@/lib/prisma";
+import { CustomUser } from "@/lib/types";
+
+import { authOptions } from "../auth/[...nextauth]";
export default async function handler(
req: NextApiRequest,
diff --git a/pages/api/file/logo-upload.ts b/pages/api/file/logo-upload.ts
index a7fc7582..4ae5da30 100644
--- a/pages/api/file/logo-upload.ts
+++ b/pages/api/file/logo-upload.ts
@@ -1,9 +1,12 @@
-import { handleUpload, type HandleUploadBody } from "@vercel/blob/client";
-import type { NextApiResponse, NextApiRequest } from "next";
+import type { NextApiRequest, NextApiResponse } from "next";
+
+import { type HandleUploadBody, handleUpload } from "@vercel/blob/client";
import { getServerSession } from "next-auth/next";
-import { authOptions } from "../auth/[...nextauth]";
+
import { CustomUser } from "@/lib/types";
+import { authOptions } from "../auth/[...nextauth]";
+
export default async function handler(
req: NextApiRequest,
res: NextApiResponse,
diff --git a/pages/api/file/s3/get-presigned-get-url.ts b/pages/api/file/s3/get-presigned-get-url.ts
index 5f6e255c..296ed0cb 100644
--- a/pages/api/file/s3/get-presigned-get-url.ts
+++ b/pages/api/file/s3/get-presigned-get-url.ts
@@ -1,10 +1,11 @@
import { NextApiRequest, NextApiResponse } from "next";
-import { getSignedUrl as getS3SignedUrl } from "@aws-sdk/s3-request-presigner";
-import { getS3Client } from "@/lib/files/aws-client";
-import { GetObjectCommand } from "@aws-sdk/client-s3";
-import { ONE_HOUR, ONE_SECOND } from "@/lib/constants";
+import { GetObjectCommand } from "@aws-sdk/client-s3";
import { getSignedUrl as getCloudfrontSignedUrl } from "@aws-sdk/cloudfront-signer";
+import { getSignedUrl as getS3SignedUrl } from "@aws-sdk/s3-request-presigner";
+
+import { ONE_HOUR, ONE_SECOND } from "@/lib/constants";
+import { getS3Client } from "@/lib/files/aws-client";
const client = getS3Client();
diff --git a/pages/api/file/s3/get-presigned-post-url.ts b/pages/api/file/s3/get-presigned-post-url.ts
index f781f531..5313ee4f 100644
--- a/pages/api/file/s3/get-presigned-post-url.ts
+++ b/pages/api/file/s3/get-presigned-post-url.ts
@@ -1,14 +1,17 @@
import { NextApiRequest, NextApiResponse } from "next";
+
+import { PutObjectCommand } from "@aws-sdk/client-s3";
import { getSignedUrl } from "@aws-sdk/s3-request-presigner";
-import { getS3Client } from "@/lib/files/aws-client";
+import slugify from "@sindresorhus/slugify";
import { getServerSession } from "next-auth";
-import { authOptions } from "../../auth/[...nextauth]";
-import { CustomUser } from "@/lib/types";
-import prisma from "@/lib/prisma";
import path from "node:path";
-import slugify from "@sindresorhus/slugify";
-import { PutObjectCommand } from "@aws-sdk/client-s3";
+
import { ONE_HOUR, ONE_SECOND } from "@/lib/constants";
+import { getS3Client } from "@/lib/files/aws-client";
+import prisma from "@/lib/prisma";
+import { CustomUser } from "@/lib/types";
+
+import { authOptions } from "../../auth/[...nextauth]";
const client = getS3Client();
diff --git a/pages/api/file/upload.ts b/pages/api/file/upload.ts
index 7122c7cf..8922f898 100644
--- a/pages/api/file/upload.ts
+++ b/pages/api/file/upload.ts
@@ -1,5 +1,6 @@
+import { NextRequest, NextResponse } from "next/server";
+
import { put } from "@vercel/blob";
-import { NextResponse, NextRequest } from "next/server";
export const config = {
runtime: "edge",
diff --git a/pages/api/health.ts b/pages/api/health.ts
index 51faa1d0..cabf6548 100644
--- a/pages/api/health.ts
+++ b/pages/api/health.ts
@@ -1,4 +1,5 @@
import type { NextApiRequest, NextApiResponse } from "next";
+
import prisma from "@/lib/prisma";
export default async function handler(
diff --git a/pages/api/jobs/get-thumbnail.ts b/pages/api/jobs/get-thumbnail.ts
index 2de400cf..17cf6888 100644
--- a/pages/api/jobs/get-thumbnail.ts
+++ b/pages/api/jobs/get-thumbnail.ts
@@ -1,6 +1,9 @@
import { NextApiRequest, NextApiResponse } from "next";
-import { getFileForDocumentPage } from "@/lib/documents/get-file-helper";
+
import { getServerSession } from "next-auth";
+
+import { getFileForDocumentPage } from "@/lib/documents/get-file-helper";
+
import { authOptions } from "../auth/[...nextauth]";
export default async function handle(
diff --git a/pages/api/jobs/send-dataroom-notifications.ts b/pages/api/jobs/send-dataroom-notifications.ts
index f3eacb15..e598e036 100644
--- a/pages/api/jobs/send-dataroom-notifications.ts
+++ b/pages/api/jobs/send-dataroom-notifications.ts
@@ -1,7 +1,8 @@
import { NextApiRequest, NextApiResponse } from "next";
+
+import { sendDataroomNotification } from "@/lib/emails/send-dataroom-notification";
import prisma from "@/lib/prisma";
import { log } from "@/lib/utils";
-import { sendDataroomNotification } from "@/lib/emails/send-dataroom-notification";
export const config = {
maxDuration: 120,
diff --git a/pages/api/jobs/send-dataroom-view-invitation.ts b/pages/api/jobs/send-dataroom-view-invitation.ts
index bfd53e01..9109d730 100644
--- a/pages/api/jobs/send-dataroom-view-invitation.ts
+++ b/pages/api/jobs/send-dataroom-view-invitation.ts
@@ -1,7 +1,8 @@
import { NextApiRequest, NextApiResponse } from "next";
+
+import { sendDataroomViewerInvite } from "@/lib/emails/send-dataroom-viewer-invite";
import prisma from "@/lib/prisma";
import { log } from "@/lib/utils";
-import { sendDataroomViewerInvite } from "@/lib/emails/send-dataroom-viewer-invite";
export const config = {
maxDuration: 120,
diff --git a/pages/api/jobs/send-notification.ts b/pages/api/jobs/send-notification.ts
index 7d7db97d..8884506d 100644
--- a/pages/api/jobs/send-notification.ts
+++ b/pages/api/jobs/send-notification.ts
@@ -1,6 +1,7 @@
import { NextApiRequest, NextApiResponse } from "next";
-import prisma from "@/lib/prisma";
+
import { sendViewedDocumentEmail } from "@/lib/emails/send-viewed-document";
+import prisma from "@/lib/prisma";
import { log } from "@/lib/utils";
export const config = {
diff --git a/pages/api/links/[id]/archive.ts b/pages/api/links/[id]/archive.ts
index 6f09aacf..87fcdf4b 100644
--- a/pages/api/links/[id]/archive.ts
+++ b/pages/api/links/[id]/archive.ts
@@ -1,8 +1,11 @@
import { NextApiRequest, NextApiResponse } from "next";
-import prisma from "@/lib/prisma";
+
import { getServerSession } from "next-auth/next";
-import { authOptions } from "../../auth/[...nextauth]";
+
import { errorhandler } from "@/lib/errorHandler";
+import prisma from "@/lib/prisma";
+
+import { authOptions } from "../../auth/[...nextauth]";
export default async function handle(
req: NextApiRequest,
diff --git a/pages/api/links/[id]/dataroom.ts b/pages/api/links/[id]/dataroom.ts
index 1d74b7e1..1e5e3f77 100644
--- a/pages/api/links/[id]/dataroom.ts
+++ b/pages/api/links/[id]/dataroom.ts
@@ -1,8 +1,11 @@
import { NextApiRequest, NextApiResponse } from "next";
-import prisma from "@/lib/prisma";
+
import { getServerSession } from "next-auth/next";
-import { hashPassword } from "@/lib/utils";
+
+import prisma from "@/lib/prisma";
import { CustomUser } from "@/lib/types";
+import { hashPassword } from "@/lib/utils";
+
import { authOptions } from "../../auth/[...nextauth]";
export default async function handle(
diff --git a/pages/api/links/[id]/index.ts b/pages/api/links/[id]/index.ts
index 38d70aa0..d8deb9d1 100644
--- a/pages/api/links/[id]/index.ts
+++ b/pages/api/links/[id]/index.ts
@@ -1,10 +1,13 @@
import { NextApiRequest, NextApiResponse } from "next";
-import prisma from "@/lib/prisma";
+
+import { Brand, DataroomBrand } from "@prisma/client";
import { getServerSession } from "next-auth/next";
-import { generateEncrpytedPassword } from "@/lib/utils";
+
+import prisma from "@/lib/prisma";
import { CustomUser } from "@/lib/types";
+import { generateEncrpytedPassword } from "@/lib/utils";
+
import { authOptions } from "../../auth/[...nextauth]";
-import { Brand, DataroomBrand } from "@prisma/client";
export default async function handle(
req: NextApiRequest,
diff --git a/pages/api/links/[id]/verify-email.ts b/pages/api/links/[id]/verify-email.ts
index f81a4fba..28dcf08a 100644
--- a/pages/api/links/[id]/verify-email.ts
+++ b/pages/api/links/[id]/verify-email.ts
@@ -1,7 +1,9 @@
import { NextApiRequest, NextApiResponse } from "next";
+
+import z from "zod";
+
import { sendVerificationEmail } from "@/lib/emails/send-email-verification";
import prisma from "@/lib/prisma";
-import z from "zod";
const bodySchema = z.object({
email: z.string().email(),
diff --git a/pages/api/links/[id]/visits.ts b/pages/api/links/[id]/visits.ts
index b9d8bf40..c409aab0 100644
--- a/pages/api/links/[id]/visits.ts
+++ b/pages/api/links/[id]/visits.ts
@@ -1,13 +1,16 @@
import { NextApiRequest, NextApiResponse } from "next";
+
import { getServerSession } from "next-auth/next";
+
+import { LIMITS } from "@/lib/constants";
+import { errorhandler } from "@/lib/errorHandler";
import prisma from "@/lib/prisma";
-import { authOptions } from "../../auth/[...nextauth]";
-import { log } from "@/lib/utils";
-import { getViewPageDuration } from "@/lib/tinybird";
import { getDocumentWithTeamAndUser } from "@/lib/team/helper";
+import { getViewPageDuration } from "@/lib/tinybird";
import { CustomUser } from "@/lib/types";
-import { errorhandler } from "@/lib/errorHandler";
-import { LIMITS } from "@/lib/constants";
+import { log } from "@/lib/utils";
+
+import { authOptions } from "../../auth/[...nextauth]";
export default async function handle(
req: NextApiRequest,
diff --git a/pages/api/links/domains/[...domainSlug].ts b/pages/api/links/domains/[...domainSlug].ts
index c1be534f..cf23ae95 100644
--- a/pages/api/links/domains/[...domainSlug].ts
+++ b/pages/api/links/domains/[...domainSlug].ts
@@ -1,7 +1,9 @@
import { NextApiRequest, NextApiResponse } from "next";
+
+import { Brand, DataroomBrand } from "@prisma/client";
+
import prisma from "@/lib/prisma";
import { log } from "@/lib/utils";
-import { Brand, DataroomBrand } from "@prisma/client";
export default async function handle(
req: NextApiRequest,
diff --git a/pages/api/links/download.ts b/pages/api/links/download.ts
index 380e6c35..a500cce4 100644
--- a/pages/api/links/download.ts
+++ b/pages/api/links/download.ts
@@ -1,6 +1,7 @@
import { NextApiRequest, NextApiResponse } from "next";
-import prisma from "@/lib/prisma";
+
import { getFile } from "@/lib/files/get-file";
+import prisma from "@/lib/prisma";
export default async function handle(
req: NextApiRequest,
diff --git a/pages/api/links/index.ts b/pages/api/links/index.ts
index bd6dbdfd..026f828a 100644
--- a/pages/api/links/index.ts
+++ b/pages/api/links/index.ts
@@ -1,14 +1,17 @@
import { NextApiRequest, NextApiResponse } from "next";
-import prisma from "@/lib/prisma";
+
import { getServerSession } from "next-auth/next";
-import { authOptions } from "../auth/[...nextauth]";
-import { generateEncrpytedPassword} from "@/lib/utils";
-import { CustomUser } from "@/lib/types";
+
import { errorhandler } from "@/lib/errorHandler";
+import prisma from "@/lib/prisma";
import {
getDocumentWithTeamAndUser,
getTeamWithUsersAndDocument,
} from "@/lib/team/helper";
+import { CustomUser } from "@/lib/types";
+import { generateEncrpytedPassword } from "@/lib/utils";
+
+import { authOptions } from "../auth/[...nextauth]";
export default async function handler(
req: NextApiRequest,
@@ -70,7 +73,9 @@ export default async function handler(
}
const hashedPassword =
- password && password.length > 0 ? await generateEncrpytedPassword(password) : null;
+ password && password.length > 0
+ ? await generateEncrpytedPassword(password)
+ : null;
const exat = expiresAt ? new Date(expiresAt) : null;
let { domain, slug, ...linkData } = linkDomainData;
diff --git a/pages/api/mupdf/convert-page.ts b/pages/api/mupdf/convert-page.ts
index 93a4a037..2e0a94d6 100644
--- a/pages/api/mupdf/convert-page.ts
+++ b/pages/api/mupdf/convert-page.ts
@@ -1,10 +1,12 @@
import { NextApiRequest, NextApiResponse } from "next";
+
+import { DocumentPage } from "@prisma/client";
// @ts-ignore
import mupdf from "mupdf";
-import prisma from "@/lib/prisma";
+
import { putFileServer } from "@/lib/files/put-file-server";
+import prisma from "@/lib/prisma";
import { log } from "@/lib/utils";
-import { DocumentPage } from "@prisma/client";
// This function can run for a maximum of 60 seconds
export const config = {
diff --git a/pages/api/mupdf/get-pages.ts b/pages/api/mupdf/get-pages.ts
index 3a7e9b8e..ac4a64d0 100644
--- a/pages/api/mupdf/get-pages.ts
+++ b/pages/api/mupdf/get-pages.ts
@@ -1,17 +1,16 @@
import { NextApiRequest, NextApiResponse } from "next";
+
// @ts-ignore
import mupdf from "mupdf";
-
export default async (req: NextApiRequest, res: NextApiResponse) => {
- // check if post method
+ // check if post method
if (req.method !== "POST") {
res.status(405).json({ error: "Method Not Allowed" });
return;
}
-
- try {
+ try {
const { url } = req.body as { url: string };
// Fetch the PDF data
const response = await fetch(url);
@@ -21,7 +20,7 @@ export default async (req: NextApiRequest, res: NextApiResponse) => {
var doc = mupdf.Document.openDocument(pdfData, "application/pdf");
var n = doc.countPages();
-
+
// Send the images as a response
res.status(200).json({ numPages: n });
} catch (error) {
diff --git a/pages/api/passkeys/register.ts b/pages/api/passkeys/register.ts
index 1c3f0f1e..0ce028d6 100644
--- a/pages/api/passkeys/register.ts
+++ b/pages/api/passkeys/register.ts
@@ -1,11 +1,14 @@
import { NextApiRequest, NextApiResponse } from "next";
+
import { getServerSession } from "next-auth/next";
-import { authOptions } from "../auth/[...nextauth]";
-import { errorhandler } from "@/lib/errorHandler";
+
import {
finishServerPasskeyRegistration,
startServerPasskeyRegistration,
} from "@/lib/api/auth/passkey";
+import { errorhandler } from "@/lib/errorHandler";
+
+import { authOptions } from "../auth/[...nextauth]";
export default async function handler(
req: NextApiRequest,
diff --git a/pages/api/record_reaction.ts b/pages/api/record_reaction.ts
index 4fe6f1f7..07f27684 100644
--- a/pages/api/record_reaction.ts
+++ b/pages/api/record_reaction.ts
@@ -1,4 +1,5 @@
import { NextApiRequest, NextApiResponse } from "next";
+
import prisma from "@/lib/prisma";
export default async function handle(
diff --git a/pages/api/record_view.ts b/pages/api/record_view.ts
index e0c4db67..c90d7626 100644
--- a/pages/api/record_view.ts
+++ b/pages/api/record_view.ts
@@ -1,12 +1,13 @@
import { NextApiRequest, NextApiResponse } from "next";
+
+import { z } from "zod";
+
import { newId } from "@/lib/id-helper";
import { publishPageView } from "@/lib/tinybird";
-import { capitalize, getDomainWithoutWWW, log } from "@/lib/utils";
-import { userAgentFromString } from "@/lib/utils/user-agent";
import { Geo } from "@/lib/types";
+import { capitalize, getDomainWithoutWWW, log } from "@/lib/utils";
import { LOCALHOST_GEO_DATA, getGeoData } from "@/lib/utils/geo";
-
-import { z } from "zod";
+import { userAgentFromString } from "@/lib/utils/user-agent";
const bodyValidation = z.object({
id: z.string(),
diff --git a/pages/api/revalidate.ts b/pages/api/revalidate.ts
index 7293c897..48aa5b7e 100644
--- a/pages/api/revalidate.ts
+++ b/pages/api/revalidate.ts
@@ -1,4 +1,5 @@
import { NextApiRequest, NextApiResponse } from "next";
+
import prisma from "@/lib/prisma";
export default async function handler(
diff --git a/pages/api/stripe/webhook.ts b/pages/api/stripe/webhook.ts
index 2d5597c6..8a8dbfbe 100644
--- a/pages/api/stripe/webhook.ts
+++ b/pages/api/stripe/webhook.ts
@@ -1,6 +1,9 @@
import { NextApiRequest, NextApiResponse } from "next";
+
import { Readable } from "node:stream";
import type Stripe from "stripe";
+
+import { sendUpgradePlanEmail } from "@/lib/emails/send-upgrade-plan";
import prisma from "@/lib/prisma";
import { stripe } from "@/lib/stripe";
import {
@@ -9,7 +12,6 @@ import {
isUpgradedCustomer,
} from "@/lib/stripe/utils";
import { log } from "@/lib/utils";
-import { sendUpgradePlanEmail } from "@/lib/emails/send-upgrade-plan";
// Stripe requires the raw body to construct the event.
export const config = {
diff --git a/pages/api/teams/[teamId]/billing/index.ts b/pages/api/teams/[teamId]/billing/index.ts
index f813400d..84f0b3d8 100644
--- a/pages/api/teams/[teamId]/billing/index.ts
+++ b/pages/api/teams/[teamId]/billing/index.ts
@@ -1,9 +1,12 @@
import { NextApiRequest, NextApiResponse } from "next";
+
import { getServerSession } from "next-auth/next";
-import { authOptions } from "../../../auth/[...nextauth]";
-import { CustomUser } from "@/lib/types";
-import prisma from "@/lib/prisma";
+
import { errorhandler } from "@/lib/errorHandler";
+import prisma from "@/lib/prisma";
+import { CustomUser } from "@/lib/types";
+
+import { authOptions } from "../../../auth/[...nextauth]";
export default async function handle(
req: NextApiRequest,
diff --git a/pages/api/teams/[teamId]/billing/manage.ts b/pages/api/teams/[teamId]/billing/manage.ts
index aab34417..f24fed6a 100644
--- a/pages/api/teams/[teamId]/billing/manage.ts
+++ b/pages/api/teams/[teamId]/billing/manage.ts
@@ -1,9 +1,12 @@
import { NextApiRequest, NextApiResponse } from "next";
+
import { getServerSession } from "next-auth/next";
-import { authOptions } from "../../../auth/[...nextauth]";
-import { stripe } from "@/lib/stripe";
-import prisma from "@/lib/prisma";
+
import { errorhandler } from "@/lib/errorHandler";
+import prisma from "@/lib/prisma";
+import { stripe } from "@/lib/stripe";
+
+import { authOptions } from "../../../auth/[...nextauth]";
export default async function handle(
req: NextApiRequest,
diff --git a/pages/api/teams/[teamId]/billing/plan.ts b/pages/api/teams/[teamId]/billing/plan.ts
index e06b2934..a6db9943 100644
--- a/pages/api/teams/[teamId]/billing/plan.ts
+++ b/pages/api/teams/[teamId]/billing/plan.ts
@@ -1,10 +1,13 @@
import { NextApiRequest, NextApiResponse } from "next";
+
import { getServerSession } from "next-auth/next";
-import prisma from "@/lib/prisma";
-import { authOptions } from "../../../auth/[...nextauth]";
+
import { errorhandler } from "@/lib/errorHandler";
+import prisma from "@/lib/prisma";
import { CustomUser } from "@/lib/types";
+import { authOptions } from "../../../auth/[...nextauth]";
+
export default async function handle(
req: NextApiRequest,
res: NextApiResponse,
diff --git a/pages/api/teams/[teamId]/billing/upgrade.ts b/pages/api/teams/[teamId]/billing/upgrade.ts
index e1a59073..cbdcd4f3 100644
--- a/pages/api/teams/[teamId]/billing/upgrade.ts
+++ b/pages/api/teams/[teamId]/billing/upgrade.ts
@@ -1,10 +1,13 @@
import { NextApiRequest, NextApiResponse } from "next";
+
import { getServerSession } from "next-auth/next";
-import { authOptions } from "../../../auth/[...nextauth]";
-import { CustomUser } from "@/lib/types";
-import { stripe } from "@/lib/stripe";
-import prisma from "@/lib/prisma";
+
import { identifyUser, trackAnalytics } from "@/lib/analytics";
+import prisma from "@/lib/prisma";
+import { stripe } from "@/lib/stripe";
+import { CustomUser } from "@/lib/types";
+
+import { authOptions } from "../../../auth/[...nextauth]";
export default async function handle(
req: NextApiRequest,
diff --git a/pages/api/teams/[teamId]/branding.ts b/pages/api/teams/[teamId]/branding.ts
index d379cd3f..a986edf4 100644
--- a/pages/api/teams/[teamId]/branding.ts
+++ b/pages/api/teams/[teamId]/branding.ts
@@ -1,10 +1,13 @@
import { NextApiRequest, NextApiResponse } from "next";
+
+import { del } from "@vercel/blob";
import { getServerSession } from "next-auth";
+
+import { errorhandler } from "@/lib/errorHandler";
import prisma from "@/lib/prisma";
import { CustomUser } from "@/lib/types";
+
import { authOptions } from "../../auth/[...nextauth]";
-import { errorhandler } from "@/lib/errorHandler";
-import { del } from "@vercel/blob";
export default async function handle(
req: NextApiRequest,
diff --git a/pages/api/teams/[teamId]/datarooms/[id]/branding.ts b/pages/api/teams/[teamId]/datarooms/[id]/branding.ts
index 81d75d83..1c913e3e 100644
--- a/pages/api/teams/[teamId]/datarooms/[id]/branding.ts
+++ b/pages/api/teams/[teamId]/datarooms/[id]/branding.ts
@@ -1,10 +1,12 @@
import { NextApiRequest, NextApiResponse } from "next";
+
+import { authOptions } from "@/pages/api/auth/[...nextauth]";
+import { del } from "@vercel/blob";
import { getServerSession } from "next-auth";
+
+import { errorhandler } from "@/lib/errorHandler";
import prisma from "@/lib/prisma";
import { CustomUser } from "@/lib/types";
-import { errorhandler } from "@/lib/errorHandler";
-import { del } from "@vercel/blob";
-import { authOptions } from "@/pages/api/auth/[...nextauth]";
export default async function handle(
req: NextApiRequest,
diff --git a/pages/api/teams/[teamId]/datarooms/[id]/documents/[documentId]/index.ts b/pages/api/teams/[teamId]/datarooms/[id]/documents/[documentId]/index.ts
index 825ba9da..17289f6e 100644
--- a/pages/api/teams/[teamId]/datarooms/[id]/documents/[documentId]/index.ts
+++ b/pages/api/teams/[teamId]/datarooms/[id]/documents/[documentId]/index.ts
@@ -1,8 +1,10 @@
import { NextApiRequest, NextApiResponse } from "next";
+
+import { authOptions } from "@/pages/api/auth/[...nextauth]";
import { getServerSession } from "next-auth/next";
+
import prisma from "@/lib/prisma";
import { CustomUser } from "@/lib/types";
-import { authOptions } from "@/pages/api/auth/[...nextauth]";
export default async function handle(
req: NextApiRequest,
diff --git a/pages/api/teams/[teamId]/datarooms/[id]/documents/index.ts b/pages/api/teams/[teamId]/datarooms/[id]/documents/index.ts
index 80d2852b..4d9d1ed7 100644
--- a/pages/api/teams/[teamId]/datarooms/[id]/documents/index.ts
+++ b/pages/api/teams/[teamId]/datarooms/[id]/documents/index.ts
@@ -1,13 +1,15 @@
import { NextApiRequest, NextApiResponse } from "next";
-import { getServerSession } from "next-auth/next";
-import prisma from "@/lib/prisma";
+
import { authOptions } from "@/pages/api/auth/[...nextauth]";
-import { CustomUser } from "@/lib/types";
+import { client } from "@/trigger";
import slugify from "@sindresorhus/slugify";
+import { getServerSession } from "next-auth/next";
+
+import { errorhandler } from "@/lib/errorHandler";
import { newId } from "@/lib/id-helper";
+import prisma from "@/lib/prisma";
+import { CustomUser } from "@/lib/types";
import { log } from "@/lib/utils";
-import { errorhandler } from "@/lib/errorHandler";
-import { client } from "@/trigger";
export default async function handle(
req: NextApiRequest,
diff --git a/pages/api/teams/[teamId]/datarooms/[id]/folders/[...name].ts b/pages/api/teams/[teamId]/datarooms/[id]/folders/[...name].ts
index 609e59f2..462f0665 100644
--- a/pages/api/teams/[teamId]/datarooms/[id]/folders/[...name].ts
+++ b/pages/api/teams/[teamId]/datarooms/[id]/folders/[...name].ts
@@ -1,7 +1,9 @@
import { NextApiRequest, NextApiResponse } from "next";
+
+import { authOptions } from "@/pages/api/auth/[...nextauth]";
import { getServerSession } from "next-auth/next";
+
import prisma from "@/lib/prisma";
-import { authOptions } from "@/pages/api/auth/[...nextauth]";
import { CustomUser } from "@/lib/types";
export default async function handle(
diff --git a/pages/api/teams/[teamId]/datarooms/[id]/folders/documents/[...name].ts b/pages/api/teams/[teamId]/datarooms/[id]/folders/documents/[...name].ts
index 7c4b575b..6d076fa5 100644
--- a/pages/api/teams/[teamId]/datarooms/[id]/folders/documents/[...name].ts
+++ b/pages/api/teams/[teamId]/datarooms/[id]/folders/documents/[...name].ts
@@ -1,7 +1,9 @@
import { NextApiRequest, NextApiResponse } from "next";
+
+import { authOptions } from "@/pages/api/auth/[...nextauth]";
import { getServerSession } from "next-auth/next";
+
import prisma from "@/lib/prisma";
-import { authOptions } from "@/pages/api/auth/[...nextauth]";
import { CustomUser } from "@/lib/types";
export default async function handle(
diff --git a/pages/api/teams/[teamId]/datarooms/[id]/folders/index.ts b/pages/api/teams/[teamId]/datarooms/[id]/folders/index.ts
index 2ab9771d..76c54126 100644
--- a/pages/api/teams/[teamId]/datarooms/[id]/folders/index.ts
+++ b/pages/api/teams/[teamId]/datarooms/[id]/folders/index.ts
@@ -1,9 +1,11 @@
import { NextApiRequest, NextApiResponse } from "next";
+
+import { authOptions } from "@/pages/api/auth/[...nextauth]";
+import slugify from "@sindresorhus/slugify";
import { getServerSession } from "next-auth/next";
+
import prisma from "@/lib/prisma";
-import { authOptions } from "@/pages/api/auth/[...nextauth]";
import { CustomUser } from "@/lib/types";
-import slugify from "@sindresorhus/slugify";
export default async function handle(
req: NextApiRequest,
diff --git a/pages/api/teams/[teamId]/datarooms/[id]/folders/manage/[folderId]/index.ts b/pages/api/teams/[teamId]/datarooms/[id]/folders/manage/[folderId]/index.ts
index 0a5d7957..d254a177 100644
--- a/pages/api/teams/[teamId]/datarooms/[id]/folders/manage/[folderId]/index.ts
+++ b/pages/api/teams/[teamId]/datarooms/[id]/folders/manage/[folderId]/index.ts
@@ -1,10 +1,12 @@
import { NextApiRequest, NextApiResponse } from "next";
+
+import { authOptions } from "@/pages/api/auth/[...nextauth]";
+import slugify from "@sindresorhus/slugify";
import { getServerSession } from "next-auth/next";
+
+import { errorhandler } from "@/lib/errorHandler";
import prisma from "@/lib/prisma";
import { CustomUser } from "@/lib/types";
-import { errorhandler } from "@/lib/errorHandler";
-import slugify from "@sindresorhus/slugify";
-import { authOptions } from "@/pages/api/auth/[...nextauth]";
export default async function handle(
req: NextApiRequest,
diff --git a/pages/api/teams/[teamId]/datarooms/[id]/folders/manage/index.ts b/pages/api/teams/[teamId]/datarooms/[id]/folders/manage/index.ts
index 7edb4465..8e3e0bd3 100644
--- a/pages/api/teams/[teamId]/datarooms/[id]/folders/manage/index.ts
+++ b/pages/api/teams/[teamId]/datarooms/[id]/folders/manage/index.ts
@@ -1,10 +1,12 @@
import { NextApiRequest, NextApiResponse } from "next";
+
+import { authOptions } from "@/pages/api/auth/[...nextauth]";
+import slugify from "@sindresorhus/slugify";
import { getServerSession } from "next-auth/next";
+
+import { errorhandler } from "@/lib/errorHandler";
import prisma from "@/lib/prisma";
import { CustomUser } from "@/lib/types";
-import { errorhandler } from "@/lib/errorHandler";
-import slugify from "@sindresorhus/slugify";
-import { authOptions } from "@/pages/api/auth/[...nextauth]";
export default async function handle(
req: NextApiRequest,
diff --git a/pages/api/teams/[teamId]/datarooms/[id]/folders/parents/[...name].ts b/pages/api/teams/[teamId]/datarooms/[id]/folders/parents/[...name].ts
index 9c44682e..13074aaa 100644
--- a/pages/api/teams/[teamId]/datarooms/[id]/folders/parents/[...name].ts
+++ b/pages/api/teams/[teamId]/datarooms/[id]/folders/parents/[...name].ts
@@ -1,7 +1,9 @@
import { NextApiRequest, NextApiResponse } from "next";
+
+import { authOptions } from "@/pages/api/auth/[...nextauth]";
import { getServerSession } from "next-auth/next";
+
import prisma from "@/lib/prisma";
-import { authOptions } from "@/pages/api/auth/[...nextauth]";
import { CustomUser } from "@/lib/types";
export default async function handle(
diff --git a/pages/api/teams/[teamId]/datarooms/[id]/index.ts b/pages/api/teams/[teamId]/datarooms/[id]/index.ts
index 971d011a..8ac2203f 100644
--- a/pages/api/teams/[teamId]/datarooms/[id]/index.ts
+++ b/pages/api/teams/[teamId]/datarooms/[id]/index.ts
@@ -1,9 +1,11 @@
import { NextApiRequest, NextApiResponse } from "next";
+
+import { authOptions } from "@/pages/api/auth/[...nextauth]";
import { getServerSession } from "next-auth/next";
+
+import { errorhandler } from "@/lib/errorHandler";
import prisma from "@/lib/prisma";
-import { authOptions } from "@/pages/api/auth/[...nextauth]";
import { CustomUser } from "@/lib/types";
-import { errorhandler } from "@/lib/errorHandler";
export default async function handle(
req: NextApiRequest,
diff --git a/pages/api/teams/[teamId]/datarooms/[id]/links.ts b/pages/api/teams/[teamId]/datarooms/[id]/links.ts
index 1f40596f..1ce81f27 100644
--- a/pages/api/teams/[teamId]/datarooms/[id]/links.ts
+++ b/pages/api/teams/[teamId]/datarooms/[id]/links.ts
@@ -1,11 +1,14 @@
import { NextApiRequest, NextApiResponse } from "next";
+
import { getServerSession } from "next-auth/next";
-import { authOptions } from "../../../../auth/[...nextauth]";
-import { log } from "@/lib/utils";
-import { CustomUser } from "@/lib/types";
-import { getTeamWithUsersAndDocument } from "@/lib/team/helper";
+
import { errorhandler } from "@/lib/errorHandler";
import prisma from "@/lib/prisma";
+import { getTeamWithUsersAndDocument } from "@/lib/team/helper";
+import { CustomUser } from "@/lib/types";
+import { log } from "@/lib/utils";
+
+import { authOptions } from "../../../../auth/[...nextauth]";
export default async function handle(
req: NextApiRequest,
diff --git a/pages/api/teams/[teamId]/datarooms/[id]/stats.ts b/pages/api/teams/[teamId]/datarooms/[id]/stats.ts
index 8998c739..257116c7 100644
--- a/pages/api/teams/[teamId]/datarooms/[id]/stats.ts
+++ b/pages/api/teams/[teamId]/datarooms/[id]/stats.ts
@@ -1,11 +1,14 @@
import { NextApiRequest, NextApiResponse } from "next";
+
+import { View } from "@prisma/client";
import { getServerSession } from "next-auth/next";
+
+import { errorhandler } from "@/lib/errorHandler";
import prisma from "@/lib/prisma";
-import { authOptions } from "../../../../auth/[...nextauth]";
import { getTotalDataroomDuration } from "@/lib/tinybird";
import { CustomUser } from "@/lib/types";
-import { errorhandler } from "@/lib/errorHandler";
-import { View } from "@prisma/client";
+
+import { authOptions } from "../../../../auth/[...nextauth]";
export default async function handle(
req: NextApiRequest,
diff --git a/pages/api/teams/[teamId]/datarooms/[id]/users/index.ts b/pages/api/teams/[teamId]/datarooms/[id]/users/index.ts
index 1737ac52..49e6015e 100644
--- a/pages/api/teams/[teamId]/datarooms/[id]/users/index.ts
+++ b/pages/api/teams/[teamId]/datarooms/[id]/users/index.ts
@@ -1,10 +1,12 @@
-import { getServerSession } from "next-auth";
import { NextApiRequest, NextApiResponse } from "next";
-import prisma from "@/lib/prisma";
-import { CustomUser } from "@/lib/types";
-import { errorhandler } from "@/lib/errorHandler";
+
import { authOptions } from "@/pages/api/auth/[...nextauth]";
+import { getServerSession } from "next-auth";
+
import { sendViewerInvitation } from "@/lib/api/notification-helper";
+import { errorhandler } from "@/lib/errorHandler";
+import prisma from "@/lib/prisma";
+import { CustomUser } from "@/lib/types";
export default async function handle(
req: NextApiRequest,
diff --git a/pages/api/teams/[teamId]/datarooms/[id]/viewers/index.ts b/pages/api/teams/[teamId]/datarooms/[id]/viewers/index.ts
index 38c7aa7d..39f8bf73 100644
--- a/pages/api/teams/[teamId]/datarooms/[id]/viewers/index.ts
+++ b/pages/api/teams/[teamId]/datarooms/[id]/viewers/index.ts
@@ -1,10 +1,12 @@
import { NextApiRequest, NextApiResponse } from "next";
-import { getServerSession } from "next-auth/next";
-import { log } from "@/lib/utils";
+
import { authOptions } from "@/pages/api/auth/[...nextauth]";
-import { CustomUser } from "@/lib/types";
+import { getServerSession } from "next-auth/next";
+
import { errorhandler } from "@/lib/errorHandler";
import prisma from "@/lib/prisma";
+import { CustomUser } from "@/lib/types";
+import { log } from "@/lib/utils";
export default async function handle(
req: NextApiRequest,
diff --git a/pages/api/teams/[teamId]/datarooms/[id]/views/[viewId]/history.ts b/pages/api/teams/[teamId]/datarooms/[id]/views/[viewId]/history.ts
index 7a74b906..6a4491ba 100644
--- a/pages/api/teams/[teamId]/datarooms/[id]/views/[viewId]/history.ts
+++ b/pages/api/teams/[teamId]/datarooms/[id]/views/[viewId]/history.ts
@@ -1,9 +1,11 @@
import { NextApiRequest, NextApiResponse } from "next";
-import { getServerSession } from "next-auth/next";
+
import { authOptions } from "@/pages/api/auth/[...nextauth]";
-import { CustomUser } from "@/lib/types";
-import prisma from "@/lib/prisma";
+import { getServerSession } from "next-auth/next";
+
import { errorhandler } from "@/lib/errorHandler";
+import prisma from "@/lib/prisma";
+import { CustomUser } from "@/lib/types";
export default async function handle(
req: NextApiRequest,
diff --git a/pages/api/teams/[teamId]/datarooms/[id]/views/index.ts b/pages/api/teams/[teamId]/datarooms/[id]/views/index.ts
index 2c8cde81..21a7a983 100644
--- a/pages/api/teams/[teamId]/datarooms/[id]/views/index.ts
+++ b/pages/api/teams/[teamId]/datarooms/[id]/views/index.ts
@@ -1,10 +1,12 @@
import { NextApiRequest, NextApiResponse } from "next";
-import { getServerSession } from "next-auth/next";
-import { log } from "@/lib/utils";
+
import { authOptions } from "@/pages/api/auth/[...nextauth]";
-import { CustomUser } from "@/lib/types";
+import { getServerSession } from "next-auth/next";
+
import { errorhandler } from "@/lib/errorHandler";
import prisma from "@/lib/prisma";
+import { CustomUser } from "@/lib/types";
+import { log } from "@/lib/utils";
export default async function handle(
req: NextApiRequest,
diff --git a/pages/api/teams/[teamId]/datarooms/index.ts b/pages/api/teams/[teamId]/datarooms/index.ts
index 7af5cfd8..5054183c 100644
--- a/pages/api/teams/[teamId]/datarooms/index.ts
+++ b/pages/api/teams/[teamId]/datarooms/index.ts
@@ -1,11 +1,13 @@
import { NextApiRequest, NextApiResponse } from "next";
-import { getServerSession } from "next-auth/next";
-import prisma from "@/lib/prisma";
+
+import { getLimits } from "@/ee/limits/server";
import { authOptions } from "@/pages/api/auth/[...nextauth]";
-import { CustomUser } from "@/lib/types";
import slugify from "@sindresorhus/slugify";
+import { getServerSession } from "next-auth/next";
+
import { newId } from "@/lib/id-helper";
-import { getLimits } from "@/ee/limits/server";
+import prisma from "@/lib/prisma";
+import { CustomUser } from "@/lib/types";
export default async function handle(
req: NextApiRequest,
diff --git a/pages/api/teams/[teamId]/datarooms/trial.ts b/pages/api/teams/[teamId]/datarooms/trial.ts
index 981b8757..bb5793e1 100644
--- a/pages/api/teams/[teamId]/datarooms/trial.ts
+++ b/pages/api/teams/[teamId]/datarooms/trial.ts
@@ -1,9 +1,11 @@
import { NextApiRequest, NextApiResponse } from "next";
+
+import { authOptions } from "@/pages/api/auth/[...nextauth]";
import { getServerSession } from "next-auth/next";
+
+import { newId } from "@/lib/id-helper";
import prisma from "@/lib/prisma";
-import { authOptions } from "@/pages/api/auth/[...nextauth]";
import { CustomUser } from "@/lib/types";
-import { newId } from "@/lib/id-helper";
import { log } from "@/lib/utils";
export default async function handle(
diff --git a/pages/api/teams/[teamId]/documents/[id]/index.ts b/pages/api/teams/[teamId]/documents/[id]/index.ts
index 2d9845ea..c3964d6f 100644
--- a/pages/api/teams/[teamId]/documents/[id]/index.ts
+++ b/pages/api/teams/[teamId]/documents/[id]/index.ts
@@ -1,11 +1,14 @@
import { NextApiRequest, NextApiResponse } from "next";
+
import { getServerSession } from "next-auth/next";
-import prisma from "@/lib/prisma";
-import { authOptions } from "../../../../auth/[...nextauth]";
-import { CustomUser } from "@/lib/types";
-import { getTeamWithUsersAndDocument } from "@/lib/team/helper";
+
import { errorhandler } from "@/lib/errorHandler";
import { deleteFile } from "@/lib/files/delete-file-server";
+import prisma from "@/lib/prisma";
+import { getTeamWithUsersAndDocument } from "@/lib/team/helper";
+import { CustomUser } from "@/lib/types";
+
+import { authOptions } from "../../../../auth/[...nextauth]";
export default async function handle(
req: NextApiRequest,
diff --git a/pages/api/teams/[teamId]/documents/[id]/links.ts b/pages/api/teams/[teamId]/documents/[id]/links.ts
index 6bc21203..da3d4c1b 100644
--- a/pages/api/teams/[teamId]/documents/[id]/links.ts
+++ b/pages/api/teams/[teamId]/documents/[id]/links.ts
@@ -1,10 +1,13 @@
import { NextApiRequest, NextApiResponse } from "next";
+
import { getServerSession } from "next-auth/next";
-import { authOptions } from "../../../../auth/[...nextauth]";
-import { log } from "@/lib/utils";
-import { CustomUser } from "@/lib/types";
-import { getTeamWithUsersAndDocument } from "@/lib/team/helper";
+
import { errorhandler } from "@/lib/errorHandler";
+import { getTeamWithUsersAndDocument } from "@/lib/team/helper";
+import { CustomUser } from "@/lib/types";
+import { log } from "@/lib/utils";
+
+import { authOptions } from "../../../../auth/[...nextauth]";
export default async function handle(
req: NextApiRequest,
diff --git a/pages/api/teams/[teamId]/documents/[id]/stats.ts b/pages/api/teams/[teamId]/documents/[id]/stats.ts
index 60079252..6368228e 100644
--- a/pages/api/teams/[teamId]/documents/[id]/stats.ts
+++ b/pages/api/teams/[teamId]/documents/[id]/stats.ts
@@ -1,13 +1,16 @@
import { NextApiRequest, NextApiResponse } from "next";
+
+import { View } from "@prisma/client";
import { getServerSession } from "next-auth/next";
+
+import { LIMITS } from "@/lib/constants";
+import { errorhandler } from "@/lib/errorHandler";
import prisma from "@/lib/prisma";
-import { authOptions } from "../../../../auth/[...nextauth]";
+import { getTeamWithUsersAndDocument } from "@/lib/team/helper";
import { getTotalAvgPageDuration } from "@/lib/tinybird";
import { CustomUser } from "@/lib/types";
-import { getTeamWithUsersAndDocument } from "@/lib/team/helper";
-import { errorhandler } from "@/lib/errorHandler";
-import { View } from "@prisma/client";
-import { LIMITS } from "@/lib/constants";
+
+import { authOptions } from "../../../../auth/[...nextauth]";
export default async function handle(
req: NextApiRequest,
diff --git a/pages/api/teams/[teamId]/documents/[id]/update-name.ts b/pages/api/teams/[teamId]/documents/[id]/update-name.ts
index 993213dd..b4118310 100644
--- a/pages/api/teams/[teamId]/documents/[id]/update-name.ts
+++ b/pages/api/teams/[teamId]/documents/[id]/update-name.ts
@@ -1,14 +1,16 @@
import { NextApiRequest, NextApiResponse } from "next";
+
+import { authOptions } from "@/pages/api/auth/[...nextauth]";
import { getServerSession } from "next-auth/next";
+
+import { errorhandler } from "@/lib/errorHandler";
import prisma from "@/lib/prisma";
-import { authOptions } from "@/pages/api/auth/[...nextauth]";
-import { CustomUser } from "@/lib/types";
import { getTeamWithUsersAndDocument } from "@/lib/team/helper";
-import { errorhandler } from "@/lib/errorHandler";
+import { CustomUser } from "@/lib/types";
export default async function handle(
req: NextApiRequest,
- res: NextApiResponse
+ res: NextApiResponse,
) {
if (req.method === "POST") {
// GET /api/teams/:teamId/documents/:id/update-name
diff --git a/pages/api/teams/[teamId]/documents/[id]/versions/index.ts b/pages/api/teams/[teamId]/documents/[id]/versions/index.ts
index ab1c250c..9d872059 100644
--- a/pages/api/teams/[teamId]/documents/[id]/versions/index.ts
+++ b/pages/api/teams/[teamId]/documents/[id]/versions/index.ts
@@ -1,12 +1,14 @@
import { NextApiRequest, NextApiResponse } from "next";
-import { getServerSession } from "next-auth/next";
-import prisma from "@/lib/prisma";
-import { log } from "@/lib/utils";
+
import { authOptions } from "@/pages/api/auth/[...nextauth]";
-import { CustomUser } from "@/lib/types";
-import { getTeamWithUsersAndDocument } from "@/lib/team/helper";
import { client } from "@/trigger";
import { DocumentStorageType } from "@prisma/client";
+import { getServerSession } from "next-auth/next";
+
+import prisma from "@/lib/prisma";
+import { getTeamWithUsersAndDocument } from "@/lib/team/helper";
+import { CustomUser } from "@/lib/types";
+import { log } from "@/lib/utils";
export default async function handle(
req: NextApiRequest,
diff --git a/pages/api/teams/[teamId]/documents/[id]/views/[viewId]/stats.ts b/pages/api/teams/[teamId]/documents/[id]/views/[viewId]/stats.ts
index 63afc0fd..f300e5b3 100644
--- a/pages/api/teams/[teamId]/documents/[id]/views/[viewId]/stats.ts
+++ b/pages/api/teams/[teamId]/documents/[id]/views/[viewId]/stats.ts
@@ -1,11 +1,13 @@
import { NextApiRequest, NextApiResponse } from "next";
-import { getServerSession } from "next-auth/next";
-import { getViewPageDuration } from "@/lib/tinybird";
+
import { authOptions } from "@/pages/api/auth/[...nextauth]";
-import { CustomUser } from "@/lib/types";
+import { getServerSession } from "next-auth/next";
+
+import { errorhandler } from "@/lib/errorHandler";
import prisma from "@/lib/prisma";
import { getTeamWithUsersAndDocument } from "@/lib/team/helper";
-import { errorhandler } from "@/lib/errorHandler";
+import { getViewPageDuration } from "@/lib/tinybird";
+import { CustomUser } from "@/lib/types";
export default async function handle(
req: NextApiRequest,
diff --git a/pages/api/teams/[teamId]/documents/[id]/views/index.ts b/pages/api/teams/[teamId]/documents/[id]/views/index.ts
index c343d2d8..321b30b4 100644
--- a/pages/api/teams/[teamId]/documents/[id]/views/index.ts
+++ b/pages/api/teams/[teamId]/documents/[id]/views/index.ts
@@ -1,13 +1,15 @@
import { NextApiRequest, NextApiResponse } from "next";
-import { getServerSession } from "next-auth/next";
-import { log } from "@/lib/utils";
-import { getViewPageDuration } from "@/lib/tinybird";
+
import { authOptions } from "@/pages/api/auth/[...nextauth]";
-import { CustomUser } from "@/lib/types";
-import { getTeamWithUsersAndDocument } from "@/lib/team/helper";
+import { getServerSession } from "next-auth/next";
+
+import { LIMITS } from "@/lib/constants";
import { errorhandler } from "@/lib/errorHandler";
import prisma from "@/lib/prisma";
-import { LIMITS } from "@/lib/constants";
+import { getTeamWithUsersAndDocument } from "@/lib/team/helper";
+import { getViewPageDuration } from "@/lib/tinybird";
+import { CustomUser } from "@/lib/types";
+import { log } from "@/lib/utils";
export default async function handle(
req: NextApiRequest,
diff --git a/pages/api/teams/[teamId]/documents/document-processing-status.ts b/pages/api/teams/[teamId]/documents/document-processing-status.ts
index eab5c6cf..a35f95e7 100644
--- a/pages/api/teams/[teamId]/documents/document-processing-status.ts
+++ b/pages/api/teams/[teamId]/documents/document-processing-status.ts
@@ -1,15 +1,19 @@
import { NextApiRequest, NextApiResponse } from "next";
+
import prisma from "@/lib/prisma";
-export default async function handler(req: NextApiRequest, res: NextApiResponse) {
+export default async function handler(
+ req: NextApiRequest,
+ res: NextApiResponse,
+) {
const { documentVersionId } = req.query as { documentVersionId: string };
const documentVersion = await prisma.documentVersion.findUnique({
where: { id: documentVersionId },
- select: {
+ select: {
numPages: true,
hasPages: true,
- _count: { select: { pages: true } }
+ _count: { select: { pages: true } },
},
});
diff --git a/pages/api/teams/[teamId]/documents/index.ts b/pages/api/teams/[teamId]/documents/index.ts
index a9ca65ad..8cb96094 100644
--- a/pages/api/teams/[teamId]/documents/index.ts
+++ b/pages/api/teams/[teamId]/documents/index.ts
@@ -1,15 +1,18 @@
import { NextApiRequest, NextApiResponse } from "next";
+
+import { client } from "@/trigger";
+import { DocumentStorageType } from "@prisma/client";
import { getServerSession } from "next-auth/next";
+import { parsePageId } from "notion-utils";
+
+import { errorhandler } from "@/lib/errorHandler";
+import notion from "@/lib/notion";
import prisma from "@/lib/prisma";
-import { authOptions } from "../../../auth/[...nextauth]";
+import { getTeamWithUsersAndDocument } from "@/lib/team/helper";
import { CustomUser } from "@/lib/types";
import { getExtension, log } from "@/lib/utils";
-import { getTeamWithUsersAndDocument } from "@/lib/team/helper";
-import { errorhandler } from "@/lib/errorHandler";
-import { client } from "@/trigger";
-import notion from "@/lib/notion";
-import { parsePageId } from "notion-utils";
-import { DocumentStorageType } from "@prisma/client";
+
+import { authOptions } from "../../../auth/[...nextauth]";
export default async function handle(
req: NextApiRequest,
diff --git a/pages/api/teams/[teamId]/documents/update.ts b/pages/api/teams/[teamId]/documents/update.ts
index 9fa2ef53..349be458 100644
--- a/pages/api/teams/[teamId]/documents/update.ts
+++ b/pages/api/teams/[teamId]/documents/update.ts
@@ -1,15 +1,18 @@
import { NextApiRequest, NextApiResponse } from "next";
+
import { getServerSession } from "next-auth/next";
+
+import { errorhandler } from "@/lib/errorHandler";
import prisma from "@/lib/prisma";
-import { authOptions } from "../../../auth/[...nextauth]";
+import { getTeamWithUsersAndDocument } from "@/lib/team/helper";
import { CustomUser } from "@/lib/types";
import { getExtension, log } from "@/lib/utils";
-import { getTeamWithUsersAndDocument } from "@/lib/team/helper";
-import { errorhandler } from "@/lib/errorHandler";
+
+import { authOptions } from "../../../auth/[...nextauth]";
export default async function handle(
req: NextApiRequest,
- res: NextApiResponse
+ res: NextApiResponse,
) {
if (req.method === "POST") {
// POST /api/teams/:teamId/documents/update
@@ -49,7 +52,10 @@ export default async function handle(
return res.status(201).json({ message: "Document updated successfully" });
} catch (error) {
- log({message: `Failed to update document: _${documentId}_. \n\n ${error} \n\n*Metadata*: \`{teamId: ${teamId}, userId: ${userId}}\``, type: "error"});
+ log({
+ message: `Failed to update document: _${documentId}_. \n\n ${error} \n\n*Metadata*: \`{teamId: ${teamId}, userId: ${userId}}\``,
+ type: "error",
+ });
errorhandler(error, res);
}
} else {
diff --git a/pages/api/teams/[teamId]/domains/[domain]/index.ts b/pages/api/teams/[teamId]/domains/[domain]/index.ts
index b7112cf7..b959ce44 100644
--- a/pages/api/teams/[teamId]/domains/[domain]/index.ts
+++ b/pages/api/teams/[teamId]/domains/[domain]/index.ts
@@ -1,12 +1,14 @@
import { NextApiRequest, NextApiResponse } from "next";
-import { getServerSession } from "next-auth/next";
-import prisma from "@/lib/prisma";
+
import { authOptions } from "@/pages/api//auth/[...nextauth]";
-import { log } from "@/lib/utils";
+import { getServerSession } from "next-auth/next";
+
import { getApexDomain, removeDomainFromVercel } from "@/lib/domains";
-import { CustomUser } from "@/lib/types";
-import { getTeamWithDomain } from "@/lib/team/helper";
import { errorhandler } from "@/lib/errorHandler";
+import prisma from "@/lib/prisma";
+import { getTeamWithDomain } from "@/lib/team/helper";
+import { CustomUser } from "@/lib/types";
+import { log } from "@/lib/utils";
export default async function handle(
req: NextApiRequest,
@@ -63,7 +65,11 @@ export default async function handle(
return res.status(204).end(); // 204 No Content response for successful deletes
} catch (error) {
- log({message: `Failed to delete domain: _${domain}_. \n\n ${error} \n\n*Metadata*: \`{teamId: ${teamId}, userId: ${userId}}\``, type: "error", mention: true});
+ log({
+ message: `Failed to delete domain: _${domain}_. \n\n ${error} \n\n*Metadata*: \`{teamId: ${teamId}, userId: ${userId}}\``,
+ type: "error",
+ mention: true,
+ });
errorhandler(error, res);
}
} else {
diff --git a/pages/api/teams/[teamId]/domains/[domain]/verify.ts b/pages/api/teams/[teamId]/domains/[domain]/verify.ts
index b1555338..68091d83 100644
--- a/pages/api/teams/[teamId]/domains/[domain]/verify.ts
+++ b/pages/api/teams/[teamId]/domains/[domain]/verify.ts
@@ -1,12 +1,13 @@
import { NextApiRequest, NextApiResponse } from "next";
+
+import { identifyUser, trackAnalytics } from "@/lib/analytics";
import {
getConfigResponse,
getDomainResponse,
verifyDomain,
} from "@/lib/domains";
-import { DomainVerificationStatusProps } from "@/lib/types";
import prisma from "@/lib/prisma";
-import { identifyUser, trackAnalytics } from "@/lib/analytics";
+import { DomainVerificationStatusProps } from "@/lib/types";
export default async function handle(
req: NextApiRequest,
diff --git a/pages/api/teams/[teamId]/domains/index.ts b/pages/api/teams/[teamId]/domains/index.ts
index 06c2def9..aad4f01f 100644
--- a/pages/api/teams/[teamId]/domains/index.ts
+++ b/pages/api/teams/[teamId]/domains/index.ts
@@ -1,12 +1,15 @@
import { NextApiRequest, NextApiResponse } from "next";
+
import { getServerSession } from "next-auth/next";
-import prisma from "@/lib/prisma";
-import { authOptions } from "../../../auth/[...nextauth]";
-import { CustomUser } from "@/lib/types";
-import { log } from "@/lib/utils";
+
import { addDomainToVercel, validDomainRegex } from "@/lib/domains";
import { errorhandler } from "@/lib/errorHandler";
+import prisma from "@/lib/prisma";
import { getTeamWithDomain } from "@/lib/team/helper";
+import { CustomUser } from "@/lib/types";
+import { log } from "@/lib/utils";
+
+import { authOptions } from "../../../auth/[...nextauth]";
export default async function handle(
req: NextApiRequest,
diff --git a/pages/api/teams/[teamId]/folders/[...name].ts b/pages/api/teams/[teamId]/folders/[...name].ts
index 82fd39fb..e9e6c100 100644
--- a/pages/api/teams/[teamId]/folders/[...name].ts
+++ b/pages/api/teams/[teamId]/folders/[...name].ts
@@ -1,7 +1,9 @@
import { NextApiRequest, NextApiResponse } from "next";
+
+import { authOptions } from "@/pages/api/auth/[...nextauth]";
import { getServerSession } from "next-auth/next";
+
import prisma from "@/lib/prisma";
-import { authOptions } from "@/pages/api/auth/[...nextauth]";
import { CustomUser } from "@/lib/types";
export default async function handle(
diff --git a/pages/api/teams/[teamId]/folders/documents/[...name].ts b/pages/api/teams/[teamId]/folders/documents/[...name].ts
index b727dd4a..741798b3 100644
--- a/pages/api/teams/[teamId]/folders/documents/[...name].ts
+++ b/pages/api/teams/[teamId]/folders/documents/[...name].ts
@@ -1,7 +1,9 @@
import { NextApiRequest, NextApiResponse } from "next";
+
+import { authOptions } from "@/pages/api/auth/[...nextauth]";
import { getServerSession } from "next-auth/next";
+
import prisma from "@/lib/prisma";
-import { authOptions } from "@/pages/api/auth/[...nextauth]";
import { CustomUser } from "@/lib/types";
export default async function handle(
diff --git a/pages/api/teams/[teamId]/folders/index.ts b/pages/api/teams/[teamId]/folders/index.ts
index 253d7ecd..3f1453c6 100644
--- a/pages/api/teams/[teamId]/folders/index.ts
+++ b/pages/api/teams/[teamId]/folders/index.ts
@@ -1,9 +1,11 @@
import { NextApiRequest, NextApiResponse } from "next";
+
+import { authOptions } from "@/pages/api/auth/[...nextauth]";
+import slugify from "@sindresorhus/slugify";
import { getServerSession } from "next-auth/next";
+
import prisma from "@/lib/prisma";
-import { authOptions } from "@/pages/api/auth/[...nextauth]";
import { CustomUser } from "@/lib/types";
-import slugify from "@sindresorhus/slugify";
export default async function handle(
req: NextApiRequest,
diff --git a/pages/api/teams/[teamId]/folders/manage/[folderId]/index.ts b/pages/api/teams/[teamId]/folders/manage/[folderId]/index.ts
index a2be006b..a2bc7725 100644
--- a/pages/api/teams/[teamId]/folders/manage/[folderId]/index.ts
+++ b/pages/api/teams/[teamId]/folders/manage/[folderId]/index.ts
@@ -1,10 +1,12 @@
import { NextApiRequest, NextApiResponse } from "next";
+
+import { authOptions } from "@/pages/api/auth/[...nextauth]";
+import slugify from "@sindresorhus/slugify";
import { getServerSession } from "next-auth/next";
+
+import { errorhandler } from "@/lib/errorHandler";
import prisma from "@/lib/prisma";
import { CustomUser } from "@/lib/types";
-import { errorhandler } from "@/lib/errorHandler";
-import slugify from "@sindresorhus/slugify";
-import { authOptions } from "@/pages/api/auth/[...nextauth]";
export default async function handle(
req: NextApiRequest,
diff --git a/pages/api/teams/[teamId]/folders/manage/index.ts b/pages/api/teams/[teamId]/folders/manage/index.ts
index 54e6cca7..932119b7 100644
--- a/pages/api/teams/[teamId]/folders/manage/index.ts
+++ b/pages/api/teams/[teamId]/folders/manage/index.ts
@@ -1,10 +1,12 @@
import { NextApiRequest, NextApiResponse } from "next";
+
+import { authOptions } from "@/pages/api/auth/[...nextauth]";
+import slugify from "@sindresorhus/slugify";
import { getServerSession } from "next-auth/next";
+
+import { errorhandler } from "@/lib/errorHandler";
import prisma from "@/lib/prisma";
import { CustomUser } from "@/lib/types";
-import { errorhandler } from "@/lib/errorHandler";
-import slugify from "@sindresorhus/slugify";
-import { authOptions } from "@/pages/api/auth/[...nextauth]";
export default async function handle(
req: NextApiRequest,
diff --git a/pages/api/teams/[teamId]/folders/parents/[...name].ts b/pages/api/teams/[teamId]/folders/parents/[...name].ts
index 1cf3f954..f11a67be 100644
--- a/pages/api/teams/[teamId]/folders/parents/[...name].ts
+++ b/pages/api/teams/[teamId]/folders/parents/[...name].ts
@@ -1,7 +1,9 @@
import { NextApiRequest, NextApiResponse } from "next";
+
+import { authOptions } from "@/pages/api/auth/[...nextauth]";
import { getServerSession } from "next-auth/next";
+
import prisma from "@/lib/prisma";
-import { authOptions } from "@/pages/api/auth/[...nextauth]";
import { CustomUser } from "@/lib/types";
export default async function handle(
diff --git a/pages/api/teams/[teamId]/index.ts b/pages/api/teams/[teamId]/index.ts
index 1505b0ef..38646617 100644
--- a/pages/api/teams/[teamId]/index.ts
+++ b/pages/api/teams/[teamId]/index.ts
@@ -1,13 +1,16 @@
import { NextApiRequest, NextApiResponse } from "next";
+
import { getServerSession } from "next-auth";
+
+import { errorhandler } from "@/lib/errorHandler";
import prisma from "@/lib/prisma";
import { CustomUser } from "@/lib/types";
+
import { authOptions } from "../../auth/[...nextauth]";
-import { errorhandler } from "@/lib/errorHandler";
export default async function handle(
req: NextApiRequest,
- res: NextApiResponse
+ res: NextApiResponse,
) {
if (req.method === "GET") {
// GET /api/teams/:teamId
@@ -55,7 +58,7 @@ export default async function handle(
// check that the user is member of the team, otherwise return 403
const teamUsers = team?.users;
const isUserPartOfTeam = teamUsers?.some(
- (user) => user.userId === (session.user as CustomUser).id
+ (user) => user.userId === (session.user as CustomUser).id,
);
if (!isUserPartOfTeam) {
return res.status(403).end("Unauthorized to access this team");
@@ -93,7 +96,7 @@ export default async function handle(
const isUserAdmin = team.users.some(
(user) =>
user.role === "ADMIN" &&
- user.userId === (session.user as CustomUser).id
+ user.userId === (session.user as CustomUser).id,
);
if (!isUserAdmin) {
return res
diff --git a/pages/api/teams/[teamId]/invitations/accept.ts b/pages/api/teams/[teamId]/invitations/accept.ts
index 8280549c..cc4c6e01 100644
--- a/pages/api/teams/[teamId]/invitations/accept.ts
+++ b/pages/api/teams/[teamId]/invitations/accept.ts
@@ -1,10 +1,12 @@
-import { getServerSession } from "next-auth";
import { NextApiRequest, NextApiResponse } from "next";
-import prisma from "@/lib/prisma";
-import { CustomUser } from "@/lib/types";
-import { errorhandler } from "@/lib/errorHandler";
+
import { authOptions } from "@/pages/api/auth/[...nextauth]";
+import { getServerSession } from "next-auth";
+
import { identifyUser, trackAnalytics } from "@/lib/analytics";
+import { errorhandler } from "@/lib/errorHandler";
+import prisma from "@/lib/prisma";
+import { CustomUser } from "@/lib/types";
export default async function handle(
req: NextApiRequest,
diff --git a/pages/api/teams/[teamId]/invitations/index.ts b/pages/api/teams/[teamId]/invitations/index.ts
index 1a2ef0ac..89a6b039 100644
--- a/pages/api/teams/[teamId]/invitations/index.ts
+++ b/pages/api/teams/[teamId]/invitations/index.ts
@@ -1,9 +1,11 @@
-import { getServerSession } from "next-auth";
import { NextApiRequest, NextApiResponse } from "next";
+
+import { authOptions } from "@/pages/api/auth/[...nextauth]";
+import { getServerSession } from "next-auth";
+
+import { errorhandler } from "@/lib/errorHandler";
import prisma from "@/lib/prisma";
import { CustomUser } from "@/lib/types";
-import { errorhandler } from "@/lib/errorHandler";
-import { authOptions } from "@/pages/api/auth/[...nextauth]";
export default async function handle(
req: NextApiRequest,
diff --git a/pages/api/teams/[teamId]/invitations/resend.ts b/pages/api/teams/[teamId]/invitations/resend.ts
index 44d853cc..12ef4c55 100644
--- a/pages/api/teams/[teamId]/invitations/resend.ts
+++ b/pages/api/teams/[teamId]/invitations/resend.ts
@@ -1,11 +1,13 @@
-import { getServerSession } from "next-auth";
import { NextApiRequest, NextApiResponse } from "next";
-import prisma from "@/lib/prisma";
-import { CustomUser } from "@/lib/types";
-import { errorhandler } from "@/lib/errorHandler";
+
import { authOptions } from "@/pages/api/auth/[...nextauth]";
-import { sendTeammateInviteEmail } from "@/lib/emails/send-teammate-invite";
+import { getServerSession } from "next-auth";
+
import { hashToken } from "@/lib/api/auth/token";
+import { sendTeammateInviteEmail } from "@/lib/emails/send-teammate-invite";
+import { errorhandler } from "@/lib/errorHandler";
+import prisma from "@/lib/prisma";
+import { CustomUser } from "@/lib/types";
export default async function handle(
req: NextApiRequest,
diff --git a/pages/api/teams/[teamId]/invite.ts b/pages/api/teams/[teamId]/invite.ts
index c3596597..eb22da61 100644
--- a/pages/api/teams/[teamId]/invite.ts
+++ b/pages/api/teams/[teamId]/invite.ts
@@ -1,13 +1,16 @@
-import { getServerSession } from "next-auth";
-import { authOptions } from "../../auth/[...nextauth]";
import { NextApiRequest, NextApiResponse } from "next";
-import prisma from "@/lib/prisma";
-import { CustomUser } from "@/lib/types";
-import { errorhandler } from "@/lib/errorHandler";
+
+import { getLimits } from "@/ee/limits/server";
+import { getServerSession } from "next-auth";
+
+import { hashToken } from "@/lib/api/auth/token";
import { sendTeammateInviteEmail } from "@/lib/emails/send-teammate-invite";
+import { errorhandler } from "@/lib/errorHandler";
import { newId } from "@/lib/id-helper";
-import { hashToken } from "@/lib/api/auth/token";
-import { getLimits } from "@/ee/limits/server";
+import prisma from "@/lib/prisma";
+import { CustomUser } from "@/lib/types";
+
+import { authOptions } from "../../auth/[...nextauth]";
export default async function handle(
req: NextApiRequest,
diff --git a/pages/api/teams/[teamId]/remove-teammate.ts b/pages/api/teams/[teamId]/remove-teammate.ts
index 11606f1e..4169a2f4 100644
--- a/pages/api/teams/[teamId]/remove-teammate.ts
+++ b/pages/api/teams/[teamId]/remove-teammate.ts
@@ -1,13 +1,16 @@
import { NextApiRequest, NextApiResponse } from "next";
+
import { getServerSession } from "next-auth";
-import { authOptions } from "../../auth/[...nextauth]";
-import { CustomUser } from "@/lib/types";
+
import { errorhandler } from "@/lib/errorHandler";
import prisma from "@/lib/prisma";
+import { CustomUser } from "@/lib/types";
+
+import { authOptions } from "../../auth/[...nextauth]";
export default async function handle(
req: NextApiRequest,
- res: NextApiResponse
+ res: NextApiResponse,
) {
if (req.method === "DELETE") {
// DELETE /api/teams/:teamId/remove-teammate
diff --git a/pages/api/teams/[teamId]/update-name.ts b/pages/api/teams/[teamId]/update-name.ts
index 03164cd0..b8bff649 100644
--- a/pages/api/teams/[teamId]/update-name.ts
+++ b/pages/api/teams/[teamId]/update-name.ts
@@ -1,13 +1,16 @@
import { NextApiRequest, NextApiResponse } from "next";
+
import { getServerSession } from "next-auth";
-import { authOptions } from "../../auth/[...nextauth]";
+
import { errorhandler } from "@/lib/errorHandler";
import prisma from "@/lib/prisma";
import { CustomUser } from "@/lib/types";
+import { authOptions } from "../../auth/[...nextauth]";
+
export default async function handle(
req: NextApiRequest,
- res: NextApiResponse
+ res: NextApiResponse,
) {
if (req.method === "POST") {
// POST /api/teams/:teamId/update-name
@@ -36,7 +39,7 @@ export default async function handle(
const isUserAdmin = team.users.some(
(user) =>
user.role === "ADMIN" &&
- user.userId === (session.user as CustomUser).id
+ user.userId === (session.user as CustomUser).id,
);
if (!isUserAdmin) {
return res
diff --git a/pages/api/teams/index.ts b/pages/api/teams/index.ts
index a90894df..870d4437 100644
--- a/pages/api/teams/index.ts
+++ b/pages/api/teams/index.ts
@@ -1,10 +1,13 @@
import { NextApiRequest, NextApiResponse } from "next";
+
import { getServerSession } from "next-auth";
-import { authOptions } from "../auth/[...nextauth]";
+
+import { errorhandler } from "@/lib/errorHandler";
import prisma from "@/lib/prisma";
import { CustomUser } from "@/lib/types";
import { log } from "@/lib/utils";
-import { errorhandler } from "@/lib/errorHandler";
+
+import { authOptions } from "../auth/[...nextauth]";
export default async function handle(
req: NextApiRequest,
diff --git a/pages/api/views-dataroom.ts b/pages/api/views-dataroom.ts
index a856260c..255f5ad0 100644
--- a/pages/api/views-dataroom.ts
+++ b/pages/api/views-dataroom.ts
@@ -1,13 +1,15 @@
import { NextApiRequest, NextApiResponse } from "next";
-import prisma from "@/lib/prisma";
-import { checkPassword, decryptEncrpytedPassword, log } from "@/lib/utils";
-import { newId } from "@/lib/id-helper";
+
+import { parsePageId } from "notion-utils";
+import { record } from "zod";
+
+import sendNotification from "@/lib/api/notification-helper";
import { sendVerificationEmail } from "@/lib/emails/send-email-verification";
import { getFile } from "@/lib/files/get-file";
-import sendNotification from "@/lib/api/notification-helper";
-import { parsePageId } from "notion-utils";
+import { newId } from "@/lib/id-helper";
import notion from "@/lib/notion";
-import { record } from "zod";
+import prisma from "@/lib/prisma";
+import { checkPassword, decryptEncrpytedPassword, log } from "@/lib/utils";
export default async function handle(
req: NextApiRequest,
diff --git a/pages/api/views.ts b/pages/api/views.ts
index fbfd17e9..c24ecaa6 100644
--- a/pages/api/views.ts
+++ b/pages/api/views.ts
@@ -1,10 +1,11 @@
import { NextApiRequest, NextApiResponse } from "next";
-import prisma from "@/lib/prisma";
-import { checkPassword, decryptEncrpytedPassword, log } from "@/lib/utils";
-import { newId } from "@/lib/id-helper";
+
+import sendNotification from "@/lib/api/notification-helper";
import { sendVerificationEmail } from "@/lib/emails/send-email-verification";
import { getFile } from "@/lib/files/get-file";
-import sendNotification from "@/lib/api/notification-helper";
+import { newId } from "@/lib/id-helper";
+import prisma from "@/lib/prisma";
+import { checkPassword, decryptEncrpytedPassword, log } from "@/lib/utils";
export default async function handle(
req: NextApiRequest,
diff --git a/pages/blog/product-hunt-launch.tsx b/pages/blog/product-hunt-launch.tsx
index a3ac5de3..60b9f5a0 100644
--- a/pages/blog/product-hunt-launch.tsx
+++ b/pages/blog/product-hunt-launch.tsx
@@ -1,6 +1,7 @@
+import Head from "next/head";
+
import Footer from "@/components/web/footer";
import Navbar from "@/components/web/navbar";
-import Head from "next/head";
function BlogPost() {
return (
@@ -30,8 +31,8 @@ function BlogPost() {
</Head>
<Navbar />
- <div className="bg-gray-100 p-8 mt-16">
- <div className="max-w-3xl mx-auto space-y-6 bg-white text-black p-6 rounded-lg shadow-md">
+ <div className="mt-16 bg-gray-100 p-8">
+ <div className="mx-auto max-w-3xl space-y-6 rounded-lg bg-white p-6 text-black shadow-md">
<h1 className="text-4xl font-bold ">
How to launch Open Source project on Product Hunt?
</h1>
@@ -58,10 +59,10 @@ function BlogPost() {
alt="How to launch on PH"
className="my-4"
/>
- <h2 className="text-2xl font-bold mb-4">
+ <h2 className="mb-4 text-2xl font-bold">
In this article you will find:
</h2>
- <ul className="list-disc list-inside mb-4">
+ <ul className="mb-4 list-inside list-disc">
<li className="font-bold">Before launch preparation</li>
<li className="font-bold">Launch Day</li>
<li className="font-bold">Special to Open Source launch</li>
@@ -69,15 +70,15 @@ function BlogPost() {
<li className="font-bold">Results and Stats</li>
</ul>
<p>Plus: Happy to share my launch checklist</p>
- <h2 className="text-2xl font-bold mb-4">Before the launch</h2>
+ <h2 className="mb-4 text-2xl font-bold">Before the launch</h2>
{/* 1. Draft the messaging */}
- <h3 className="text-xl font-semibold mb-2">1. Draft the messaging</h3>
+ <h3 className="mb-2 text-xl font-semibold">1. Draft the messaging</h3>
<p>One liners and message for groups or social.</p>
<p>
I like to have 2-4 versions of it, so I can select best for
different places.
</p>
- <blockquote className="border-l-4 border-gray-500 pl-4 my-4">
+ <blockquote className="my-4 border-l-4 border-gray-500 pl-4">
<p>Because launch is a test.</p>
<p>
So I use the opportunity to test messaging in different groups.
@@ -103,7 +104,7 @@ function BlogPost() {
alt="Draft messages"
/>
{/* 2. Warm up your audience */}
- <h3 className="text-xl font-semibold mb-2">
+ <h3 className="mb-2 text-xl font-semibold">
2. Warm up your audience
</h3>
<p>
@@ -116,7 +117,7 @@ function BlogPost() {
page for people to follow, but we did not.
</p>
{/* 3. Create list of your supporters */}
- <h3 className="text-xl font-semibold mb-2">
+ <h3 className="mb-2 text-xl font-semibold">
3. Create list of your supporters
</h3>
<p>
@@ -124,7 +125,7 @@ function BlogPost() {
my friends in twitter and linkedin who could be interested in the
launch.
</p>
- <blockquote className="border-l-4 border-gray-500 pl-4 my-4">
+ <blockquote className="my-4 border-l-4 border-gray-500 pl-4">
<p>Quality over quantity</p>
</blockquote>
<p>
@@ -132,7 +133,7 @@ function BlogPost() {
reach outs and asking for the vote:)
</p>
{/* 4. Create the list of places where to post */}
- <h3 className="text-xl font-semibold mb-2">
+ <h3 className="mb-2 text-xl font-semibold">
4. Create the list of places where to post
</h3>
<p>
@@ -151,7 +152,7 @@ function BlogPost() {
<li>- Building in public/indihacker places</li>
<li>- Places for open source</li>
</ol>
- <h3 className="text-xl font-semibold mb-2">
+ <h3 className="mb-2 text-xl font-semibold">
5. Prepare visuals: video, images, gif
</h3>
<p>
@@ -170,7 +171,7 @@ function BlogPost() {
src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uq71oh23os3t9nq1zksy.png"
alt="Papermakr banner"
/>
- <h3 className="text-xl font-semibold mb-2">
+ <h3 className="mb-2 text-xl font-semibold">
6. Reach 10-20 people in advance for feedback
</h3>
<p>
@@ -185,19 +186,19 @@ function BlogPost() {
<p>
We started preparing <strong>1 week</strong> before launch.
</p>
- <h2 className="text-2xl font-bold mb-4 pt-6">
+ <h2 className="mb-4 pt-6 text-2xl font-bold">
During the launch day
</h2>
<p>
Launch day is mostly about <strong>sharing</strong> that you launch
on social and then continuously <strong>engaging</strong>.
</p>
- <h3 className="text-xl font-semibold mb-2">1. Launch your tweet</h3>
+ <h3 className="mb-2 text-xl font-semibold">1. Launch your tweet</h3>
<img
src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4ri6ggskhpwzm2xjrmxa.gif"
alt="Pareto principle"
/>
- <blockquote className="border-l-4 border-gray-500 pl-4 my-4">
+ <blockquote className="my-4 border-l-4 border-gray-500 pl-4">
<p>20% of efforts bring 80% of result. Pareto also works here</p>
</blockquote>
<p>
@@ -216,7 +217,7 @@ function BlogPost() {
Even if you don&apos;t have a community and a big following on
Twitter, I would aim to make the tweet interesting and focus on it.
</p>
- <h3 className="text-xl font-semibold mb-2">
+ <h3 className="mb-2 text-xl font-semibold">
2. Post on other social platforms: LinkedIn, Devto
</h3>
<p>
@@ -226,7 +227,7 @@ function BlogPost() {
<blockquote>
First, do something which can be done quickly.
</blockquote>
- <h3 className="text-xl font-semibold mb-2">
+ <h3 className="mb-2 text-xl font-semibold">
3. Engage in PH comments
</h3>
<p>
@@ -242,7 +243,7 @@ function BlogPost() {
I don&apos;t know how currently PH count it, I think they are
looking only at upvotes but I still find that important.
</p>
- <h3 className="text-xl font-semibold mb-2">
+ <h3 className="mb-2 text-xl font-semibold">
4. Send email to your users
</h3>
<p>Make it clean with one call to action.</p>
@@ -250,7 +251,7 @@ function BlogPost() {
src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ql9tyzttu2x74ds20ucy.png"
alt="Email"
/>
- <h3 className="text-xl font-semibold mb-2">6. Add launch branding</h3>
+ <h3 className="mb-2 text-xl font-semibold">6. Add launch branding</h3>
<p>
Your and your company profiles are styled and linked to the PH
launch. Banner, link leading to launch, embeds on the website.
@@ -263,7 +264,7 @@ function BlogPost() {
Here are my 10 tips from other launches
</a>
</p>
- <h2 className="text-2xl font-bold mb-4 pt-8">
+ <h2 className="mb-4 pt-8 text-2xl font-bold">
Open source projects launch tips ⭐️
</h2>
<p>If your product is open source, where to look for support?</p>
@@ -302,7 +303,7 @@ function BlogPost() {
<p>
<strong>Go Open Source</strong>🚀🚀🚀
</p>
- <h2 className="text-2xl font-bold mb-4 pt-8">
+ <h2 className="mb-4 pt-8 text-2xl font-bold">
Top 🥇 Open Source launches in 2022-23
</h2>
<p>
@@ -426,7 +427,7 @@ function BlogPost() {
</a>
</li>
</ol>
- <h2 className="text-2xl font-bold pt-6">
+ <h2 className="pt-6 text-2xl font-bold">
Results from our launch 📈
</h2>
<ul>
@@ -447,7 +448,7 @@ function BlogPost() {
src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vx2966hpmjmi17k58rhz.png"
alt="Sources of visitors"
/>
- <h3 className="text-xl font-semibold mb-2 pt-8">
+ <h3 className="mb-2 pt-8 text-xl font-semibold">
Amount of impressions on other platforms:
</h3>
<ul>
@@ -464,7 +465,7 @@ function BlogPost() {
I think it is best if you connect with people in advance and build
meaningful connections.
</p>
- <h3 className="text-xl font-semibold mb-2 pt-8">
+ <h3 className="mb-2 pt-8 text-xl font-semibold">
My guesses on how votes distributed:
</h3>
<ul>
@@ -474,21 +475,21 @@ function BlogPost() {
<li>30% building in public community</li>
<li>20% product hunt community community</li>
</ul>
- <h2 className="text-2xl font-bold mb-4">
+ <h2 className="mb-4 text-2xl font-bold">
Q&A Have some questions? ❓
</h2>
<p>
Some questions I kind of ask myself and maybe will be interesting to
anyone who is reading this:
</p>
- <h3 className="text-xl font-semibold mb-2">
+ <h3 className="mb-2 text-xl font-semibold">
Can you reengineer a successful launch?
</h3>
<p>
No, I think no. It is similar to re-engineering a viral post. There
is always a combination of different factors.
</p>
- <h3 className="text-xl font-semibold mb-2">
+ <h3 className="mb-2 text-xl font-semibold">
Can someone guarantee you success?
</h3>
<p>
@@ -503,7 +504,7 @@ function BlogPost() {
<li>You will not see your real supporters and community around</li>
<li>Fewer people will hear about your brand</li>
</ol>
- <h3 className="text-xl font-semibold mb-2">
+ <h3 className="mb-2 text-xl font-semibold">
Is building in public helping me launch?
</h3>
<p>
@@ -511,7 +512,7 @@ function BlogPost() {
your project no matter if it&apos;s open-source or not is a
long-term game.
</p>
- <h3 className="text-xl font-semibold mb-2">Can my launch fail?</h3>
+ <h3 className="mb-2 text-xl font-semibold">Can my launch fail?</h3>
<p>
To me, no. I will give you an example. I missed the launch of
another product I built. I scheduled it and forgot, just was doing
diff --git a/pages/data-room.tsx b/pages/data-room.tsx
index 555266ff..a7145488 100644
--- a/pages/data-room.tsx
+++ b/pages/data-room.tsx
@@ -1,15 +1,15 @@
import Head from "next/head";
+import Link from "next/link";
+
import { useState } from "react";
-import DataRoom from "@/components/web/dataroom-component";
+import { Button } from "@/components/ui/button";
import Article from "@/components/web/alternatives/docsendtext";
-import Testimonials from "@/components/web/testimonials2";
import CTA from "@/components/web/cta";
+import DataRoom from "@/components/web/dataroom-component";
import Footer from "@/components/web/footer";
-
-import Link from "next/link";
-import { Button } from "@/components/ui/button";
import Navbar from "@/components/web/navbar";
+import Testimonials from "@/components/web/testimonials2";
const features = [
"send unlimited documents",
@@ -83,11 +83,11 @@ export default function Home() {
<div className="flex flex-1 flex-col bg-white text-black">
<Navbar />
- <main className="flex flex-col items-center w-full">
- <section className="pt-24 lg:pt-24 bg-white w-full">
- <div className="px-4 lg:px-2 w-full">
- <div className="max-w-7xl mx-auto px-4 md:px-8 w-full">
- <div className="w-full flex flex-col items-center">
+ <main className="flex w-full flex-col items-center">
+ <section className="w-full bg-white pt-24 lg:pt-24">
+ <div className="w-full px-4 lg:px-2">
+ <div className="mx-auto w-full max-w-7xl px-4 md:px-8">
+ <div className="flex w-full flex-col items-center">
<div className="pb-1">
{/* <img
src="https://media.licdn.com/dms/image/C560BAQF0P4VJimYMZw/company-logo_200_200/0/1630615035618?e=1720656000&v=beta&t=gWnITXssNMEKBqbdPrGev6pbQf9iLywYEr404OFtKV0"
@@ -97,23 +97,23 @@ export default function Home() {
height={50}
/> */}
</div>
- <div className="prose prose-h2:mb-2 first:prose-h2:mt-0 prose-h2:mt-10 prose-headings:font-medium sm:max-w-screen-md sm:pr-2 md:pr-0 w-full text-center">
+ <div className="prose w-full text-center prose-headings:font-medium prose-h2:mb-2 prose-h2:mt-10 first:prose-h2:mt-0 sm:max-w-screen-md sm:pr-2 md:pr-0">
{/* <span className="inline-block text-sm lg:text-base py-1 px-2 bg-gray-50 rounded-3xl text-gray-500 text-xs text-balance">
Powered by Papermark
</span> */}
- <div className="text-black lg:text-7xl my-6 text-balance">
- <h1 className="text-5xl lg:text-7xl mb-1">Data Room</h1>
+ <div className="my-6 text-balance text-black lg:text-7xl">
+ <h1 className="mb-1 text-5xl lg:text-7xl">Data Room</h1>
</div>
- <p className="text-m my-4 text-gray-500 sm:text-xl text-balance">
+ <p className="text-m my-4 text-balance text-gray-500 sm:text-xl">
Learn more about Papermark Data Room and all available
features on 3 core plans including full-whitelabelling and
self-hosting
</p>
</div>
- <div className="pt-8 space-x-2">
+ <div className="space-x-2 pt-8">
<Link href="/login">
- <Button className="text-base rounded-3xl bg-black text-white hover:bg-black/90">
+ <Button className="rounded-3xl bg-black text-base text-white hover:bg-black/90">
Create Data Room
</Button>
</Link>
@@ -124,7 +124,7 @@ export default function Home() {
>
<Button
variant="outline"
- className="text-base rounded-3xl bg-transparent border-black"
+ className="rounded-3xl border-black bg-transparent text-base"
>
Book a demo
</Button>
@@ -140,13 +140,13 @@ export default function Home() {
<DataRoom />
</div>
- <div className="w-full max-w-7xl px-4 md:px-8 mx-auto ">
- <div className="py-12 bg-[#fb7a00] rounded-xl mx-auto px-6 my-4">
- <div className="flex lg:flex-row flex-col item-center justify-between space-y-10 lg:space-y-0">
- <h2 className="text-3xl text-nowrap">
+ <div className="mx-auto w-full max-w-7xl px-4 md:px-8 ">
+ <div className="mx-auto my-4 rounded-xl bg-[#fb7a00] px-6 py-12">
+ <div className="item-center flex flex-col justify-between space-y-10 lg:flex-row lg:space-y-0">
+ <h2 className="text-nowrap text-3xl">
Create secure data room on Papermark
</h2>
- <div className="space-x-2 flex items-center">
+ <div className="flex items-center space-x-2">
<Link
href="https:papermark.io/login"
target="_blank"
@@ -154,7 +154,7 @@ export default function Home() {
>
<Button
variant="outline"
- className="text-base rounded-3xl bg-transparent border-black hover:bg-gray-200 hover:text-black"
+ className="rounded-3xl border-black bg-transparent text-base hover:bg-gray-200 hover:text-black"
>
Crate Data Room
</Button>
@@ -164,7 +164,7 @@ export default function Home() {
target="_blank"
rel="noopener noreferrer"
>
- <Button className="text-base rounded-3xl text-gray-200 bg-black hover:bg-gray-900">
+ <Button className="rounded-3xl bg-black text-base text-gray-200 hover:bg-gray-900">
Book a demo
</Button>
</Link>
@@ -177,18 +177,18 @@ export default function Home() {
<div className="grid grid-cols-1 gap-x-8 gap-y-16 sm:gap-y-20 lg:grid-cols-2 lg:items-start">
<div className="px-6 lg:px-0 lg:pr-4 lg:pt-4">
<div className="mx-auto max-w-2xl lg:mx-0 lg:max-w-lg">
- <h2 className="mt-2 text-3xl text-gray-900 sm:text-4xl text-balance">
+ <h2 className="mt-2 text-balance text-3xl text-gray-900 sm:text-4xl">
Track activity in your data room
</h2>
- <p className="mt-6 text-lg leading-8 text-gray-600 text-balance">
+ <p className="mt-6 text-balance text-lg leading-8 text-gray-600">
Papermark let you share your data room from a link,
but track activty on each document insight the Data
Room. Including time and views per each page.
</p>
</div>
- <div className="pt-8 space-x-2">
+ <div className="space-x-2 pt-8">
<Link href="/login">
- <Button className="text-white text-balance bg-gray-900 rounded-3xl hover:bg-gray-800 justify-center text-balance">
+ <Button className="justify-center text-balance text-balance rounded-3xl bg-gray-900 text-white hover:bg-gray-800">
Get insights
</Button>
</Link>
@@ -245,18 +245,18 @@ export default function Home() {
</div>
<div className="px-6 lg:px-0 lg:pr-4 lg:pt-4">
<div className="mx-auto max-w-2xl lg:mx-0 lg:max-w-lg">
- <h2 className="mt-2 text-3xl text-gray-900 sm:text-4xl text-balance">
+ <h2 className="mt-2 text-balance text-3xl text-gray-900 sm:text-4xl">
Share branded data room
</h2>
- <p className="mt-6 text-lg leading-8 text-gray-600 text-balance">
+ <p className="mt-6 text-balance text-lg leading-8 text-gray-600">
With Papermark you can have unlimited branded data
rooms for your business. Customize the design of
each data room and create white-labelling.
</p>
</div>
- <div className="pt-8 space-x-2">
+ <div className="space-x-2 pt-8">
<Link href="/login">
- <Button className="text-white text-balance bg-gray-900 rounded-3xl hover:bg-gray-800 justify-center text-balance">
+ <Button className="justify-center text-balance text-balance rounded-3xl bg-gray-900 text-white hover:bg-gray-800">
Create branded data room
</Button>
</Link>
@@ -266,7 +266,7 @@ export default function Home() {
</div>
</div>
- <div className="mt-24 mx-auto w-full">
+ <div className="mx-auto mt-24 w-full">
<video
width="100%"
id="video1"
@@ -292,11 +292,11 @@ export default function Home() {
</section>
</main>
<div className="bg-[#fb7a00]">
- <div className="w-full mx-auto max-w-7xl py-32 px-4 md:px-8">
- <h2 className="text-4xl text-balance ">
+ <div className="mx-auto w-full max-w-7xl px-4 py-32 md:px-8">
+ <h2 className="text-balance text-4xl ">
Create secure and modern data room
</h2>
- <div className="pt-8 space-x-2">
+ <div className="space-x-2 pt-8">
<Link
href="https://cal.com/marcseitz/papermark"
target="_blank"
@@ -304,13 +304,13 @@ export default function Home() {
>
<Button
variant="outline"
- className="text-base rounded-3xl bg-transparent border-black"
+ className="rounded-3xl border-black bg-transparent text-base"
>
Book a demo
</Button>
</Link>
<Link href="/login">
- <Button className="text-base rounded-3xl">Start now</Button>
+ <Button className="rounded-3xl text-base">Start now</Button>
</Link>
</div>
</div>
diff --git a/pages/datarooms/[id]/documents/[...name].tsx b/pages/datarooms/[id]/documents/[...name].tsx
index 1027fa2d..b06b2419 100644
--- a/pages/datarooms/[id]/documents/[...name].tsx
+++ b/pages/datarooms/[id]/documents/[...name].tsx
@@ -1,28 +1,31 @@
-import useDocuments, { useRootFolders } from "@/lib/swr/use-documents";
+import { useRouter } from "next/router";
+
import { useTeam } from "@/context/team-context";
-import DocumentCard from "@/components/documents/document-card";
-import { Skeleton } from "@/components/ui/skeleton";
import { FileIcon, FolderIcon, FolderPlusIcon, PlusIcon } from "lucide-react";
+
+import { BreadcrumbComponent } from "@/components/datarooms/dataroom-breadcrumb";
+import DataroomDocumentCard from "@/components/datarooms/dataroom-document-card";
+import { DataroomHeader } from "@/components/datarooms/dataroom-header";
+import { SidebarFolderTree } from "@/components/datarooms/folders";
import { AddDocumentModal } from "@/components/documents/add-document-modal";
-import { Separator } from "@/components/ui/separator";
-import AppLayout from "@/components/layouts/app";
-import { Button } from "@/components/ui/button";
-import Folder from "@/components/shared/icons/folder";
-import FolderCard from "@/components/documents/folder-card";
+import DocumentCard from "@/components/documents/document-card";
import { EmptyDocuments } from "@/components/documents/empty-document";
+import FolderCard from "@/components/documents/folder-card";
import { AddFolderModal } from "@/components/folders/add-folder-modal";
+import AppLayout from "@/components/layouts/app";
+import { NavMenu } from "@/components/navigation-menu";
+import Folder from "@/components/shared/icons/folder";
+import { Button } from "@/components/ui/button";
+import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
+import { Separator } from "@/components/ui/separator";
+import { Skeleton } from "@/components/ui/skeleton";
+
import {
useDataroom,
useDataroomFolderDocuments,
useDataroomFolders,
} from "@/lib/swr/use-dataroom";
-import { DataroomHeader } from "@/components/datarooms/dataroom-header";
-import { NavMenu } from "@/components/navigation-menu";
-import { BreadcrumbComponent } from "@/components/datarooms/dataroom-breadcrumb";
-import { useRouter } from "next/router";
-import DataroomDocumentCard from "@/components/datarooms/dataroom-document-card";
-import { SidebarFolderTree } from "@/components/datarooms/folders";
-import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
+import useDocuments, { useRootFolders } from "@/lib/swr/use-documents";
export default function Documents() {
const router = useRouter();
@@ -36,7 +39,7 @@ export default function Documents() {
return (
<AppLayout>
- <div className="relative overflow-hidden mx-2 sm:mx-3 md:mx-5 lg:mx-7 xl:mx-10 mt-4 md:mt-5 lg:mt-8 mb-10 space-y-8 px-1">
+ <div className="relative mx-2 mb-10 mt-4 space-y-8 overflow-hidden px-1 sm:mx-3 md:mx-5 md:mt-5 lg:mx-7 lg:mt-8 xl:mx-10">
<header>
<DataroomHeader
title={dataroom?.name ?? ""}
@@ -48,7 +51,7 @@ export default function Documents() {
key={1}
>
<Button
- className="flex-1 text-left group flex gap-x-3 items-center justify-start px-3"
+ className="group flex flex-1 items-center justify-start gap-x-3 px-3 text-left"
title="Add New Document"
>
<PlusIcon className="h-5 w-5 shrink-0" aria-hidden="true" />
@@ -63,10 +66,10 @@ export default function Documents() {
<Button
size="icon"
variant="outline"
- className="bg-gray-50 dark:bg-black border-gray-500 hover:bg-gray-200 hover:dark:bg-muted"
+ className="border-gray-500 bg-gray-50 hover:bg-gray-200 dark:bg-black hover:dark:bg-muted"
>
<FolderPlusIcon
- className="w-5 h-5 shrink-0"
+ className="h-5 w-5 shrink-0"
aria-hidden="true"
/>
</Button>
@@ -100,25 +103,25 @@ export default function Documents() {
/>
</header>
- <div className="grid md:grid-cols-4 gap-4 h-full">
- <div className="md:col-span-1 truncate h-full">
+ <div className="grid h-full gap-4 md:grid-cols-4">
+ <div className="h-full truncate md:col-span-1">
<ScrollArea showScrollbar>
<SidebarFolderTree dataroomId={dataroom?.id!} />
<ScrollBar orientation="horizontal" />
</ScrollArea>
</div>
- <div className="md:col-span-3 space-y-4">
+ <div className="space-y-4 md:col-span-3">
<BreadcrumbComponent />
- <section className="flex items-center gap-x-2 mb-2">
+ <section className="mb-2 flex items-center gap-x-2">
{folders && folders.length > 0 ? (
- <p className="text-sm text-gray-400 flex items-center gap-x-1">
- <FolderIcon className="w-4 h-4" />
+ <p className="flex items-center gap-x-1 text-sm text-gray-400">
+ <FolderIcon className="h-4 w-4" />
<span>{folders.length} folders</span>
</p>
) : null}
{documents && documents.length > 0 ? (
- <p className="text-sm text-gray-400 flex items-center gap-x-1">
- <FileIcon className="w-4 h-4" />
+ <p className="flex items-center gap-x-1 text-sm text-gray-400">
+ <FileIcon className="h-4 w-4" />
<span>{documents.length} documents</span>
</p>
) : null}
@@ -140,7 +143,7 @@ export default function Documents() {
: Array.from({ length: 3 }).map((_, i) => (
<li
key={i}
- className="relative w-full py-5 px-4 border rounded-lg flex items-center space-x-3 sm:px-6 lg:px-6"
+ className="relative flex w-full items-center space-x-3 rounded-lg border px-4 py-5 sm:px-6 lg:px-6"
>
<Skeleton key={i} className="h-9 w-9" />
<div>
@@ -149,7 +152,7 @@ export default function Documents() {
</div>
<Skeleton
key={i + 1}
- className="h-5 w-20 absolute top-[50%] transform -translate-y-[50%] right-5"
+ className="absolute right-5 top-[50%] h-5 w-20 -translate-y-[50%] transform"
/>
</li>
))}
@@ -170,7 +173,7 @@ export default function Documents() {
: Array.from({ length: 3 }).map((_, i) => (
<li
key={i}
- className="relative w-full py-5 px-4 border rounded-lg flex items-center space-x-3 sm:px-6 lg:px-6"
+ className="relative flex w-full items-center space-x-3 rounded-lg border px-4 py-5 sm:px-6 lg:px-6"
>
<Skeleton key={i} className="h-9 w-9" />
<div>
@@ -179,7 +182,7 @@ export default function Documents() {
</div>
<Skeleton
key={i + 1}
- className="h-5 w-20 absolute top-[50%] transform -translate-y-[50%] right-5"
+ className="absolute right-5 top-[50%] h-5 w-20 -translate-y-[50%] transform"
/>
</li>
))}
diff --git a/pages/datarooms/[id]/documents/index.tsx b/pages/datarooms/[id]/documents/index.tsx
index 7099e167..b50ef5f9 100644
--- a/pages/datarooms/[id]/documents/index.tsx
+++ b/pages/datarooms/[id]/documents/index.tsx
@@ -1,26 +1,28 @@
-import useDocuments, { useRootFolders } from "@/lib/swr/use-documents";
import { useTeam } from "@/context/team-context";
-import DocumentCard from "@/components/documents/document-card";
-import { Skeleton } from "@/components/ui/skeleton";
import { FileIcon, FolderIcon, FolderPlusIcon, PlusIcon } from "lucide-react";
+
+import { BreadcrumbComponent } from "@/components/datarooms/dataroom-breadcrumb";
+import DataroomDocumentCard from "@/components/datarooms/dataroom-document-card";
+import { DataroomHeader } from "@/components/datarooms/dataroom-header";
+import { SidebarFolderTree } from "@/components/datarooms/folders";
import { AddDocumentModal } from "@/components/documents/add-document-modal";
-import { Separator } from "@/components/ui/separator";
-import AppLayout from "@/components/layouts/app";
-import { Button } from "@/components/ui/button";
-import Folder from "@/components/shared/icons/folder";
-import FolderCard from "@/components/documents/folder-card";
+import DocumentCard from "@/components/documents/document-card";
import { EmptyDocuments } from "@/components/documents/empty-document";
+import FolderCard from "@/components/documents/folder-card";
import { AddFolderModal } from "@/components/folders/add-folder-modal";
+import AppLayout from "@/components/layouts/app";
+import { NavMenu } from "@/components/navigation-menu";
+import Folder from "@/components/shared/icons/folder";
+import { Button } from "@/components/ui/button";
+import { Separator } from "@/components/ui/separator";
+import { Skeleton } from "@/components/ui/skeleton";
+
import {
useDataroom,
useDataroomDocuments,
useDataroomFolders,
} from "@/lib/swr/use-dataroom";
-import { DataroomHeader } from "@/components/datarooms/dataroom-header";
-import { NavMenu } from "@/components/navigation-menu";
-import { BreadcrumbComponent } from "@/components/datarooms/dataroom-breadcrumb";
-import DataroomDocumentCard from "@/components/datarooms/dataroom-document-card";
-import { SidebarFolderTree } from "@/components/datarooms/folders";
+import useDocuments, { useRootFolders } from "@/lib/swr/use-documents";
export default function Documents() {
const { dataroom } = useDataroom();
@@ -30,7 +32,7 @@ export default function Documents() {
return (
<AppLayout>
- <div className="relative overflow-hidden mx-2 sm:mx-3 md:mx-5 lg:mx-7 xl:mx-10 mt-4 md:mt-5 lg:mt-8 mb-10 space-y-8 px-1">
+ <div className="relative mx-2 mb-10 mt-4 space-y-8 overflow-hidden px-1 sm:mx-3 md:mx-5 md:mt-5 lg:mx-7 lg:mt-8 xl:mx-10">
<header>
<DataroomHeader
title={dataroom?.name ?? ""}
@@ -42,7 +44,7 @@ export default function Documents() {
key={1}
>
<Button
- className="flex-1 text-left group flex gap-x-3 items-center justify-start px-3"
+ className="group flex flex-1 items-center justify-start gap-x-3 px-3 text-left"
title="Add New Document"
>
<PlusIcon className="h-5 w-5 shrink-0" aria-hidden="true" />
@@ -57,10 +59,10 @@ export default function Documents() {
<Button
size="icon"
variant="outline"
- className="bg-gray-50 dark:bg-black border-gray-500 hover:bg-gray-200 hover:dark:bg-muted"
+ className="border-gray-500 bg-gray-50 hover:bg-gray-200 dark:bg-black hover:dark:bg-muted"
>
<FolderPlusIcon
- className="w-5 h-5 shrink-0"
+ className="h-5 w-5 shrink-0"
aria-hidden="true"
/>
</Button>
@@ -94,22 +96,22 @@ export default function Documents() {
/>
</header>
- <div className="grid md:grid-cols-4 gap-2">
+ <div className="grid gap-2 md:grid-cols-4">
<div className="md:col-span-1">
<SidebarFolderTree dataroomId={dataroom?.id!} />
</div>
- <div className="md:col-span-3 space-y-4">
+ <div className="space-y-4 md:col-span-3">
<BreadcrumbComponent />
- <section className="flex items-center gap-x-2 mb-2">
+ <section className="mb-2 flex items-center gap-x-2">
{folders && folders.length > 0 ? (
- <p className="text-sm text-gray-400 flex items-center gap-x-1">
- <FolderIcon className="w-4 h-4" />
+ <p className="flex items-center gap-x-1 text-sm text-gray-400">
+ <FolderIcon className="h-4 w-4" />
<span>{folders.length} folders</span>
</p>
) : null}
{documents && documents.length > 0 ? (
- <p className="text-sm text-gray-400 flex items-center gap-x-1">
- <FileIcon className="w-4 h-4" />
+ <p className="flex items-center gap-x-1 text-sm text-gray-400">
+ <FileIcon className="h-4 w-4" />
<span>{documents.length} documents</span>
</p>
) : null}
@@ -131,7 +133,7 @@ export default function Documents() {
: Array.from({ length: 3 }).map((_, i) => (
<li
key={i}
- className="relative w-full py-5 px-4 border rounded-lg flex items-center space-x-3 sm:px-6 lg:px-6"
+ className="relative flex w-full items-center space-x-3 rounded-lg border px-4 py-5 sm:px-6 lg:px-6"
>
<Skeleton key={i} className="h-9 w-9" />
<div>
@@ -140,7 +142,7 @@ export default function Documents() {
</div>
<Skeleton
key={i + 1}
- className="h-5 w-20 absolute top-[50%] transform -translate-y-[50%] right-5"
+ className="absolute right-5 top-[50%] h-5 w-20 -translate-y-[50%] transform"
/>
</li>
))}
@@ -161,7 +163,7 @@ export default function Documents() {
: Array.from({ length: 3 }).map((_, i) => (
<li
key={i}
- className="relative w-full py-5 px-4 border rounded-lg flex items-center space-x-3 sm:px-6 lg:px-6"
+ className="relative flex w-full items-center space-x-3 rounded-lg border px-4 py-5 sm:px-6 lg:px-6"
>
<Skeleton key={i} className="h-9 w-9" />
<div>
@@ -170,7 +172,7 @@ export default function Documents() {
</div>
<Skeleton
key={i + 1}
- className="h-5 w-20 absolute top-[50%] transform -translate-y-[50%] right-5"
+ className="absolute right-5 top-[50%] h-5 w-20 -translate-y-[50%] transform"
/>
</li>
))}
diff --git a/pages/datarooms/[id]/index.tsx b/pages/datarooms/[id]/index.tsx
index 741b20b2..06c5c83e 100644
--- a/pages/datarooms/[id]/index.tsx
+++ b/pages/datarooms/[id]/index.tsx
@@ -1,3 +1,5 @@
+import { useState } from "react";
+
import { DataroomHeader } from "@/components/datarooms/dataroom-header";
import StatsCard from "@/components/datarooms/stats-card";
import AppLayout from "@/components/layouts/app";
@@ -6,8 +8,8 @@ import LinksTable from "@/components/links/links-table";
import { NavMenu } from "@/components/navigation-menu";
import { Button } from "@/components/ui/button";
import DataroomVisitorsTable from "@/components/visitors/dataroom-visitors-table";
+
import { useDataroom, useDataroomLinks } from "@/lib/swr/use-dataroom";
-import { useState } from "react";
export default function DataroomPage() {
const { dataroom } = useDataroom();
@@ -21,7 +23,7 @@ export default function DataroomPage() {
return (
<AppLayout>
- <div className="relative overflow-hidden mx-2 sm:mx-3 md:mx-5 lg:mx-7 xl:mx-10 mt-4 md:mt-5 lg:mt-8 mb-10 space-y-8 px-1">
+ <div className="relative mx-2 mb-10 mt-4 space-y-8 overflow-hidden px-1 sm:mx-3 md:mx-5 md:mt-5 lg:mx-7 lg:mt-8 xl:mx-10">
<header>
<DataroomHeader
title={dataroom.name}
diff --git a/pages/datarooms/[id]/settings/index.tsx b/pages/datarooms/[id]/settings/index.tsx
index 6f9d9924..2c317627 100644
--- a/pages/datarooms/[id]/settings/index.tsx
+++ b/pages/datarooms/[id]/settings/index.tsx
@@ -1,3 +1,13 @@
+import { useRouter } from "next/router";
+
+import { useCallback, useEffect, useState } from "react";
+
+import { useTeam } from "@/context/team-context";
+import { PlusIcon } from "lucide-react";
+import { HexColorInput, HexColorPicker } from "react-colorful";
+import { toast } from "sonner";
+import { mutate } from "swr";
+
import { DataroomHeader } from "@/components/datarooms/dataroom-header";
import AppLayout from "@/components/layouts/app";
import { NavMenu } from "@/components/navigation-menu";
@@ -10,16 +20,10 @@ import {
PopoverContent,
PopoverTrigger,
} from "@/components/ui/popover";
-import { useTeam } from "@/context/team-context";
+
import { useDataroomBrand } from "@/lib/swr/use-brand";
import { useDataroom } from "@/lib/swr/use-dataroom";
import { convertDataUrlToFile, uploadImage } from "@/lib/utils";
-import { PlusIcon } from "lucide-react";
-import { useRouter } from "next/router";
-import { useCallback, useEffect, useState } from "react";
-import { HexColorInput, HexColorPicker } from "react-colorful";
-import { toast } from "sonner";
-import { mutate } from "swr";
export default function DataroomBrandPage() {
const router = useRouter();
@@ -163,7 +167,7 @@ export default function DataroomBrandPage() {
return (
<AppLayout>
- <div className="relative overflow-hidden mx-2 sm:mx-3 md:mx-5 lg:mx-7 xl:mx-10 mt-4 md:mt-5 lg:mt-8 mb-10 space-y-8 px-1">
+ <div className="relative mx-2 mb-10 mt-4 space-y-8 overflow-hidden px-1 sm:mx-3 md:mx-5 md:mt-5 lg:mx-7 lg:mt-8 xl:mx-10">
<header>
<DataroomHeader
title={dataroom.name}
@@ -213,7 +217,7 @@ export default function DataroomBrandPage() {
<div className="flex items-center justify-between">
<Label htmlFor="logo">
Logo{" "}
- <span className="italic text-muted-foreground text-sm">
+ <span className="text-sm italic text-muted-foreground">
(max 2 MB)
</span>
</Label>
@@ -317,7 +321,7 @@ export default function DataroomBrandPage() {
<div className="flex items-center justify-between">
<Label htmlFor="banner">
Banner{" "}
- <span className="italic text-muted-foreground text-sm">
+ <span className="text-sm italic text-muted-foreground">
(max 5 MB, min. 1920x320)
</span>
</Label>
@@ -423,7 +427,7 @@ export default function DataroomBrandPage() {
<Popover>
<PopoverTrigger>
<div
- className="w-9 h-9 rounded-md cursor-pointer ring-1 ring-muted-foreground shadow-sm hover:ring-1 hover:ring-gray-300"
+ className="h-9 w-9 cursor-pointer rounded-md shadow-sm ring-1 ring-muted-foreground hover:ring-1 hover:ring-gray-300"
style={{ backgroundColor: brandColor }}
/>
</PopoverTrigger>
@@ -435,7 +439,7 @@ export default function DataroomBrandPage() {
</PopoverContent>
</Popover>
<HexColorInput
- className="flex h-9 w-full rounded-md border-0 bg-background px-3 py-2 text-sm ring-1 ring-muted-foreground shadow-sm placeholder:text-muted-foreground focus:ring-1 focus:ring-gray-300 focus:border-0"
+ className="flex h-9 w-full rounded-md border-0 bg-background px-3 py-2 text-sm shadow-sm ring-1 ring-muted-foreground placeholder:text-muted-foreground focus:border-0 focus:ring-1 focus:ring-gray-300"
color={brandColor}
onChange={setBrandColor}
prefixed
diff --git a/pages/datarooms/[id]/users/index.tsx b/pages/datarooms/[id]/users/index.tsx
index 2ccf7a28..de6a96e9 100644
--- a/pages/datarooms/[id]/users/index.tsx
+++ b/pages/datarooms/[id]/users/index.tsx
@@ -1,3 +1,5 @@
+import { useState } from "react";
+
import { AddViewerModal } from "@/components/datarooms/add-viewer-modal";
import { DataroomHeader } from "@/components/datarooms/dataroom-header";
import StatsCard from "@/components/datarooms/stats-card";
@@ -8,8 +10,8 @@ import { NavMenu } from "@/components/navigation-menu";
import { Button } from "@/components/ui/button";
import DataroomViewersTable from "@/components/visitors/dataroom-viewers";
import DataroomVisitorsTable from "@/components/visitors/dataroom-visitors-table";
+
import { useDataroom, useDataroomLinks } from "@/lib/swr/use-dataroom";
-import { useState } from "react";
export default function DataroomPage() {
const { dataroom } = useDataroom();
@@ -23,7 +25,7 @@ export default function DataroomPage() {
return (
<AppLayout>
- <div className="relative overflow-hidden mx-2 sm:mx-3 md:mx-5 lg:mx-7 xl:mx-10 mt-4 md:mt-5 lg:mt-8 mb-10 space-y-8 px-1">
+ <div className="relative mx-2 mb-10 mt-4 space-y-8 overflow-hidden px-1 sm:mx-3 md:mx-5 md:mt-5 lg:mx-7 lg:mt-8 xl:mx-10">
<header>
<DataroomHeader
title={dataroom.name}
diff --git a/pages/datarooms/index.tsx b/pages/datarooms/index.tsx
index 65559115..5170aea3 100644
--- a/pages/datarooms/index.tsx
+++ b/pages/datarooms/index.tsx
@@ -1,3 +1,7 @@
+import Link from "next/link";
+
+import { PlusIcon } from "lucide-react";
+
import { UpgradePlanModal } from "@/components/billing/upgrade-plan-modal";
import { AddDataroomModal } from "@/components/datarooms/add-dataroom-modal";
import { DataroomTrialModal } from "@/components/datarooms/dataroom-trial-modal";
@@ -12,12 +16,11 @@ import {
CardTitle,
} from "@/components/ui/card";
import { Separator } from "@/components/ui/separator";
+
import { usePlan } from "@/lib/swr/use-billing";
import useDatarooms from "@/lib/swr/use-datarooms";
import useLimits from "@/lib/swr/use-limits";
import { daysLeft } from "@/lib/utils";
-import { PlusIcon } from "lucide-react";
-import Link from "next/link";
export default function DataroomsPage() {
const { datarooms } = useDatarooms();
@@ -35,13 +38,13 @@ export default function DataroomsPage() {
return (
<AppLayout>
- <main className="p-4 sm:py-4 sm:px-4 sm:m-4">
- <section className="flex items-center justify-between mb-4 md:mb-8 lg:mb-12">
+ <main className="p-4 sm:m-4 sm:px-4 sm:py-4">
+ <section className="mb-4 flex items-center justify-between md:mb-8 lg:mb-12">
<div className="space-y-1">
- <h2 className="text-xl sm:text-2xl text-foreground font-semibold tracking-tight">
+ <h2 className="text-xl font-semibold tracking-tight text-foreground sm:text-2xl">
Datarooms
</h2>
- <p className="text-xs sm:text-sm text-muted-foreground">
+ <p className="text-xs text-muted-foreground sm:text-sm">
Manage your datarooms
</p>
</div>
@@ -49,7 +52,7 @@ export default function DataroomsPage() {
{isBusiness && !canCreateUnlimitedDatarooms ? (
<UpgradePlanModal clickedPlan="Data Rooms" trigger="datarooms">
<Button
- className="flex-1 text-left group flex gap-x-3 items-center justify-start px-3"
+ className="group flex flex-1 items-center justify-start gap-x-3 px-3 text-left"
title="Add New Document"
>
<span>Upgrade to Create Dataroom</span>
@@ -65,7 +68,7 @@ export default function DataroomsPage() {
</div>
<UpgradePlanModal clickedPlan="Business" trigger="datarooms">
<Button
- className="flex-1 text-left group flex gap-x-3 items-center justify-start px-3"
+ className="group flex flex-1 items-center justify-start gap-x-3 px-3 text-left"
title="Add New Document"
>
<span>Upgrade to Create Dataroom</span>
@@ -75,7 +78,7 @@ export default function DataroomsPage() {
) : isBusiness || isDatarooms ? (
<AddDataroomModal>
<Button
- className="flex-1 text-left group flex gap-x-3 items-center justify-start px-3"
+ className="group flex flex-1 items-center justify-start gap-x-3 px-3 text-left"
title="Add New Document"
>
<PlusIcon className="h-5 w-5 shrink-0" aria-hidden="true" />
@@ -85,7 +88,7 @@ export default function DataroomsPage() {
) : (
<DataroomTrialModal>
<Button
- className="flex-1 text-left group flex gap-x-3 items-center justify-start px-3"
+ className="group flex flex-1 items-center justify-start gap-x-3 px-3 text-left"
title="Add New Document"
>
<span>Start Data Room Trial</span>
@@ -102,7 +105,7 @@ export default function DataroomsPage() {
{datarooms &&
datarooms.map((dataroom) => (
<Link key={dataroom.id} href={`/datarooms/${dataroom.id}`}>
- <Card className="hover:border-primary/50 group relative overflow-hidden duration-500 ">
+ <Card className="group relative overflow-hidden duration-500 hover:border-primary/50 ">
<CardHeader>
<div className="flex items-center justify-between">
<CardTitle className="truncate">
diff --git a/pages/docsend-alternatives.tsx b/pages/docsend-alternatives.tsx
index 4981549d..81d5ba40 100644
--- a/pages/docsend-alternatives.tsx
+++ b/pages/docsend-alternatives.tsx
@@ -1,18 +1,20 @@
import Head from "next/head";
+
import { useState } from "react";
+
+import LoadingDots from "@/components/ui/loading-dots";
+import Grid from "@/components/web/alternatives/alternativesgrid";
+import Article from "@/components/web/alternatives/docsendtext";
import Feature from "@/components/web/alternatives/feature";
import FeaturesTable from "@/components/web/alternatives/featurestable";
+import { PlanSelect } from "@/components/web/alternatives/plan";
import PricingTable from "@/components/web/alternatives/pricingtable";
+import { UsecaseSelect } from "@/components/web/alternatives/usecase";
import UseCaseTable from "@/components/web/alternatives/usecasetable";
-import Article from "@/components/web/alternatives/docsendtext";
-import Grid from "@/components/web/alternatives/alternativesgrid";
-import Testimonials from "@/components/web/testimonials";
import CTA from "@/components/web/cta";
import Footer from "@/components/web/footer";
import Navbar from "@/components/web/navbar";
-import { PlanSelect } from "@/components/web/alternatives/plan";
-import { UsecaseSelect } from "@/components/web/alternatives/usecase";
-import LoadingDots from "@/components/ui/loading-dots";
+import Testimonials from "@/components/web/testimonials";
const features = [
"send unlimited documents",
@@ -153,11 +155,11 @@ Please note that the prices and availability of features may vary, and it is rec
</Head>
<div className="flex flex-1 flex-col bg-white text-black">
<Navbar />
- <main className="flex flex-col items-center w-full">
- <section className="pt-24 lg:pt-24 bg-white w-full">
- <div className="px-4 lg:px-2 w-full">
- <div className="max-w-7xl mx-auto px-4 md:px-8 w-full">
- <div className="w-full flex flex-col items-center">
+ <main className="flex w-full flex-col items-center">
+ <section className="w-full bg-white pt-24 lg:pt-24">
+ <div className="w-full px-4 lg:px-2">
+ <div className="mx-auto w-full max-w-7xl px-4 md:px-8">
+ <div className="flex w-full flex-col items-center">
<div className="pb-1">
<img
src="https://media.licdn.com/dms/image/C560BAQF0P4VJimYMZw/company-logo_200_200/0/1630615035618?e=1720656000&v=beta&t=gWnITXssNMEKBqbdPrGev6pbQf9iLywYEr404OFtKV0"
@@ -167,8 +169,8 @@ Please note that the prices and availability of features may vary, and it is rec
height={50}
/>
</div>
- <div className="prose prose-h2:mb-2 first:prose-h2:mt-0 prose-h2:mt-10 prose-headings:font-medium sm:max-w-screen-md sm:pr-2 md:pr-0 w-full text-center">
- <h1 className="text-5xl font-bold text-black lg:text-7xl my-8">
+ <div className="prose w-full text-center prose-headings:font-medium prose-h2:mb-2 prose-h2:mt-10 first:prose-h2:mt-0 sm:max-w-screen-md sm:pr-2 md:pr-0">
+ <h1 className="my-8 text-5xl font-bold text-black lg:text-7xl">
Top 10 Docsend alternatives in 2024
</h1>
@@ -187,13 +189,13 @@ Please note that the prices and availability of features may vary, and it is rec
<PricingTable />
<UseCaseTable />
<Grid />
- <div className="max-w-5xl mx-auto px-8 lg:px-28">
- <div className="max-w-5xl mx-auto">
- <div className="w-full my-1 mx-auto "></div>
- <h2 className="text-4xl font-bold text-black my-8 text-center">
+ <div className="mx-auto max-w-5xl px-8 lg:px-28">
+ <div className="mx-auto max-w-5xl">
+ <div className="mx-auto my-1 w-full "></div>
+ <h2 className="my-8 text-center text-4xl font-bold text-black">
Find Docsend alterntive based on your requirements
</h2>
- <p className="text-1xl mt-3 mb-5 text-center text-black font-semibold ">
+ <p className="text-1xl mb-5 mt-3 text-center font-semibold text-black ">
Step 1. Select features you prioritize the most <br />
</p>
<Feature
@@ -201,26 +203,26 @@ Please note that the prices and availability of features may vary, and it is rec
setSelectedFeatures={setSelectedFeatures}
/>
- <div className="w-full my-1 mx-auto">
+ <div className="mx-auto my-1 w-full">
<div className="flex space-x-4">
<div className="w-full">
{shouldRenderSteps() && (
<>
- <p className="text-1xl mt-10 mb-5 text-center text-black font-semibold ">
+ <p className="text-1xl mb-5 mt-10 text-center font-semibold text-black ">
Step 2. Select your plan
<br />
</p>
<div className="flex space-x-4">
{/* PlanSelect's width is decreased to half on larger screens using w-1/2 */}
- <div className="w-full lg:w-1/2 mx-auto">
+ <div className="mx-auto w-full lg:w-1/2">
<PlanSelect plan={plan} setPlan={setPlan} />
</div>
</div>
- <p className="text-1xl mt-10 mb-5 text-center text-black font-semibold ">
+ <p className="text-1xl mb-5 mt-10 text-center font-semibold text-black ">
Step 3. Select your use case
<br />
</p>
- <div className="w-full lg:w-1/2 mx-auto">
+ <div className="mx-auto w-full lg:w-1/2">
<UsecaseSelect
usecase={usecase}
setUsecase={setUsecase}
@@ -232,7 +234,7 @@ Please note that the prices and availability of features may vary, and it is rec
</div>
</div>
- <div className="w-full my-1 mx-auto">
+ <div className="mx-auto my-1 w-full">
<div className="flex space-x-6"></div>
</div>
@@ -240,7 +242,7 @@ Please note that the prices and availability of features may vary, and it is rec
<button
disabled={loading}
onClick={(e) => optimizePost(e)}
- className="bg-black font-medium rounded-md w-full text-white px-4 py-2 hover:bg-gray-900 disabled:bg-black"
+ className="w-full rounded-md bg-black px-4 py-2 font-medium text-white hover:bg-gray-900 disabled:bg-black"
>
{loading && <LoadingDots color="white" />}
{!loading && ` Find alternatives `}
@@ -250,14 +252,14 @@ Please note that the prices and availability of features may vary, and it is rec
<div className="flex md:flex-col lg:flex-col">
{optimizedPost && (
<div className="my-1">
- <div className="flex justify-between items-center pb-2 py-2 border-gray-300">
- <h2 className="text-xl font-bold text-white mx-auto">
+ <div className="flex items-center justify-between border-gray-300 py-2 pb-2">
+ <h2 className="mx-auto text-xl font-bold text-white">
Docsend alternatives just for you
</h2>
</div>
<div
- className="max-w-2x bg-gray mx-auto text-black rounded-xl p-4 hover:bg-gray-100 transition cursor-copy border"
+ className="max-w-2x bg-gray mx-auto cursor-copy rounded-xl border p-4 text-black transition hover:bg-gray-100"
onClick={() => {
navigator.clipboard.write([
new ClipboardItem({
@@ -285,7 +287,7 @@ Please note that the prices and availability of features may vary, and it is rec
href="/login"
target="_blank"
rel="noopener noreferrer"
- className="bg-gray-200 text-xs rounded-md w-full text-white px-1 py-1 hover:bg-black disabled:bg-purple-500 inline-block text-center"
+ className="inline-block w-full rounded-md bg-gray-200 px-1 py-1 text-center text-xs text-white hover:bg-black disabled:bg-purple-500"
>
Send document
</a>
diff --git a/pages/documents/[id]/chat.tsx b/pages/documents/[id]/chat.tsx
index 6674bad8..ea5096a4 100644
--- a/pages/documents/[id]/chat.tsx
+++ b/pages/documents/[id]/chat.tsx
@@ -1,16 +1,20 @@
+import Link from "next/link";
+
+import { useEffect } from "react";
+
+import { authOptions } from "@/pages/api/auth/[...nextauth]";
import { type Message } from "ai/react";
-import prisma from "@/lib/prisma";
import { getServerSession } from "next-auth";
-import { authOptions } from "@/pages/api/auth/[...nextauth]";
-import { CustomUser } from "@/lib/types";
+import { usePlausible } from "next-plausible";
+
import { Chat } from "@/components/chat/chat";
import Sparkle from "@/components/shared/icons/sparkle";
-import { usePlan } from "@/lib/swr/use-billing";
import { Button } from "@/components/ui/button";
-import Link from "next/link";
-import { usePlausible } from "next-plausible";
-import { useEffect } from "react";
+
import { getFile } from "@/lib/files/get-file";
+import prisma from "@/lib/prisma";
+import { usePlan } from "@/lib/swr/use-billing";
+import { CustomUser } from "@/lib/types";
export const getServerSideProps = async (context: any) => {
const { id } = context.params;
@@ -142,7 +146,7 @@ export default function ChatPage({
function Nav({ documentId }: { documentId: string }) {
return (
- <nav className="bg-black fixed top-0 inset-x-0 z-10">
+ <nav className="fixed inset-x-0 top-0 z-10 bg-black">
<div className="mx-auto px-2 sm:px-6 lg:px-8">
<div className="relative flex h-16 items-center justify-between">
<div className="flex flex-1 items-center justify-center sm:items-stretch sm:justify-start">
diff --git a/pages/documents/[id]/index.tsx b/pages/documents/[id]/index.tsx
index 2fd2e5fc..64beeb21 100644
--- a/pages/documents/[id]/index.tsx
+++ b/pages/documents/[id]/index.tsx
@@ -1,16 +1,20 @@
-import { useDocument, useDocumentLinks } from "@/lib/swr/use-document";
import ErrorPage from "next/error";
-import AppLayout from "@/components/layouts/app";
-import LinkSheet from "@/components/links/link-sheet";
-import LinksTable from "@/components/links/links-table";
-import VisitorsTable from "@/components/visitors/visitors-table";
+
import { useState } from "react";
-import LoadingSpinner from "@/components/ui/loading-spinner";
+
import { useTeam } from "@/context/team-context";
-import { StatsComponent } from "@/components/documents/stats";
+
import DocumentHeader from "@/components/documents/document-header";
-import { Button } from "@/components/ui/button";
+import { StatsComponent } from "@/components/documents/stats";
+import AppLayout from "@/components/layouts/app";
+import LinkSheet from "@/components/links/link-sheet";
+import LinksTable from "@/components/links/links-table";
import { NavMenu } from "@/components/navigation-menu";
+import { Button } from "@/components/ui/button";
+import LoadingSpinner from "@/components/ui/loading-spinner";
+import VisitorsTable from "@/components/visitors/visitors-table";
+
+import { useDocument, useDocumentLinks } from "@/lib/swr/use-document";
export default function DocumentPage() {
const { document: prismaDocument, primaryVersion, error } = useDocument();
@@ -25,7 +29,7 @@ export default function DocumentPage() {
return (
<AppLayout>
- <main className="relative overflow-hidden mx-2 sm:mx-3 md:mx-5 lg:mx-7 xl:mx-10 mt-4 md:mt-5 lg:mt-8 mb-10 space-y-8 px-1">
+ <main className="relative mx-2 mb-10 mt-4 space-y-8 overflow-hidden px-1 sm:mx-3 md:mx-5 md:mt-5 lg:mx-7 lg:mt-8 xl:mx-10">
{prismaDocument && primaryVersion ? (
<>
{/* Action Header */}
@@ -36,7 +40,7 @@ export default function DocumentPage() {
actions={[
<Button
key={"create-link"}
- className="flex h-8 lg:h-9 text-xs lg:text-sm whitespace-nowrap"
+ className="flex h-8 whitespace-nowrap text-xs lg:h-9 lg:text-sm"
onClick={() => setIsLinkSheetOpen(true)}
>
Create Link
@@ -83,7 +87,7 @@ export default function DocumentPage() {
/>
</>
) : (
- <div className="h-screen flex items-center justify-center">
+ <div className="flex h-screen items-center justify-center">
<LoadingSpinner className="mr-1 h-20 w-20" />
</div>
)}
diff --git a/pages/documents/[id]/settings.tsx b/pages/documents/[id]/settings.tsx
index b3362c35..e7ee2501 100644
--- a/pages/documents/[id]/settings.tsx
+++ b/pages/documents/[id]/settings.tsx
@@ -1,3 +1,11 @@
+import Link from "next/link";
+
+import { useEffect, useState } from "react";
+
+import { useTeam } from "@/context/team-context";
+import { toast } from "sonner";
+import useSWR, { mutate } from "swr";
+
import { UpgradePlanModal } from "@/components/billing/upgrade-plan-modal";
import DocumentHeader from "@/components/documents/document-header";
import AppLayout from "@/components/layouts/app";
@@ -21,14 +29,10 @@ import {
SelectTrigger,
SelectValue,
} from "@/components/ui/select";
-import { useTeam } from "@/context/team-context";
+
import { usePlan } from "@/lib/swr/use-billing";
import { useDocument } from "@/lib/swr/use-document";
import { cn, fetcher } from "@/lib/utils";
-import Link from "next/link";
-import { useEffect, useState } from "react";
-import { toast } from "sonner";
-import useSWR, { mutate } from "swr";
type Feedback = {
id: string;
@@ -69,7 +73,7 @@ export default function Settings() {
return (
<AppLayout>
- <main className="relative overflow-hidden mx-2 sm:mx-3 md:mx-5 lg:mx-7 xl:mx-10 mt-4 md:mt-5 lg:mt-8 mb-10 space-y-8 px-1">
+ <main className="relative mx-2 mb-10 mt-4 space-y-8 overflow-hidden px-1 sm:mx-3 md:mx-5 md:mt-5 lg:mx-7 lg:mt-8 xl:mx-10">
{document && primaryVersion ? (
<>
{/* Action Header */}
@@ -304,7 +308,7 @@ export default function Settings() {
</div>
</>
) : (
- <div className="h-screen flex items-center justify-center">
+ <div className="flex h-screen items-center justify-center">
<LoadingSpinner className="mr-1 h-20 w-20" />
</div>
)}
diff --git a/pages/documents/index.tsx b/pages/documents/index.tsx
index a5fb2270..a4619e46 100644
--- a/pages/documents/index.tsx
+++ b/pages/documents/index.tsx
@@ -1,16 +1,18 @@
-import useDocuments, { useRootFolders } from "@/lib/swr/use-documents";
import { useTeam } from "@/context/team-context";
-import DocumentCard from "@/components/documents/document-card";
-import { Skeleton } from "@/components/ui/skeleton";
import { FileIcon, FolderIcon, FolderPlusIcon, PlusIcon } from "lucide-react";
+
import { AddDocumentModal } from "@/components/documents/add-document-modal";
-import { Separator } from "@/components/ui/separator";
-import AppLayout from "@/components/layouts/app";
-import { Button } from "@/components/ui/button";
-import Folder from "@/components/shared/icons/folder";
-import FolderCard from "@/components/documents/folder-card";
+import DocumentCard from "@/components/documents/document-card";
import { EmptyDocuments } from "@/components/documents/empty-document";
+import FolderCard from "@/components/documents/folder-card";
import { AddFolderModal } from "@/components/folders/add-folder-modal";
+import AppLayout from "@/components/layouts/app";
+import Folder from "@/components/shared/icons/folder";
+import { Button } from "@/components/ui/button";
+import { Separator } from "@/components/ui/separator";
+import { Skeleton } from "@/components/ui/skeleton";
+
+import useDocuments, { useRootFolders } from "@/lib/swr/use-documents";
export default function Documents() {
const { documents } = useDocuments();
@@ -19,13 +21,13 @@ export default function Documents() {
return (
<AppLayout>
- <main className="p-4 sm:py-4 sm:px-4 sm:m-4">
- <section className="flex items-center justify-between mb-4 md:mb-8 lg:mb-12">
+ <main className="p-4 sm:m-4 sm:px-4 sm:py-4">
+ <section className="mb-4 flex items-center justify-between md:mb-8 lg:mb-12">
<div className="space-y-1">
- <h2 className="text-xl sm:text-2xl text-foreground font-semibold tracking-tight">
+ <h2 className="text-xl font-semibold tracking-tight text-foreground sm:text-2xl">
All Documents
</h2>
- <p className="text-xs sm:text-sm text-muted-foreground">
+ <p className="text-xs text-muted-foreground sm:text-sm">
Manage all your documents in one place.
</p>
</div>
@@ -44,7 +46,7 @@ export default function Documents() {
<div className="flex items-center gap-x-1">
<AddDocumentModal>
<Button
- className="flex-1 text-left group flex gap-x-3 items-center justify-start px-3"
+ className="group flex flex-1 items-center justify-start gap-x-3 px-3 text-left"
title="Add New Document"
>
<PlusIcon className="h-5 w-5 shrink-0" aria-hidden="true" />
@@ -55,10 +57,10 @@ export default function Documents() {
<Button
size="icon"
variant="outline"
- className="bg-gray-50 dark:bg-black border-gray-500 hover:bg-gray-200 hover:dark:bg-muted"
+ className="border-gray-500 bg-gray-50 hover:bg-gray-200 dark:bg-black hover:dark:bg-muted"
>
<FolderPlusIcon
- className="w-5 h-5 shrink-0"
+ className="h-5 w-5 shrink-0"
aria-hidden="true"
/>
</Button>
@@ -67,16 +69,16 @@ export default function Documents() {
{/* </div> */}
</section>
- <section className="flex items-center gap-x-2 mb-2">
+ <section className="mb-2 flex items-center gap-x-2">
{folders && folders.length > 0 ? (
- <p className="text-sm text-gray-400 flex items-center gap-x-1">
- <FolderIcon className="w-4 h-4" />
+ <p className="flex items-center gap-x-1 text-sm text-gray-400">
+ <FolderIcon className="h-4 w-4" />
<span>{folders.length} folders</span>
</p>
) : null}
{documents && documents.length > 0 ? (
- <p className="text-sm text-gray-400 flex items-center gap-x-1">
- <FileIcon className="w-4 h-4" />
+ <p className="flex items-center gap-x-1 text-sm text-gray-400">
+ <FileIcon className="h-4 w-4" />
<span>{documents.length} documents</span>
</p>
) : null}
@@ -100,7 +102,7 @@ export default function Documents() {
: Array.from({ length: 3 }).map((_, i) => (
<li
key={i}
- className="relative w-full py-5 px-4 border rounded-lg flex items-center space-x-3 sm:px-6 lg:px-6"
+ className="relative flex w-full items-center space-x-3 rounded-lg border px-4 py-5 sm:px-6 lg:px-6"
>
<Skeleton key={i} className="h-9 w-9" />
<div>
@@ -109,7 +111,7 @@ export default function Documents() {
</div>
<Skeleton
key={i + 1}
- className="h-5 w-20 absolute top-[50%] transform -translate-y-[50%] right-5"
+ className="absolute right-5 top-[50%] h-5 w-20 -translate-y-[50%] transform"
/>
</li>
))}
@@ -130,7 +132,7 @@ export default function Documents() {
: Array.from({ length: 3 }).map((_, i) => (
<li
key={i}
- className="relative w-full py-5 px-4 border rounded-lg flex items-center space-x-3 sm:px-6 lg:px-6"
+ className="relative flex w-full items-center space-x-3 rounded-lg border px-4 py-5 sm:px-6 lg:px-6"
>
<Skeleton key={i} className="h-9 w-9" />
<div>
@@ -139,7 +141,7 @@ export default function Documents() {
</div>
<Skeleton
key={i + 1}
- className="h-5 w-20 absolute top-[50%] transform -translate-y-[50%] right-5"
+ className="absolute right-5 top-[50%] h-5 w-20 -translate-y-[50%] transform"
/>
</li>
))}
diff --git a/pages/documents/tree/[...name].tsx b/pages/documents/tree/[...name].tsx
index e747b0c1..3a0a1ba6 100644
--- a/pages/documents/tree/[...name].tsx
+++ b/pages/documents/tree/[...name].tsx
@@ -1,17 +1,20 @@
+import { useRouter } from "next/router";
+
+import { useTeam } from "@/context/team-context";
+import { FileIcon, FolderIcon, FolderPlusIcon, PlusIcon } from "lucide-react";
+
import { AddDocumentModal } from "@/components/documents/add-document-modal";
-import { AddFolderModal } from "@/components/folders/add-folder-modal";
import { BreadcrumbComponent } from "@/components/documents/breadcrumb";
import DocumentCard from "@/components/documents/document-card";
import { EmptyDocuments } from "@/components/documents/empty-document";
import FolderCard from "@/components/documents/folder-card";
+import { AddFolderModal } from "@/components/folders/add-folder-modal";
import AppLayout from "@/components/layouts/app";
import { Button } from "@/components/ui/button";
import { Separator } from "@/components/ui/separator";
import { Skeleton } from "@/components/ui/skeleton";
-import { useTeam } from "@/context/team-context";
-import { useFolderDocuments, useFolder } from "@/lib/swr/use-documents";
-import { FileIcon, FolderIcon, FolderPlusIcon, PlusIcon } from "lucide-react";
-import { useRouter } from "next/router";
+
+import { useFolder, useFolderDocuments } from "@/lib/swr/use-documents";
export default function DocumentTreePage() {
const router = useRouter();
@@ -23,15 +26,15 @@ export default function DocumentTreePage() {
return (
<AppLayout>
- <main className="p-4 sm:py-4 sm:px-4 sm:m-4">
+ <main className="p-4 sm:m-4 sm:px-4 sm:py-4">
<BreadcrumbComponent />
- <section className="flex items-center justify-between mb-4 md:mb-8 lg:mb-12 mt-4">
+ <section className="mb-4 mt-4 flex items-center justify-between md:mb-8 lg:mb-12">
<div className="space-y-1">
- <h2 className="text-xl sm:text-2xl text-foreground font-semibold tracking-tight">
+ <h2 className="text-xl font-semibold tracking-tight text-foreground sm:text-2xl">
All Documents
</h2>
- <p className="text-xs sm:text-sm text-muted-foreground">
+ <p className="text-xs text-muted-foreground sm:text-sm">
Manage all your documents in one place.
</p>
</div>
@@ -51,7 +54,7 @@ export default function DocumentTreePage() {
<div className="flex items-center gap-x-1">
<AddDocumentModal>
<Button
- className="flex-1 text-left group flex gap-x-3 items-center justify-start px-3"
+ className="group flex flex-1 items-center justify-start gap-x-3 px-3 text-left"
title="Add New Document"
>
<PlusIcon className="h-5 w-5 shrink-0" aria-hidden="true" />
@@ -62,10 +65,10 @@ export default function DocumentTreePage() {
<Button
size="icon"
variant="outline"
- className="bg-gray-50 dark:bg-black border-gray-500 hover:bg-gray-200 hover:dark:bg-muted"
+ className="border-gray-500 bg-gray-50 hover:bg-gray-200 dark:bg-black hover:dark:bg-muted"
>
<FolderPlusIcon
- className="w-5 h-5 shrink-0"
+ className="h-5 w-5 shrink-0"
aria-hidden="true"
/>
</Button>
@@ -73,16 +76,16 @@ export default function DocumentTreePage() {
</div>
</section>
- <section className="flex items-center gap-x-2 mb-2">
+ <section className="mb-2 flex items-center gap-x-2">
{folders && folders.length > 0 ? (
- <p className="text-sm text-gray-400 flex items-center gap-x-1">
- <FolderIcon className="w-4 h-4" />
+ <p className="flex items-center gap-x-1 text-sm text-gray-400">
+ <FolderIcon className="h-4 w-4" />
<span>{folders.length} folders</span>
</p>
) : null}
{documents && documents.length > 0 ? (
- <p className="text-sm text-gray-400 flex items-center gap-x-1">
- <FileIcon className="w-4 h-4" />
+ <p className="flex items-center gap-x-1 text-sm text-gray-400">
+ <FileIcon className="h-4 w-4" />
<span>{documents.length} documents</span>
</p>
) : null}
@@ -106,7 +109,7 @@ export default function DocumentTreePage() {
: Array.from({ length: 3 }).map((_, i) => (
<li
key={i}
- className="relative w-full py-5 px-4 border rounded-lg flex items-center space-x-3 sm:px-6 lg:px-6"
+ className="relative flex w-full items-center space-x-3 rounded-lg border px-4 py-5 sm:px-6 lg:px-6"
>
<Skeleton key={i} className="h-9 w-9" />
<div>
@@ -115,7 +118,7 @@ export default function DocumentTreePage() {
</div>
<Skeleton
key={i + 1}
- className="h-5 w-20 absolute top-[50%] transform -translate-y-[50%] right-5"
+ className="absolute right-5 top-[50%] h-5 w-20 -translate-y-[50%] transform"
/>
</li>
))}
@@ -136,7 +139,7 @@ export default function DocumentTreePage() {
: Array.from({ length: 3 }).map((_, i) => (
<li
key={i}
- className="relative w-full py-5 px-4 border rounded-lg flex items-center space-x-3 sm:px-6 lg:px-6"
+ className="relative flex w-full items-center space-x-3 rounded-lg border px-4 py-5 sm:px-6 lg:px-6"
>
<Skeleton key={i} className="h-9 w-9" />
<div>
@@ -145,14 +148,14 @@ export default function DocumentTreePage() {
</div>
<Skeleton
key={i + 1}
- className="h-5 w-20 absolute top-[50%] transform -translate-y-[50%] right-5"
+ className="absolute right-5 top-[50%] h-5 w-20 -translate-y-[50%] transform"
/>
</li>
))}
</ul>
{documents && documents.length === 0 && (
- <div className="flex items-center justify-center h-96">
+ <div className="flex h-96 items-center justify-center">
<EmptyDocuments />
</div>
)}
diff --git a/pages/launch-week.tsx b/pages/launch-week.tsx
index fab2e029..462f093c 100644
--- a/pages/launch-week.tsx
+++ b/pages/launch-week.tsx
@@ -1,10 +1,11 @@
-import Footer from "@/components/web/footer";
-import Navbar from "@/components/web/navbar";
-import Hero from "@/components/web/launch/hero";
-import Grid from "@/components/web/launch/daysgrid";
-import CTA from "@/components/web/launch/cta";
import Head from "next/head";
+
import ChatPage from "@/components/web/assistant/public-chat";
+import Footer from "@/components/web/footer";
+import CTA from "@/components/web/launch/cta";
+import Grid from "@/components/web/launch/daysgrid";
+import Hero from "@/components/web/launch/hero";
+import Navbar from "@/components/web/navbar";
export default function LaunchWeek() {
return (
diff --git a/pages/pricing.tsx b/pages/pricing.tsx
index 4897a611..a6d4e7f4 100644
--- a/pages/pricing.tsx
+++ b/pages/pricing.tsx
@@ -1,14 +1,18 @@
-import { Button } from "@/components/ui/button";
-import { cn } from "@/lib/utils";
-import { CheckIcon } from "lucide-react";
-import Navbar from "@/components/web/navbar";
-import Footer from "@/components/web/footer";
import Link from "next/link";
-import GitHubIcon from "@/components/shared/icons/github";
-import { usePlausible } from "next-plausible";
-import { PricingComparison } from "@/components/web/pricing-component";
+
import { useEffect, useState } from "react";
+
+import { CheckIcon } from "lucide-react";
+import { usePlausible } from "next-plausible";
+
+import GitHubIcon from "@/components/shared/icons/github";
+import { Button } from "@/components/ui/button";
import { Switch } from "@/components/ui/switch";
+import Footer from "@/components/web/footer";
+import Navbar from "@/components/web/navbar";
+import { PricingComparison } from "@/components/web/pricing-component";
+
+import { cn } from "@/lib/utils";
const frequencies: {
value: "monthly" | "annually";
@@ -161,9 +165,9 @@ export default function PricingPage() {
<>
<div className="flex flex-1 flex-col bg-white text-black">
<Navbar />
- <div className="max-w-7xl w-full mx-auto px-4 md:px-8">
- <div className="pt-24 pb-2">
- <h1 className="text-4xl md:text-6xl text-balance">
+ <div className="mx-auto w-full max-w-7xl px-4 md:px-8">
+ <div className="pb-2 pt-24">
+ <h1 className="text-balance text-4xl md:text-6xl">
Find the plan that
<br />
works for you
@@ -195,17 +199,17 @@ export default function PricingPage() {
</div>
<div className="bg-white py-16">
<div className="mx-auto max-w-7xl px-4 md:px-8">
- <div className="isolate grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 border border-black rounded-xl overflow-hidden">
+ <div className="isolate grid grid-cols-1 overflow-hidden rounded-xl border border-black md:grid-cols-2 xl:grid-cols-4">
{tiers.map((tier) => (
<div
key={tier.id}
- className="border-black border-r-0 md:odd:border-r xl:even:border-r xl:last:!border-r-0 flex flex-col justify-between"
+ className="flex flex-col justify-between border-r-0 border-black md:odd:border-r xl:last:!border-r-0 xl:even:border-r"
>
<div>
- <div className="border-b border-black p-6 bg-gray-100">
+ <div className="border-b border-black bg-gray-100 p-6">
<h3
id={tier.id}
- className="text-balance text-gray-900 text-xl leading-8"
+ className="text-balance text-xl leading-8 text-gray-900"
>
{tier.name}
</h3>
@@ -229,7 +233,7 @@ export default function PricingPage() {
setToggleProYear(!toggleProYear)
}
/>
- <div className="flex items-center gap-x-1 text-sm mb-1">
+ <div className="mb-1 flex items-center gap-x-1 text-sm">
<span
className={cn(
toggleProYear
@@ -252,7 +256,7 @@ export default function PricingPage() {
</div>
<div
className={cn(
- "relative text-xs w-fit uppercase border border-gray-900 text-gray-900 rounded-3xl px-1.5 py-0.5",
+ "relative w-fit rounded-3xl border border-gray-900 px-1.5 py-0.5 text-xs uppercase text-gray-900",
!toggleProYear &&
"border-gray-400 text-gray-400 opacity-40",
)}
@@ -277,7 +281,7 @@ export default function PricingPage() {
setToggleBusinessYear(!toggleBusinessYear)
}
/>
- <div className="flex items-center gap-x-1 text-sm mb-1">
+ <div className="mb-1 flex items-center gap-x-1 text-sm">
<span
className={cn(
toggleBusinessYear
@@ -300,7 +304,7 @@ export default function PricingPage() {
</div>
<div
className={cn(
- "relative text-xs w-fit uppercase border border-[#fb7a00] text-[#fb7a00] rounded-3xl px-1.5 py-0.5",
+ "relative w-fit rounded-3xl border border-[#fb7a00] px-1.5 py-0.5 text-xs uppercase text-[#fb7a00]",
!toggleBusinessYear &&
"border-gray-400 text-gray-400 opacity-40",
)}
@@ -325,7 +329,7 @@ export default function PricingPage() {
setToggleDataroomsYear(!toggleDataroomsYear)
}
/>
- <div className="flex items-center gap-x-1 text-sm mb-1">
+ <div className="mb-1 flex items-center gap-x-1 text-sm">
<span
className={cn(
toggleDataroomsYear
@@ -348,7 +352,7 @@ export default function PricingPage() {
</div>
<div
className={cn(
- "relative text-xs w-fit uppercase border border-[#fb7a00] text-[#fb7a00] rounded-3xl px-1.5 py-0.5",
+ "relative w-fit rounded-3xl border border-[#fb7a00] px-1.5 py-0.5 text-xs uppercase text-[#fb7a00]",
!toggleDataroomsYear &&
"border-gray-400 text-gray-400 opacity-40",
)}
@@ -379,7 +383,7 @@ export default function PricingPage() {
: tier.price[frequency.value]}
</span>
</p>
- <p className="mt-6 text-sm leading-6 text-gray-600 text-balance">
+ <p className="mt-6 text-balance text-sm leading-6 text-gray-600">
{tier.description}
</p>
<ul
@@ -416,7 +420,7 @@ export default function PricingPage() {
{tier.buttonText}
</Button>
) : (
- <Button className="rounded-3xl text-base text-gray-200 bg-black hover:bg-gray-900">
+ <Button className="rounded-3xl bg-black text-base text-gray-200 hover:bg-gray-900">
{tier.buttonText}
</Button>
)}
@@ -428,13 +432,13 @@ export default function PricingPage() {
</div>
</div>
- <div className="w-full max-w-7xl px-4 md:px-8 mx-auto ">
- <div className="py-12 bg-[#fb7a00] rounded-xl mx-auto px-6 my-4">
- <div className="flex lg:flex-row flex-col item-center justify-between space-y-10 lg:space-y-0">
- <h2 className="text-3xl text-nowrap">
+ <div className="mx-auto w-full max-w-7xl px-4 md:px-8 ">
+ <div className="mx-auto my-4 rounded-xl bg-[#fb7a00] px-6 py-12">
+ <div className="item-center flex flex-col justify-between space-y-10 lg:flex-row lg:space-y-0">
+ <h2 className="text-nowrap text-3xl">
Looking for enterprise plan or self-hosted version?
</h2>
- <div className="space-x-2 flex items-center">
+ <div className="flex items-center space-x-2">
<Link
href="https://github.com/mfts/papermark"
target="_blank"
@@ -442,7 +446,7 @@ export default function PricingPage() {
>
<Button
variant="outline"
- className="text-base rounded-3xl bg-transparent border-black hover:bg-gray-200 hover:text-black"
+ className="rounded-3xl border-black bg-transparent text-base hover:bg-gray-200 hover:text-black"
>
<GitHubIcon className="mr-2 h-6 w-6" />
View Github
@@ -453,7 +457,7 @@ export default function PricingPage() {
target="_blank"
rel="noopener noreferrer"
>
- <Button className="text-base rounded-3xl text-gray-200 bg-black hover:bg-gray-900">
+ <Button className="rounded-3xl bg-black text-base text-gray-200 hover:bg-gray-900">
Book a demo
</Button>
</Link>
diff --git a/pages/settings/billing.tsx b/pages/settings/billing.tsx
index 0ed9761d..f9b380ea 100644
--- a/pages/settings/billing.tsx
+++ b/pages/settings/billing.tsx
@@ -1,18 +1,22 @@
+import Link from "next/link";
+import { useRouter } from "next/router";
+
+import { useEffect, useState } from "react";
+
+import { useTeam } from "@/context/team-context";
+import { CheckIcon } from "lucide-react";
+import { toast } from "sonner";
+
import { UpgradePlanModal } from "@/components/billing/upgrade-plan-modal";
import AppLayout from "@/components/layouts/app";
import Navbar from "@/components/settings/navbar";
import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
import { Switch } from "@/components/ui/switch";
-import { useTeam } from "@/context/team-context";
+
import { useAnalytics } from "@/lib/analytics";
import { usePlan } from "@/lib/swr/use-billing";
import { cn } from "@/lib/utils";
-import { CheckIcon } from "lucide-react";
-import Link from "next/link";
-import { useRouter } from "next/router";
-import { useEffect, useState } from "react";
-import { toast } from "sonner";
const frequencies: {
value: "monthly" | "annually";
@@ -206,10 +210,10 @@ export default function Billing() {
<AppLayout>
<Navbar current="Billing" />
- <div className="p-4 sm:p-4 sm:m-4">
- <div className="flex items-center justify-between mb-4 md:mb-8 lg:mb-12">
+ <div className="p-4 sm:m-4 sm:p-4">
+ <div className="mb-4 flex items-center justify-between md:mb-8 lg:mb-12">
<div className="space-y-1">
- <h3 className="text-2xl text-foreground font-semibold tracking-tight">
+ <h3 className="text-2xl font-semibold tracking-tight text-foreground">
Billing
</h3>
<p className="text-sm text-muted-foreground">
@@ -220,17 +224,17 @@ export default function Billing() {
<div className="bg-white dark:bg-gray-900">
<div className="mx-auto space-y-8">
- <div className="isolate grid grid-cols-1 md:grid-cols-4 border border-black dark:border-muted-foreground rounded-xl overflow-hidden">
+ <div className="isolate grid grid-cols-1 overflow-hidden rounded-xl border border-black dark:border-muted-foreground md:grid-cols-4">
{tiers.map((tier) => (
<div
key={tier.id}
- className="border-black dark:border-muted-foreground border-r-0 md:border-r md:last:!border-r-0 flex flex-col justify-between"
+ className="flex flex-col justify-between border-r-0 border-black dark:border-muted-foreground md:border-r md:last:!border-r-0"
>
<div>
- <div className="border-b border-black p-6 bg-gray-100 dark:bg-gray-800 dark:border-muted-foreground">
+ <div className="border-b border-black bg-gray-100 p-6 dark:border-muted-foreground dark:bg-gray-800">
<h3
id={tier.id}
- className="text-balance text-foreground text-xl leading-8 flex items-center gap-x-2"
+ className="flex items-center gap-x-2 text-balance text-xl leading-8 text-foreground"
>
<span>{tier.name}</span>
{tier.currentPlan ? (
@@ -257,7 +261,7 @@ export default function Billing() {
setToggleProYear(!toggleProYear)
}
/>
- <div className="flex items-center gap-x-1 text-sm mb-1">
+ <div className="mb-1 flex items-center gap-x-1 text-sm">
<span
className={cn(
toggleProYear
@@ -280,7 +284,7 @@ export default function Billing() {
</div>
<div
className={cn(
- "relative text-xs w-fit uppercase border border-gray-900 text-gray-900 rounded-3xl px-1.5 py-0.5",
+ "relative w-fit rounded-3xl border border-gray-900 px-1.5 py-0.5 text-xs uppercase text-gray-900",
!toggleProYear &&
"border-gray-400 text-gray-400 opacity-40",
)}
@@ -305,7 +309,7 @@ export default function Billing() {
setToggleBusinessYear(!toggleBusinessYear)
}
/>
- <div className="flex items-center gap-x-1 text-sm mb-1">
+ <div className="mb-1 flex items-center gap-x-1 text-sm">
<span
className={cn(
toggleBusinessYear
@@ -328,7 +332,7 @@ export default function Billing() {
</div>
<div
className={cn(
- "relative text-xs w-fit uppercase border border-[#fb7a00] text-[#fb7a00] rounded-3xl px-1.5 py-0.5",
+ "relative w-fit rounded-3xl border border-[#fb7a00] px-1.5 py-0.5 text-xs uppercase text-[#fb7a00]",
!toggleBusinessYear &&
"border-gray-400 text-gray-400 opacity-40",
)}
@@ -353,7 +357,7 @@ export default function Billing() {
setToggleDataroomsYear(!toggleDataroomsYear)
}
/>
- <div className="flex items-center gap-x-1 text-sm mb-1">
+ <div className="mb-1 flex items-center gap-x-1 text-sm">
<span
className={cn(
toggleDataroomsYear
@@ -376,7 +380,7 @@ export default function Billing() {
</div>
<div
className={cn(
- "relative text-xs w-fit uppercase border border-[#fb7a00] text-[#fb7a00] rounded-3xl px-1.5 py-0.5",
+ "relative w-fit rounded-3xl border border-[#fb7a00] px-1.5 py-0.5 text-xs uppercase text-[#fb7a00]",
!toggleDataroomsYear &&
"border-gray-400 text-gray-400 opacity-40",
)}
@@ -427,7 +431,7 @@ export default function Billing() {
: frequency.priceSuffix}
</span> */}
</p>
- <p className="mt-4 text-sm leading-6 text-gray-600 dark:text-muted-foreground text-balance">
+ <p className="mt-4 text-balance text-sm leading-6 text-gray-600 dark:text-muted-foreground">
{tier.description}
</p>
<ul
@@ -522,22 +526,22 @@ export default function Billing() {
</div>
))}
</div>
- <div className="isolate grid grid-cols-1 border border-black dark:border-muted-foreground rounded-xl overflow-hidden">
+ <div className="isolate grid grid-cols-1 overflow-hidden rounded-xl border border-black dark:border-muted-foreground">
<div
key="tier-enterprise"
- className="border-black dark:border-muted-foreground border-r-0 md:border-r md:last:!border-r-0 flex flex-col justify-between"
+ className="flex flex-col justify-between border-r-0 border-black dark:border-muted-foreground md:border-r md:last:!border-r-0"
>
<div>
- <div className="border-b border-black dark:border-muted-foreground p-6 bg-gray-100 dark:bg-gray-800">
+ <div className="border-b border-black bg-gray-100 p-6 dark:border-muted-foreground dark:bg-gray-800">
<h3
id="tier-enterprise"
- className="text-balance text-foreground text-xl leading-8 flex items-center gap-x-2"
+ className="flex items-center gap-x-2 text-balance text-xl leading-8 text-foreground"
>
<span>Enterprise</span>
</h3>
</div>
<div className="p-6">
- <p className="mt-4 text-sm leading-6 text-gray-600 dark:text-muted-foreground text-balance">
+ <p className="mt-4 text-balance text-sm leading-6 text-gray-600 dark:text-muted-foreground">
Self-hosted and advanced document infrastructure for your
company.
</p>
@@ -548,7 +552,7 @@ export default function Billing() {
</p>
<ul
role="list"
- className="mt-8 text-sm leading-6 text-gray-600 dark:text-muted-foreground grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-y-3"
+ className="mt-8 grid grid-cols-1 gap-y-3 text-sm leading-6 text-gray-600 dark:text-muted-foreground sm:grid-cols-2 md:grid-cols-3"
>
{enterpriseFeatures.map((feature) => (
<li key={feature} className="flex gap-x-3">
diff --git a/pages/settings/branding.tsx b/pages/settings/branding.tsx
index 4e1ba843..cbbfa412 100644
--- a/pages/settings/branding.tsx
+++ b/pages/settings/branding.tsx
@@ -1,25 +1,29 @@
+import { useRouter } from "next/router";
+
+import { useCallback, useEffect, useState } from "react";
+
+import { useTeam } from "@/context/team-context";
+import { PlusIcon } from "lucide-react";
+import { HexColorInput, HexColorPicker } from "react-colorful";
+import { toast } from "sonner";
+import { mutate } from "swr";
+
+import { UpgradePlanModal } from "@/components/billing/upgrade-plan-modal";
import AppLayout from "@/components/layouts/app";
import Navbar from "@/components/settings/navbar";
import { Button } from "@/components/ui/button";
import { Card, CardContent, CardFooter } from "@/components/ui/card";
+import { Label } from "@/components/ui/label";
+import LoadingSpinner from "@/components/ui/loading-spinner";
import {
Popover,
PopoverContent,
PopoverTrigger,
} from "@/components/ui/popover";
-import { Label } from "@/components/ui/label";
-import { useTeam } from "@/context/team-context";
-import { useCallback, useEffect, useState } from "react";
-import { mutate } from "swr";
-import { HexColorInput, HexColorPicker } from "react-colorful";
-import LoadingSpinner from "@/components/ui/loading-spinner";
-import { PlusIcon } from "lucide-react";
+
+import { usePlan } from "@/lib/swr/use-billing";
import { useBrand } from "@/lib/swr/use-brand";
-import { toast } from "sonner";
import { convertDataUrlToFile, uploadImage } from "@/lib/utils";
-import { useRouter } from "next/router";
-import { UpgradePlanModal } from "@/components/billing/upgrade-plan-modal";
-import { usePlan } from "@/lib/swr/use-billing";
export default function Branding() {
const { brand } = useBrand();
@@ -123,10 +127,10 @@ export default function Branding() {
return (
<AppLayout>
<Navbar current="Branding" />
- <div className="p-4 sm:p-4 sm:m-4">
- <div className="flex items-center justify-between mb-4 md:mb-8 lg:mb-12">
+ <div className="p-4 sm:m-4 sm:p-4">
+ <div className="mb-4 flex items-center justify-between md:mb-8 lg:mb-12">
<div className="space-y-1">
- <h3 className="text-2xl text-foreground font-semibold tracking-tight">
+ <h3 className="text-2xl font-semibold tracking-tight text-foreground">
Branding
</h3>
<p className="text-sm text-muted-foreground">
@@ -143,7 +147,7 @@ export default function Branding() {
<div className="flex items-center justify-between">
<Label htmlFor="logo">
Logo{" "}
- <span className="italic text-muted-foreground text-sm">
+ <span className="text-sm italic text-muted-foreground">
(max 2 MB)
</span>
</Label>
@@ -247,7 +251,7 @@ export default function Branding() {
<Popover>
<PopoverTrigger>
<div
- className="w-9 h-9 rounded-md cursor-pointer ring-1 ring-muted-foreground shadow-sm hover:ring-1 hover:ring-gray-300"
+ className="h-9 w-9 cursor-pointer rounded-md shadow-sm ring-1 ring-muted-foreground hover:ring-1 hover:ring-gray-300"
style={{ backgroundColor: brandColor }}
/>
</PopoverTrigger>
@@ -259,7 +263,7 @@ export default function Branding() {
</PopoverContent>
</Popover>
<HexColorInput
- className="flex h-9 w-full rounded-md border-0 bg-background px-3 py-2 text-sm ring-1 ring-muted-foreground shadow-sm placeholder:text-muted-foreground focus:ring-1 focus:ring-gray-300 focus:border-0"
+ className="flex h-9 w-full rounded-md border-0 bg-background px-3 py-2 text-sm shadow-sm ring-1 ring-muted-foreground placeholder:text-muted-foreground focus:border-0 focus:ring-1 focus:ring-gray-300"
color={brandColor}
onChange={setBrandColor}
prefixed
diff --git a/pages/settings/domains.tsx b/pages/settings/domains.tsx
index e5ca2303..5d9cad2a 100644
--- a/pages/settings/domains.tsx
+++ b/pages/settings/domains.tsx
@@ -1,12 +1,15 @@
+import { useState } from "react";
+
+import { useTeam } from "@/context/team-context";
+import { mutate } from "swr";
+
import { AddDomainModal } from "@/components/domains/add-domain-modal";
import DomainCard from "@/components/domains/domain-card";
import AppLayout from "@/components/layouts/app";
import Navbar from "@/components/settings/navbar";
import { Button } from "@/components/ui/button";
-import { useTeam } from "@/context/team-context";
+
import { useDomains } from "@/lib/swr/use-domains";
-import { useState } from "react";
-import { mutate } from "swr";
export default function Domains() {
const { domains } = useDomains();
@@ -33,10 +36,10 @@ export default function Domains() {
return (
<AppLayout>
<Navbar current="Domains" />
- <div className="p-4 sm:p-4 sm:m-4">
- <div className="flex items-center justify-between mb-4 md:mb-8 lg:mb-12">
+ <div className="p-4 sm:m-4 sm:p-4">
+ <div className="mb-4 flex items-center justify-between md:mb-8 lg:mb-12">
<div className="space-y-1">
- <h3 className="text-2xl text-foreground font-semibold tracking-tight">
+ <h3 className="text-2xl font-semibold tracking-tight text-foreground">
Domains
</h3>
<p className="text-sm text-muted-foreground">
diff --git a/pages/settings/general.tsx b/pages/settings/general.tsx
index 1047ceb0..cc7c7ebe 100644
--- a/pages/settings/general.tsx
+++ b/pages/settings/general.tsx
@@ -1,17 +1,19 @@
-import AppLayout from "@/components/layouts/app";
-import Navbar from "@/components/settings/navbar";
-import Passkey from "@/components/shared/icons/passkey";
-import { Button } from "@/components/ui/button";
-import { Input } from "@/components/ui/input";
+import { useRef, useState } from "react";
+
import { useTeam } from "@/context/team-context";
import {
- create,
type CredentialCreationOptionsJSON,
+ create,
} from "@github/webauthn-json";
-import { useRef, useState } from "react";
import { toast } from "sonner";
import { mutate } from "swr";
+import AppLayout from "@/components/layouts/app";
+import Navbar from "@/components/settings/navbar";
+import Passkey from "@/components/shared/icons/passkey";
+import { Button } from "@/components/ui/button";
+import { Input } from "@/components/ui/input";
+
export default function General() {
const teamInfo = useTeam();
const teamNameInputRef = useRef<HTMLInputElement>(null);
@@ -77,20 +79,20 @@ export default function General() {
return (
<AppLayout>
<Navbar current="General" />
- <div className="p-4 sm:p-4 sm:m-4">
- <div className="flex items-center justify-between mb-4 md:mb-8 lg:mb-12">
+ <div className="p-4 sm:m-4 sm:p-4">
+ <div className="mb-4 flex items-center justify-between md:mb-8 lg:mb-12">
<div className="space-y-1">
- <h3 className="text-2xl text-foreground font-semibold tracking-tight">
+ <h3 className="text-2xl font-semibold tracking-tight text-foreground">
General
</h3>
<p className="text-sm text-muted-foreground">Manage your team</p>
</div>
</div>
<div className="space-y-8">
- <div className="flex justify-between items-center p-10 rounded-lg border border-border bg-secondary">
+ <div className="flex items-center justify-between rounded-lg border border-border bg-secondary p-10">
<div className="flex flex-col">
<h2 className="text-xl font-medium">Team Name</h2>
- <p className="text-sm text-secondary-foreground mt-3">
+ <p className="mt-3 text-sm text-secondary-foreground">
This is the name of your team on Papermark.
</p>
<Input
@@ -108,20 +110,20 @@ export default function General() {
</Button>
</div>
- <div className="p-10 rounded-lg border border-muted">
+ <div className="rounded-lg border border-muted p-10">
<div className="space-y-6">
<div className="space-y-3">
<h2 className="text-xl font-medium">Register a passkey</h2>
- <p className="text-sm text-secondary-foreground mt-3">
+ <p className="mt-3 text-sm text-secondary-foreground">
Never use a password or oauth again. Register a passkey to
make logging in easy.
</p>
</div>
<Button
onClick={() => registerPasskey()}
- className="flex justify-center items-center space-x-2"
+ className="flex items-center justify-center space-x-2"
>
- <Passkey className="w-4 h-4" />
+ <Passkey className="h-4 w-4" />
<span>Register a new passkey</span>
</Button>
</div>
diff --git a/pages/settings/people.tsx b/pages/settings/people.tsx
index fdaafe08..8492d6da 100644
--- a/pages/settings/people.tsx
+++ b/pages/settings/people.tsx
@@ -1,12 +1,20 @@
+import Link from "next/link";
+import { useRouter } from "next/router";
+
import { useState } from "react";
+
+import { useTeam } from "@/context/team-context";
+import { useSession } from "next-auth/react";
+import { toast } from "sonner";
+import { mutate } from "swr";
+
+import { UpgradePlanModal } from "@/components/billing/upgrade-plan-modal";
import AppLayout from "@/components/layouts/app";
import Navbar from "@/components/settings/navbar";
-import { Button } from "@/components/ui/button";
-import MoreVertical from "@/components/shared/icons/more-vertical";
import Folder from "@/components/shared/icons/folder";
-import { useGetTeam } from "@/lib/swr/use-team";
-import { Skeleton } from "@/components/ui/skeleton";
+import MoreVertical from "@/components/shared/icons/more-vertical";
import { AddTeamMembers } from "@/components/teams/add-team-member-modal";
+import { Button } from "@/components/ui/button";
import {
DropdownMenu,
DropdownMenuContent,
@@ -14,19 +22,15 @@ import {
DropdownMenuLabel,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
-import { useSession } from "next-auth/react";
-import { CustomUser } from "@/lib/types";
-import { toast } from "sonner";
-import { mutate } from "swr";
-import { useRouter } from "next/router";
-import { useTeam } from "@/context/team-context";
-import { useTeams } from "@/lib/swr/use-teams";
-import Link from "next/link";
+import { Skeleton } from "@/components/ui/skeleton";
+
+import { useAnalytics } from "@/lib/analytics";
import { usePlan } from "@/lib/swr/use-billing";
import { useInvitations } from "@/lib/swr/use-invitations";
-import { UpgradePlanModal } from "@/components/billing/upgrade-plan-modal";
-import { useAnalytics } from "@/lib/analytics";
import useLimits from "@/lib/swr/use-limits";
+import { useGetTeam } from "@/lib/swr/use-team";
+import { useTeams } from "@/lib/swr/use-teams";
+import { CustomUser } from "@/lib/types";
export default function Billing() {
const [isTeamMemberInviteModalOpen, setTeamMemberInviteModalOpen] =
@@ -170,10 +174,10 @@ export default function Billing() {
return (
<AppLayout>
<Navbar current="People" />
- <div className="p-4 sm:p-4 sm:m-4">
- <div className="flex items-center justify-between mb-4 md:mb-8 lg:mb-12">
+ <div className="p-4 sm:m-4 sm:p-4">
+ <div className="mb-4 flex items-center justify-between md:mb-8 lg:mb-12">
<div className="space-y-1">
- <h3 className="text-2xl text-foreground font-semibold tracking-tight">
+ <h3 className="text-2xl font-semibold tracking-tight text-foreground">
Team Members
</h3>
<p className="text-sm text-muted-foreground">
@@ -182,7 +186,7 @@ export default function Billing() {
</div>
</div>
<div>
- <div className="flex justify-between items-center p-10 rounded-lg border border-border bg-secondary">
+ <div className="flex items-center justify-between rounded-lg border border-border bg-secondary p-10">
<div className="flex flex-col space-y-3">
<h2 className="text-xl font-medium">People</h2>
<p className="text-sm text-secondary-foreground">
@@ -208,9 +212,9 @@ export default function Billing() {
</div>
</div>
- <ul className="mt-6 border rounded-lg divide-y">
+ <ul className="mt-6 divide-y rounded-lg border">
{loading && (
- <div className="flex justify-between items-center py-4 px-10">
+ <div className="flex items-center justify-between px-10 py-4">
<div className="flex items-center gap-12">
<div className="space-y-2">
<Skeleton className="h-6 w-36" />
@@ -226,12 +230,12 @@ export default function Billing() {
)}
{team?.users.map((member, index) => (
<li
- className="flex py-4 px-10 justify-between items-center"
+ className="flex items-center justify-between px-10 py-4"
key={index}
>
<div className="flex items-center gap-12">
<div className="space-y-1">
- <h4 className="font-semibold text-sm">{member.user.name}</h4>
+ <h4 className="text-sm font-semibold">{member.user.name}</h4>
<p className="text-xs text-muted-foreground">
{member.user.email}
</p>
@@ -249,7 +253,7 @@ export default function Billing() {
</div>
</div>
<div className="flex items-center gap-12">
- <span className="text-sm text-foreground capitalize">
+ <span className="text-sm capitalize text-foreground">
{member.role.toLowerCase()}
</span>
{leavingUserId === member.userId ? (
@@ -269,7 +273,7 @@ export default function Billing() {
onClick={() =>
removeTeammate(member.teamId, member.userId)
}
- className="text-red-500 focus:bg-destructive focus:text-destructive-foreground hover:cursor-pointer"
+ className="text-red-500 hover:cursor-pointer focus:bg-destructive focus:text-destructive-foreground"
>
Leave team
</DropdownMenuItem>
@@ -279,7 +283,7 @@ export default function Billing() {
onClick={() =>
removeTeammate(member.teamId, member.userId)
}
- className="text-red-500 focus:bg-destructive focus:text-destructive-foreground hover:cursor-pointer"
+ className="text-red-500 hover:cursor-pointer focus:bg-destructive focus:text-destructive-foreground"
>
Remove teammate
</DropdownMenuItem>
@@ -300,12 +304,12 @@ export default function Billing() {
{invitations &&
invitations.map((invitation, index) => (
<li
- className="flex py-4 px-10 justify-between items-center"
+ className="flex items-center justify-between px-10 py-4"
key={index}
>
<div className="flex items-center gap-12">
<div className="space-y-1">
- <h4 className="font-semibold text-sm">
+ <h4 className="text-sm font-semibold">
{invitation.email}
</h4>
<p className="text-xs text-muted-foreground">
@@ -336,13 +340,13 @@ export default function Billing() {
<DropdownMenuLabel>Actions</DropdownMenuLabel>
<DropdownMenuItem
onClick={() => resendInvitation(invitation)}
- className="text-red-500 focus:bg-destructive focus:text-destructive-foreground hover:cursor-pointer"
+ className="text-red-500 hover:cursor-pointer focus:bg-destructive focus:text-destructive-foreground"
>
Resend
</DropdownMenuItem>
<DropdownMenuItem
onClick={() => revokeInvitation(invitation)}
- className="text-red-500 focus:bg-destructive focus:text-destructive-foreground hover:cursor-pointer"
+ className="text-red-500 hover:cursor-pointer focus:bg-destructive focus:text-destructive-foreground"
>
Revoke invitation
</DropdownMenuItem>
diff --git a/pages/share-notion-page.tsx b/pages/share-notion-page.tsx
index ded596e9..0366fb8a 100644
--- a/pages/share-notion-page.tsx
+++ b/pages/share-notion-page.tsx
@@ -1,18 +1,20 @@
import Head from "next/head";
-import Footer from "@/components/web/footer";
-import Navbar from "@/components/web/navbar";
+import Link from "next/link";
+
import { Disclosure } from "@headlessui/react";
import {
- Plus as PlusSmallIcon,
- Minus as MinusSmallIcon,
RefreshCw as ArrowPathIcon,
GitPullRequestArrow as CloudArrowUpIcon,
Settings as Cog6ToothIcon,
Fingerprint as FingerPrintIcon,
Lock as LockClosedIcon,
+ Minus as MinusSmallIcon,
+ Plus as PlusSmallIcon,
HardDrive as ServerIcon,
} from "lucide-react";
-import Link from "next/link";
+
+import Footer from "@/components/web/footer";
+import Navbar from "@/components/web/navbar";
const features = [
{
@@ -121,7 +123,7 @@ export default function Home() {
<main>
{/* Hero section */}
- <div className="relative isolate overflow-hidden bg-white dark:bg-black pb-16 pt-14 sm:pb-20">
+ <div className="relative isolate overflow-hidden bg-white pb-16 pt-14 dark:bg-black sm:pb-20">
<div
className="absolute inset-x-0 -top-40 -z-10 transform-gpu overflow-hidden blur-3xl sm:-top-80"
aria-hidden="true"
@@ -137,7 +139,7 @@ export default function Home() {
<div className="mx-auto max-w-7xl px-6 lg:px-8">
<div className="mx-auto max-w-2xl py-12 sm:py-12 lg:py-32 ">
<div className="hidden sm:mb-8 sm:flex sm:justify-center">
- <div className="relative rounded-full px-3 py-1 text-sm leading-6 text-black dark:text-white ring-1 ring-black/10 dark:ring-white/10 hover:ring-white/20">
+ <div className="relative rounded-full px-3 py-1 text-sm leading-6 text-black ring-1 ring-black/10 hover:ring-white/20 dark:text-white dark:ring-white/10">
Papermark for Notion ✍️
</div>
</div>
@@ -151,7 +153,7 @@ export default function Home() {
</p>
<div className="mt-10 flex items-center justify-center gap-x-6">
<Link
- className="rounded-md bg-black dark:bg-white px-3.5 py-2.5 text-sm font-semibold text-white dark:text-black shadow-sm hover:bg-gray-400 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-400"
+ className="rounded-md bg-black px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-gray-400 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-400 dark:bg-white dark:text-black"
href="/login"
>
Share your Notion
@@ -178,7 +180,7 @@ export default function Home() {
</div>
{/* Testimonial section */}
- <div className="relative z-10 mt-32 bg-white dark:bg-gray-900 pb-20 sm:mt-56 sm:pb-24 xl:pb-0">
+ <div className="relative z-10 mt-32 bg-white pb-20 dark:bg-gray-900 sm:mt-56 sm:pb-24 xl:pb-0">
<div
className="absolute inset-0 overflow-hidden"
aria-hidden="true"
@@ -194,11 +196,11 @@ export default function Home() {
</div>
</div>
<div className="mx-auto flex max-w-7xl flex-col items-center gap-x-8 gap-y-10 px-6 sm:gap-y-8 lg:px-8 xl:flex-row xl:items-stretch">
- <div className="-mt-8 w-full max-w-2xl xl:-mb-8 xl:w-96 xl:flex-none flex items-center justify-center">
- <div className="relative w-64 h-64">
+ <div className="-mt-8 flex w-full max-w-2xl items-center justify-center xl:-mb-8 xl:w-96 xl:flex-none">
+ <div className="relative h-64 w-64">
{" "}
<img
- className="absolute inset-0 object-cover rounded-2xl bg-gray-800 shadow-2xl"
+ className="absolute inset-0 rounded-2xl bg-gray-800 object-cover shadow-2xl"
src="https://pbs.twimg.com/profile_images/1506792347840888834/dS-r50Je_400x400.jpg"
alt=""
/>
diff --git a/pages/view/[linkId]/chat.tsx b/pages/view/[linkId]/chat.tsx
index f982d030..2be915e4 100644
--- a/pages/view/[linkId]/chat.tsx
+++ b/pages/view/[linkId]/chat.tsx
@@ -1,16 +1,20 @@
+import Link from "next/link";
+
+import { useEffect } from "react";
+
+import { authOptions } from "@/pages/api/auth/[...nextauth]";
import { type Message } from "ai/react";
-import prisma from "@/lib/prisma";
import { getServerSession } from "next-auth";
-import { authOptions } from "@/pages/api/auth/[...nextauth]";
-import { CustomUser } from "@/lib/types";
+import { usePlausible } from "next-plausible";
+
import { Chat } from "@/components/chat/chat";
import Sparkle from "@/components/shared/icons/sparkle";
-import { usePlan } from "@/lib/swr/use-billing";
-import Link from "next/link";
import { Button } from "@/components/ui/button";
-import { usePlausible } from "next-plausible";
-import { useEffect } from "react";
+
import { getFile } from "@/lib/files/get-file";
+import prisma from "@/lib/prisma";
+import { usePlan } from "@/lib/swr/use-billing";
+import { CustomUser } from "@/lib/types";
export const getServerSideProps = async (context: any) => {
const { linkId } = context.params;
@@ -140,7 +144,7 @@ export default function ChatPage({
function Nav({ linkId }: { linkId: string }) {
return (
- <nav className="bg-black fixed top-0 inset-x-0 z-10">
+ <nav className="fixed inset-x-0 top-0 z-10 bg-black">
<div className="mx-auto px-2 sm:px-6 lg:px-8">
<div className="relative flex h-16 items-center justify-between">
<div className="flex flex-1 items-center justify-center sm:items-stretch sm:justify-start">
diff --git a/pages/view/[linkId]/index.tsx b/pages/view/[linkId]/index.tsx
index a4bb0989..87a41ea4 100644
--- a/pages/view/[linkId]/index.tsx
+++ b/pages/view/[linkId]/index.tsx
@@ -1,17 +1,19 @@
-import LoadingSpinner from "@/components/ui/loading-spinner";
-import DocumentView from "@/components/view/document-view";
+import { GetStaticPropsContext } from "next";
+import { useRouter } from "next/router";
+
import NotFound from "@/pages/404";
+import { Brand, DataroomBrand } from "@prisma/client";
import { useSession } from "next-auth/react";
-
import { ExtendedRecordMap } from "notion-types";
-import notion from "@/lib/notion";
-import { CustomUser, LinkWithDataroom, LinkWithDocument } from "@/lib/types";
import { parsePageId } from "notion-utils";
-import { GetStaticPropsContext } from "next";
-import { useRouter } from "next/router";
-import { Brand, DataroomBrand } from "@prisma/client";
+
+import LoadingSpinner from "@/components/ui/loading-spinner";
import CustomMetatag from "@/components/view/custom-metatag";
import DataroomView from "@/components/view/dataroom/dataroom-view";
+import DocumentView from "@/components/view/document-view";
+
+import notion from "@/lib/notion";
+import { CustomUser, LinkWithDataroom, LinkWithDocument } from "@/lib/types";
type DocumentLinkData = {
linkType: "DOCUMENT_LINK";
@@ -175,7 +177,7 @@ export default function ViewPage({
if (router.isFallback) {
return (
- <div className="h-screen flex items-center justify-center bg-black">
+ <div className="flex h-screen items-center justify-center bg-black">
<LoadingSpinner className="h-20 w-20" />
</div>
);
@@ -201,7 +203,7 @@ export default function ViewPage({
imageUrl={meta?.metaImage ?? null}
url={`https://www.papermark.io/view/${router.query.linkId}`}
/>
- <div className="h-screen flex items-center justify-center">
+ <div className="flex h-screen items-center justify-center">
<LoadingSpinner className="h-20 w-20" />
</div>
</>
@@ -293,7 +295,7 @@ export default function ViewPage({
imageUrl={meta?.metaImage ?? null}
url={`https://www.papermark.io/view/${router.query.linkId}`}
/>
- <div className="h-screen flex items-center justify-center">
+ <div className="flex h-screen items-center justify-center">
<LoadingSpinner className="h-20 w-20" />
</div>
</>
diff --git a/pages/view/d/[linkId]/index.tsx b/pages/view/d/[linkId]/index.tsx
index eacb5e72..a603b891 100644
--- a/pages/view/d/[linkId]/index.tsx
+++ b/pages/view/d/[linkId]/index.tsx
@@ -1,15 +1,17 @@
-import LoadingSpinner from "@/components/ui/loading-spinner";
-import NotFound from "@/pages/404";
-import { useSession } from "next-auth/react";
-
-import { CustomUser } from "@/lib/types";
import { GetStaticPropsContext } from "next";
+import Head from "next/head";
import { useRouter } from "next/router";
+
+import NotFound from "@/pages/404";
import { Brand, DataroomBrand, DataroomFolder, Link } from "@prisma/client";
+import { useSession } from "next-auth/react";
+
+import LoadingSpinner from "@/components/ui/loading-spinner";
import CustomMetatag from "@/components/view/custom-metatag";
-import Head from "next/head";
import DataroomView from "@/components/view/dataroom/dataroom-view";
+import { CustomUser } from "@/lib/types";
+
export interface LinkWithDataroom extends Link {
dataroom: {
id: string;
@@ -138,7 +140,7 @@ export default function ViewPage({
imageUrl={meta?.metaImage ?? null}
url={`https://www.papermark.io/view/d/${router.query.linkId}`}
/>
- <div className="h-screen flex items-center justify-center">
+ <div className="flex h-screen items-center justify-center">
<LoadingSpinner className="h-20 w-20" />
</div>
</>
diff --git a/pages/view/domains/[domain]/[slug]/index.tsx b/pages/view/domains/[domain]/[slug]/index.tsx
index 29d43237..e438e950 100644
--- a/pages/view/domains/[domain]/[slug]/index.tsx
+++ b/pages/view/domains/[domain]/[slug]/index.tsx
@@ -1,16 +1,19 @@
-import LoadingSpinner from "@/components/ui/loading-spinner";
-import DocumentView from "@/components/view/document-view";
-import { CustomUser, LinkWithDataroom, LinkWithDocument } from "@/lib/types";
-import NotFound from "@/pages/404";
import { GetStaticPropsContext } from "next";
-import { useSession } from "next-auth/react";
import { useRouter } from "next/router";
+
+import NotFound from "@/pages/404";
+import { Brand, DataroomBrand } from "@prisma/client";
+import { useSession } from "next-auth/react";
import { ExtendedRecordMap } from "notion-types";
-import notion from "@/lib/notion";
import { parsePageId } from "notion-utils";
-import { Brand, DataroomBrand } from "@prisma/client";
+
+import LoadingSpinner from "@/components/ui/loading-spinner";
import CustomMetatag from "@/components/view/custom-metatag";
import DataroomView from "@/components/view/dataroom/dataroom-view";
+import DocumentView from "@/components/view/document-view";
+
+import notion from "@/lib/notion";
+import { CustomUser, LinkWithDataroom, LinkWithDocument } from "@/lib/types";
type DocumentLinkData = {
linkType: "DOCUMENT_LINK";
@@ -178,7 +181,7 @@ export default function ViewPage({
if (router.isFallback) {
return (
- <div className="h-screen flex items-center justify-center bg-black">
+ <div className="flex h-screen items-center justify-center bg-black">
<LoadingSpinner className="h-20 w-20" />
</div>
);
@@ -204,7 +207,7 @@ export default function ViewPage({
imageUrl={meta?.metaImage ?? null}
url={meta?.metaUrl ?? ""}
/>
- <div className="h-screen flex items-center justify-center">
+ <div className="flex h-screen items-center justify-center">
<LoadingSpinner className="h-20 w-20" />
</div>
</>
@@ -293,7 +296,7 @@ export default function ViewPage({
imageUrl={meta?.metaImage ?? null}
url={meta?.metaUrl ?? ""}
/>
- <div className="h-screen flex items-center justify-center">
+ <div className="flex h-screen items-center justify-center">
<LoadingSpinner className="h-20 w-20" />
</div>
</>
diff --git a/pages/welcome.tsx b/pages/welcome.tsx
index 72c522b0..4bcbd686 100644
--- a/pages/welcome.tsx
+++ b/pages/welcome.tsx
@@ -1,19 +1,21 @@
import { useRouter } from "next/router";
-import Intro from "@/components/welcome/intro";
-import Next from "@/components/welcome/next";
-import Upload from "@/components/welcome/upload";
-import { ArrowLeft as ArrowLeftIcon } from "lucide-react";
+
import { AnimatePresence } from "framer-motion";
-import NotionForm from "@/components/welcome/notion-form";
+import { ArrowLeft as ArrowLeftIcon } from "lucide-react";
+
import { Button } from "@/components/ui/button";
import Dataroom from "@/components/welcome/dataroom";
import DataroomTrial from "@/components/welcome/dataroom-trial";
+import Intro from "@/components/welcome/intro";
+import Next from "@/components/welcome/next";
+import NotionForm from "@/components/welcome/notion-form";
+import Upload from "@/components/welcome/upload";
export default function Welcome() {
const router = useRouter();
return (
- <div className="flex h-screen flex-col items-center justify-center max-w-3xl mx-auto overflow-x-hidden">
+ <div className="mx-auto flex h-screen max-w-3xl flex-col items-center justify-center overflow-x-hidden">
<div
className="absolute inset-x-0 top-10 -z-10 flex transform-gpu justify-center overflow-hidden blur-3xl"
aria-hidden="true"
@@ -30,7 +32,7 @@ export default function Welcome() {
{router.query.type ? (
<>
<button
- className="group absolute left-2 sm:left-10 top-10 z-40 rounded-full p-2 transition-all hover:bg-gray-400"
+ className="group absolute left-2 top-10 z-40 rounded-full p-2 transition-all hover:bg-gray-400 sm:left-10"
onClick={() => router.back()}
>
<ArrowLeftIcon className="h-8 w-8 text-gray-500 group-hover:text-gray-800 group-active:scale-90" />
@@ -39,7 +41,7 @@ export default function Welcome() {
<Button
variant={"link"}
onClick={() => router.push("/documents")}
- className="absolute right-2 sm:right-10 top-10 z-40 p-2 text-muted-foreground"
+ className="absolute right-2 top-10 z-40 p-2 text-muted-foreground sm:right-10"
>
Skip to dashboard
</Button>
diff --git a/postcss.config.js b/postcss.config.js
index 33ad091d..12a703d9 100644
--- a/postcss.config.js
+++ b/postcss.config.js
@@ -3,4 +3,4 @@ module.exports = {
tailwindcss: {},
autoprefixer: {},
},
-}
+};