Skip to content

[Bug]: Issue in recent commit (multi imports) #186

Description

@sun-chingwoo

Bug description

there has been a issue in the

Kepler/frontend/src/components/layouts/MainLayout.tsx

there have been multiple imports of same variables and similar issues it was working fine locally up until recently as i have set upstream and work on latest branch it is giving errors during start up
main cause likely in MainLayout.tsx
i believe the issue rose bcoz of a error filled pull request getting merged
ill attach error images

[plugin:vite:oxc] Transform failed with 5 errors:

[PARSE_ERROR] Identifier logEvent has already been declared
╭─[ src/components/layouts/MainLayout.tsx:4:63 ]

4 │ import { useUIStore, useSidebarCollapsed, useRightDrawerOpen, logEvent } from '@/store';
│ ────┬───
│ ╰───── logEvent has already been declared here

7 │ import { useLogbookStore, logEvent } from '@/store/logbookStore';
│ ────┬───
│ ╰───── It can not be redeclared here
───╯

[PARSE_ERROR] Identifier sidebarCollapsed has already been declared
╭─[ src/components/layouts/MainLayout.tsx:15:5 ]

15 │ sidebarCollapsed,
│ ────────┬───────
│ ╰───────── sidebarCollapsed has already been declared here

22 │ const sidebarCollapsed = useSidebarCollapsed();
│ ────────┬───────
│ ╰───────── It can not be redeclared here
────╯

[PARSE_ERROR] Identifier rightDrawerOpen has already been declared
╭─[ src/components/layouts/MainLayout.tsx:16:5 ]

16 │ rightDrawerOpen,
│ ───────┬───────
│ ╰───────── rightDrawerOpen has already been declared here

23 │ const rightDrawerOpen = useRightDrawerOpen();
│ ───────┬───────
│ ╰───────── It can not be redeclared here
────╯

[PARSE_ERROR] Identifier toggleSidebar has already been declared
╭─[ src/components/layouts/MainLayout.tsx:18:5 ]

18 │ toggleSidebar,
│ ──────┬──────
│ ╰──────── toggleSidebar has already been declared here

24 │ const toggleSidebar = useUIStore((s) => s.toggleSidebar);
│ ──────┬──────
│ ╰──────── It can not be redeclared here
────╯

[PARSE_ERROR] Identifier toggleRightDrawer has already been declared
╭─[ src/components/layouts/MainLayout.tsx:19:5 ]

19 │ toggleRightDrawer,
│ ────────┬────────
│ ╰────────── toggleRightDrawer has already been declared here

25 │ const toggleRightDrawer = useUIStore((s) => s.toggleRightDrawer);
│ ────────┬────────
│ ╰────────── It can not be redeclared here
────╯

Steps to reproduce

just try running frontend locally

Expected behavior

frontend works on the port 5173

Actual behavior

error

Screenshots or recordings

Image

Platform

Website

Environment

No response

Error messages or logs

Difficulty

None

Priority

None

Additional information

No response

Metadata

Metadata

Assignees

Labels

assignedIndicates that the issue has been assigned to a contributor who is actively working on it.bugSomething isn't workingenhancementNew feature or requestfrontendFrontend developmenttype:bugFixes an existing bug or unexpected behavior.type:featureIntroduces a new feature or enhancement.type:frontendChanges frontend or client-side code.websiteRelated to the project's website.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions