Getting the error: “Component not defined”

import React from 'react';
class Navbar extends React.Component {
  
  render() {
    return (
      <nav className="navbar navbar-expand-lg bg-body-tertiary">
        <div className="container-fluid">
          <a className="navbar-brand" href="#">
            Navbar
          </a>

//code continues.....

The error being displayed:

ERROR in [eslint]
srcComponentsnavbar.js
  Line 2:22:  'Component' is not defined  no-undef

I have also tried the other way around by writing the code like this:

import React, {Component} from 'react';
class Navbar extends Component {

But somehow the error is not being resolved.