daily-code
daily-code copied to clipboard
Syntax error when running the project
Describe the bug Syntax error in SearchDialog.tsx
To Reproduce Steps to reproduce the behavior:
yarn run devwill 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.
I am fixing this.
PR already raised: https://github.com/code100x/daily-code/pull/324