Skip to content

Commit 9f554c9

Browse files
committed
fix: lint
1 parent 07c3d39 commit 9f554c9

File tree

19 files changed

+35
-54
lines changed

19 files changed

+35
-54
lines changed

src/app/(home)/Navbar.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ import Image from "next/image";
33
import Link from "next/link";
44
import { SearchInput } from "./SearchInput";
55

6-
type Props = {};
7-
export const Navbar: React.FC<Props> = ({}) => {
6+
export const Navbar: React.FC = () => {
87
return (
98
<nav className="flex items-center justify-between h-full w-full">
109
<div className="flex gap-3 items-center shrink-0 pr-6">

src/app/(home)/SearchInput.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ import { Button } from "@/components/ui/button";
44
import { Input } from "@/components/ui/input";
55
import { useSearchParam } from "@/hooks/use-search-param";
66
import { SearchIcon, XIcon } from "lucide-react";
7-
import { use, useRef, useState } from "react";
7+
import { useRef, useState } from "react";
88

9-
type Props = {};
10-
export const SearchInput: React.FC<Props> = ({}) => {
9+
export const SearchInput: React.FC = () => {
1110
const [search, setSearch] = useSearchParam();
1211
const [value, setValue] = useState<string>(search);
1312

src/app/(home)/TemplatesGallery.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ import {
1010
import { DOCUMENT_TEMPLATES } from "@/constants/templates";
1111
import { cn } from "@/lib/utils";
1212

13-
type Props = {};
14-
15-
export const TemplatesGallery: React.FC<Props> = ({}) => {
13+
export const TemplatesGallery: React.FC = () => {
1614
const isCreating = false;
1715

1816
return (

src/app/(home)/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
"use client";
22

33
import { useQuery } from "convex/react";
4+
import { api } from "../../../convex/_generated/api";
45
import { Navbar } from "./Navbar";
56
import { TemplatesGallery } from "./TemplatesGallery";
6-
import { api } from "../../../convex/_generated/api";
77

88
const Page: React.FC = () => {
99
const documents = useQuery(api.document.list);
@@ -24,7 +24,7 @@ const Page: React.FC = () => {
2424
<TemplatesGallery />
2525

2626
{documents?.map((document) => {
27-
return <span>{document.title}</span>;
27+
return <span key={document._id}>{document.title}</span>;
2828
})}
2929
</div>
3030
</div>

src/app/document/[documentId]/(navbar)/DocumentInput.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { CloudFogIcon } from "lucide-react";
22

3-
type Props = {};
4-
export const DocumentInput: React.FC<Props> = ({}) => {
3+
export const DocumentInput: React.FC = () => {
54
return (
65
<div className="flex items-center gap-2">
76
<span className="text-lg px-1.5 cursor-pointer truncate">

src/app/document/[documentId]/(navbar)/MenuBar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ import {
3232
Undo2Icon,
3333
} from "lucide-react";
3434

35-
type Props = {};
36-
export const MenuBar: React.FC<Props> = ({}) => {
35+
export const MenuBar: React.FC = () => {
3736
const { editor } = useEditorStore();
3837

3938
const addTable = ({ rows, cols }: { rows: number; cols: number }) => {
@@ -177,6 +176,7 @@ export const MenuBar: React.FC<Props> = ({}) => {
177176
<MenubarSubContent>
178177
{Array.from({ length: 4 }, (_, i) => i).map((i) => (
179178
<MenubarItem
179+
key={i}
180180
onClick={() =>
181181
addTable({
182182
cols: i + 1,

src/app/document/[documentId]/(navbar)/navbar.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ import Link from "next/link";
33
import { DocumentInput } from "./DocumentInput";
44
import { MenuBar } from "./MenuBar";
55

6-
type Props = {};
7-
export const Navbar: React.FC<Props> = ({}) => {
6+
export const Navbar: React.FC = () => {
87
return (
98
<>
109
<nav className="flex items-center justify-between bg-white">

src/app/document/[documentId]/(ruler)/Ruler.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
import React, { useRef, useState } from "react";
22
import { Marker } from "./Marker";
33

4-
type Props = {};
5-
64
const makers = Array.from({ length: 83 }, (_, i) => i);
75

86
const PAGE_WIDTH = 816;
97
const MINIMUM_SPACE = 100;
108
const INITIAL_MG = 56;
119

12-
export const Ruler: React.FC<Props> = ({}) => {
10+
export const Ruler: React.FC = () => {
1311
const [leftMg, setLeftMg] = useState(INITIAL_MG);
1412
const [rightMg, setRightMg] = useState(INITIAL_MG);
1513

src/app/document/[documentId]/(toolbar)/AlignButton.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { type ColorResult } from "react-color";
2-
31
import {
42
DropdownMenu,
53
DropdownMenuContent,

src/app/document/[documentId]/(toolbar)/ImageButton.tsx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,7 @@
11
import { useEditorStore } from "@/store/useEditorStore";
22
import { useState } from "react";
33

4-
import { CirclePicker } from "react-color";
54

6-
import {
7-
DropdownMenu,
8-
DropdownMenuContent,
9-
DropdownMenuItem,
10-
DropdownMenuTrigger,
11-
} from "@/components/ui/dropdown-menu";
12-
import { ImageIcon, Link2Icon, SearchIcon, UploadIcon } from "lucide-react";
13-
import { Input } from "@/components/ui/input";
145
import { Button } from "@/components/ui/button";
156
import {
167
Dialog,
@@ -19,6 +10,14 @@ import {
1910
DialogHeader,
2011
DialogTitle,
2112
} from "@/components/ui/dialog";
13+
import {
14+
DropdownMenu,
15+
DropdownMenuContent,
16+
DropdownMenuItem,
17+
DropdownMenuTrigger,
18+
} from "@/components/ui/dropdown-menu";
19+
import { Input } from "@/components/ui/input";
20+
import { ImageIcon, SearchIcon, UploadIcon } from "lucide-react";
2221

2322
export const ImageButton: React.FC = () => {
2423
const { editor } = useEditorStore();

0 commit comments

Comments
 (0)