Problem with component in React.jsx

I’m trying to create a navbar with React.jsx but apper the error “[plugin:vite:import-analysis] Failed to resolve import “.pages/Pricing” from “src\App.jsx”. Does the file exist?”

import React from 'react'
import Navbar from './Navbar'
import Pricing from '.pages/Pricing'
import About from '.pages/About'
import Home from '.pages/Home'

function App() {
  let component
    case "/home":
      component = <Home />
    case "/pricing":
    component = <Pricing />
    case "/about":
    component = <About />
  return (
    <div className="App">
      <Navbar />

export default App

Actual error

I assume it’s a folder in the same directory called pages, not .pages, ie ./pages/

1 Like

Terimakasih Banyak atas bantuanya Mr. DanCouper :flushed:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.