Skip to content

Commit

Permalink
name convention
Browse files Browse the repository at this point in the history
  • Loading branch information
theonlylooker committed Jan 4, 2023
1 parent 3d7dd32 commit ca60c31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
import { notes } from "../types/types";

const index = () => {

This comment has been minimized.

Copy link
@karldivad

karldivad Jan 4, 2023

Instead of Index it could be something more meaningful like Home and if you are using typescript you could use:

const Home: React.FC = () => { ....

This comment has been minimized.

Copy link
@karldivad

karldivad Jan 4, 2023

Also, NextJS has its own types for Pages components, instead of React.FC

const Index = () => {
let { file, dropFile } = useDrop();
const [noteData, setNoteData] = useState<notes | null>(null);
const setData = (data: notes | null) => {
Expand Down Expand Up @@ -39,4 +39,4 @@ const index = () => {
);
};

export default index;
export default Index;

0 comments on commit ca60c31

Please sign in to comment.