daily-code icon indicating copy to clipboard operation
daily-code copied to clipboard

Syntax error when running the project

Open anshu-gautam opened this issue 1 year ago • 2 comments

Describe the bug Syntax error in SearchDialog.tsx

To Reproduce Steps to reproduce the behavior:

  1. yarn run dev will pop this error:
web:dev:  ○ Compiling / ...
web:dev:  ⨯ ../../packages/ui/src/SearchDialog.tsx
web:dev: Error: 
web:dev:   × Unexpected token `=`. Expected yield, an identifier, [ or {
web:dev:     ╭─[/Users/anshu/Desktop/daily-code/packages/ui/src/SearchDialog.tsx:12:1]
web:dev:  12 │ export function SearchDialog({ tracks }: { tracks: (Track & { problems: Problem[] })[] }) {
web:dev:  13 │   const [dialogOpen, setDialogOpen] = useState(false);
web:dev:  14 │   const 
web:dev:  15 │   = useRef<HTMLDivElement>(null);
web:dev:     ·   ─
web:dev:  16 │   const [input, setInput] = useState("");
web:dev:  17 │   const [searchTracks, setSearchTracks] = useState(tracks);
web:dev:  18 │   const [selectedIndex, setSelectedIndex] = useState(-1);
web:dev:     ╰────
web:dev: 
web:dev: Caused by:
web:dev:     Syntax Error
web:dev: 
web:dev: Import trace for requested module:
web:dev: ../../packages/ui/src/SearchDialog.tsx
web:dev: ../../packages/ui/src/Appbar.tsx
web:dev: ../../packages/ui/src/index.tsx
web:dev: ./components/AppbarClient.tsx
web:dev:  ⨯ ../../packages/ui/src/SearchDialog.tsx

Expected behavior A clear and concise description of what you expected to happen.

Screenshots or GIFs If applicable, add screenshots to help explain your problem.

Info (please complete the following information):

  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context Add any other context about the problem here.

anshu-gautam avatar Apr 22 '24 05:04 anshu-gautam

I am fixing this.

anshu-gautam avatar Apr 22 '24 05:04 anshu-gautam

PR already raised: https://github.com/code100x/daily-code/pull/324

ssk090 avatar Apr 22 '24 10:04 ssk090