MaxLeiter / Drift

Drift is a self-hostable Gist and paste service. Built with Next.js 13 and React Server Components.
https://drift.lol
MIT License
1.36k stars 61 forks source link

Compilation fails #144

Closed qwertzdenek closed 1 year ago

qwertzdenek commented 1 year ago

Describe the bug Production build using pnpm build fails on linter errors (on refactor branch).

Failed to compile.

./src/app/components/badges/created-ago-badge/index.tsx
6:10  Error: 'useMemo' is defined but never used.  @typescript-eslint/no-unused-vars
10:8  Warning: The 'createdDate' object construction makes the dependencies of useEffect Hook (at line 19) change on every render. To fix this, wrap the initialization of 'createdDate' in its own useMemo() Hook.  react-hooks/exhaustive-deps

./src/app/components/header/buttons.tsx
3:10  Error: 'useSelectedLayoutSegment' is defined but never used.  @typescript-eslint/no-unused-vars

Environment

Expected behavior Build is possible without errors and code smells.

Thank you ;)

cxplay commented 1 year ago

The same problem was encountered.

MaxLeiter commented 1 year ago

Sorry these are pretty easy fixes if someone wants to submit a pull request. I can't work on drift for the next ~week.

qwertzdenek commented 1 year ago

https://github.com/MaxLeiter/Drift/pull/145