Skip to content

Commit 3872f07

Browse files
committed
chore: format codebase using @prettier
1 parent b2e0724 commit 3872f07

35 files changed

+147
-316
lines changed

.eslintrc.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
{
2-
"extends": [
3-
"next/core-web-vitals",
4-
"standard",
5-
"plugin:tailwindcss/recommended",
6-
"prettier"
7-
],
2+
"extends": ["next/core-web-vitals", "standard", "plugin:tailwindcss/recommended", "prettier"],
83
"ignorePatterns": ["/components/ui/*"]
94
}

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/.next
2+
/.git
3+
node_modules

app/Room.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ export function Room({ children }: { children: ReactNode }) {
2020
canvasObjects: new LiveMap(),
2121
}}
2222
>
23-
<ClientSideSuspense fallback={<Loader />}>
24-
{() => children}
25-
</ClientSideSuspense>
23+
<ClientSideSuspense fallback={<Loader />}>{() => children}</ClientSideSuspense>
2624
</RoomProvider>
2725
);
2826
}

app/api/liveblocks/auth.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ export default async function auth(req: NextApiRequest, res: NextApiResponse) {
2222
color: COLORS[Math.floor(Math.random() * COLORS.length)],
2323

2424
// Uncomment below and refresh to see with avatar graphics
25-
avatar: `https://liveblocks.io/avatars/avatar-${Math.floor(
26-
Math.random() * 30
27-
)}.png`,
25+
avatar: `https://liveblocks.io/avatars/avatar-${Math.floor(Math.random() * 30)}.png`,
2826
},
2927
});
3028

app/globals.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
@import "@liveblocks/react-comments/styles.css";
66

77
* {
8-
font-family: work sans, sans-serif;
8+
font-family:
9+
work sans,
10+
sans-serif;
911
}
1012

1113
body {

app/layout.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
import React from "react";
12
import type { Metadata } from "next";
2-
import { Work_Sans } from "next/font/google";
3+
import { Work_Sans as WorkSans } from "next/font/google";
34

45
import "./globals.css";
56
import { Room } from "./Room";
67

7-
const workSans = Work_Sans({
8+
const workSans = WorkSans({
89
subsets: ["latin"],
910
variable: "--font-work-sans",
1011
weight: ["400", "600", "700"],

app/page.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import {
2020
} from "@/lib/canvas";
2121
import { ActiveElement, Attributes } from "@/types";
2222
import { useMutation, useRedo, useStorage, useUndo } from "@/liveblocks.config";
23-
import { LiveMap } from "@liveblocks/client";
2423
import { defaultNavElement } from "@/constants";
2524
import { handleDelete, handleKeyDown } from "@/lib/key-events";
2625
import { handleImageUpload } from "@/lib/shapes";
@@ -38,7 +37,7 @@ export default function Home() {
3837
const imageInputRef = useRef<HTMLInputElement | null>(null);
3938
const isEditingRef = useRef<boolean>(false);
4039

41-
const canvasObjects = useStorage((root) => root.canvasObjects);
40+
const canvasObjects = useStorage(root => root.canvasObjects);
4241

4342
const [elementAttributes, setElementAttributes] = useState<Attributes>({
4443
width: "",
@@ -76,7 +75,7 @@ export default function Home() {
7675

7776
const entries = Array.from(canvasObjects.entries());
7877

79-
for (const [key, value] of entries) {
78+
for (const [key] of entries) {
8079
canvasObjects.delete(key);
8180
}
8281

components/comments/comments-overlay.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,9 @@ export const CommentsOverlay = () => {
3333
return (
3434
<div>
3535
{threads
36-
.filter((thread) => !thread.metadata.resolved)
37-
.map((thread) => (
38-
<OverlayThread
39-
key={thread.id}
40-
thread={thread}
41-
maxZIndex={maxZIndex}
42-
/>
36+
.filter(thread => !thread.metadata.resolved)
37+
.map(thread => (
38+
<OverlayThread key={thread.id} thread={thread} maxZIndex={maxZIndex} />
4339
))}
4440
</div>
4541
);

components/comments/comments.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,5 @@ import { ClientSideSuspense } from "@liveblocks/react";
55
import { CommentsOverlay } from "@/components/comments/comments-overlay";
66

77
export const Comments = () => (
8-
<ClientSideSuspense fallback={null}>
9-
{() => <CommentsOverlay />}
10-
</ClientSideSuspense>
8+
<ClientSideSuspense fallback={null}>{() => <CommentsOverlay />}</ClientSideSuspense>
119
);

components/comments/new-thread-cursor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ const NewThreadCursor = ({ display }: { display: boolean }) => {
7373
// Portal.Root is used to render a component outside of its parent component
7474
<Portal.Root>
7575
<div
76-
className="pointer-events-none fixed left-0 top-0 h-9 w-9 cursor-grab select-none rounded-bl-full rounded-br-full rounded-tl-md rounded-tr-full bg-white shadow-2xl"
76+
className="pointer-events-none fixed left-0 top-0 size-9 cursor-grab select-none rounded-r-full rounded-bl-full rounded-tl-md bg-white shadow-2xl"
7777
style={{
7878
transform: `translate(${coords.x}px, ${coords.y}px)`,
7979
}}

0 commit comments

Comments
 (0)