From caf59a48baee2dcc69182139058b1f60057702cb Mon Sep 17 00:00:00 2001 From: SrinivasDevolper Date: Sun, 16 Jun 2024 20:08:41 +0530 Subject: [PATCH] first commit --- src/components/noResultsFound/index.css | 16 ++++++++++++++++ src/components/noResultsFound/index.js | 11 +++++++++++ src/components/page4/lecture.js | 3 +++ src/components/page4/trdquantum.js | 5 +++-- src/components/page5(1st)/fstlecture.js | 5 +++-- src/components/page5(1st)/fstquantum.js | 5 +++-- src/components/page6(2nd)/sndlecture.js | 6 +++--- src/components/page6(2nd)/sndquantum.js | 6 ++++-- 8 files changed, 46 insertions(+), 11 deletions(-) create mode 100644 src/components/noResultsFound/index.css create mode 100644 src/components/noResultsFound/index.js diff --git a/src/components/noResultsFound/index.css b/src/components/noResultsFound/index.css new file mode 100644 index 0000000..17e5ba8 --- /dev/null +++ b/src/components/noResultsFound/index.css @@ -0,0 +1,16 @@ +.bg-container{ + display: flex; + flex-direction: column; + height: 50vh; + justify-content: center; + align-items: center; +} + +.bg-container h1{ + font-size: 30px; + color: rgb(36, 36, 36); +} + +.bg-container p{ + color: #757575; +} \ No newline at end of file diff --git a/src/components/noResultsFound/index.js b/src/components/noResultsFound/index.js new file mode 100644 index 0000000..a7c1eb4 --- /dev/null +++ b/src/components/noResultsFound/index.js @@ -0,0 +1,11 @@ +import './index.css' +const NoResultsFound = () => { + return( +
+

No Result Found

+

We can't find any item item matching your search

+
+ ) +} + +export default NoResultsFound \ No newline at end of file diff --git a/src/components/page4/lecture.js b/src/components/page4/lecture.js index ea0d696..146f8a1 100644 --- a/src/components/page4/lecture.js +++ b/src/components/page4/lecture.js @@ -12,6 +12,7 @@ import wt from '../../assets/wt.jpg'; import se from '../../assets/se.jpg'; import bd from '../../assets/bd.jpg'; import {FaMagnifyingGlass } from 'react-icons/fa6' +import NoResultsFound from '../noResultsFound/index.js' function Lecture() { // State for search query @@ -56,6 +57,7 @@ function Lecture() { /> {/* Display filtered lecture items */} + { filteredItems.length !== 0 ?
{filteredItems.map((item, index) => (
@@ -67,6 +69,7 @@ function Lecture() {
))}
+ : } ); } diff --git a/src/components/page4/trdquantum.js b/src/components/page4/trdquantum.js index eb85973..6b811d4 100644 --- a/src/components/page4/trdquantum.js +++ b/src/components/page4/trdquantum.js @@ -10,6 +10,7 @@ import Imgcn from '../../assets/cn.webp'; import Imgwt from '../../assets/wt.png'; import Imgitcs from '../../assets/itcsimg.jpg'; import {FaMagnifyingGlass } from 'react-icons/fa6' +import NoResultsFound from '../noResultsFound/index.js' const quantumBooks = [ { img: Imgcd, title: "Compiler Design", file: "cd" }, { img: Imgda, title: "Data Analytics", file: "DataAnalytics" }, @@ -66,7 +67,7 @@ function Quantum() { -
+ { filteredBooks.length !== 0 ?
{filteredBooks.map(book => (
{book.title} @@ -76,7 +77,7 @@ function Quantum() {
))} -
+ : } ) diff --git a/src/components/page5(1st)/fstlecture.js b/src/components/page5(1st)/fstlecture.js index 270572a..7e4d623 100644 --- a/src/components/page5(1st)/fstlecture.js +++ b/src/components/page5(1st)/fstlecture.js @@ -1,6 +1,7 @@ import React, { useState } from 'react'; import Header from '../../pages/header'; import './fstlecture.css'; +import NoResultsFound from '../noResultsFound/index.js' // Import images import ec from '../../assets/ec.jpg'; @@ -62,7 +63,7 @@ function Lecture() { /> {/* Display filtered lecture items */} -
+ { filteredItems.length !== 0 ?
{filteredItems.map((item, index) => (
@@ -72,7 +73,7 @@ function Lecture() { View Content
))} -
+
: }
); } diff --git a/src/components/page5(1st)/fstquantum.js b/src/components/page5(1st)/fstquantum.js index 4074569..21429d4 100644 --- a/src/components/page5(1st)/fstquantum.js +++ b/src/components/page5(1st)/fstquantum.js @@ -1,4 +1,5 @@ import React, { useState, useEffect } from 'react'; +import NoResultsFound from '../noResultsFound/index.js' import Header from '../../pages/header.js'; import Aquantum from '../../assets/5th.png'; import Imgphy from '../../assets/physics.webp'; @@ -66,7 +67,7 @@ function Quantum() { onChange={(e) => setSearchQuery(e.target.value)} /> -
+ { filteredBooks.length !== 0 ?
{filteredBooks.map(book => (
{book.title} @@ -76,7 +77,7 @@ function Quantum() {
))} -
+ : } ); diff --git a/src/components/page6(2nd)/sndlecture.js b/src/components/page6(2nd)/sndlecture.js index 22e3227..61285a3 100644 --- a/src/components/page6(2nd)/sndlecture.js +++ b/src/components/page6(2nd)/sndlecture.js @@ -1,6 +1,6 @@ import React, { useState, useEffect } from 'react'; import Header from '../../pages/header'; - +import NoResultsFound from '../noResultsFound/index.js' import Imgmath4 from '../../assets/lmath4.jpg'; import Imgdsa from '../../assets/ldsa.jpg'; import Imgcoa from '../../assets/lcoa.jpg'; @@ -61,7 +61,7 @@ function SndLecture() {
-
+ { filteredLectures.length !== 0 ?
{filteredLectures.map((lecture) => (
@@ -73,7 +73,7 @@ function SndLecture() {
))} -
+
: }
); } diff --git a/src/components/page6(2nd)/sndquantum.js b/src/components/page6(2nd)/sndquantum.js index 8c9c711..edc614e 100644 --- a/src/components/page6(2nd)/sndquantum.js +++ b/src/components/page6(2nd)/sndquantum.js @@ -1,4 +1,5 @@ import React, { useState, useEffect } from 'react'; +import NoResultsFound from '../noResultsFound/index.js' import '../page6(2nd)/sndquantum.css'; import Header from '../../pages/header.js'; import Aquantum from '../../assets/5th.png'; @@ -14,6 +15,7 @@ import Imguhv from '../../assets/uhv.jpg'; import Imgos from '../../assets/os.jpg'; import Imgtafl from '../../assets/autometa.png'; import {FaMagnifyingGlass } from 'react-icons/fa6' +import { FilterBAndW } from '@mui/icons-material'; const books = [ { img: Imgmath4, title: "Engineering Math4", file: "Mathematics4" }, @@ -69,7 +71,7 @@ function SndQuantum() { onChange={(e) => setSearchQuery(e.target.value)} /> -
+ {filteredBooks.length !== 0 ?
{filteredBooks.map(book => (
{book.title} @@ -79,7 +81,7 @@ function SndQuantum() {
))} -
+ : } );