xxxxxxxxxx
import React from 'react';
import { useSelector } from 'react-redux';
import './Loader.css'; // Optional: Import CSS file for styling
const Loader = () => {
const isLoading = useSelector((state) => state.loader.isLoading);
if (!isLoading) {
return null; // If isLoading is false, do not render the loader
}
return (
<div className="loader-container">
{/* Your loader content goes here */}
</div>
);
};
export default Loader;