diff --git a/database/router/all_movies.js b/database/router/all_movies.js
index 4694fd3..a203ad2 100644
--- a/database/router/all_movies.js
+++ b/database/router/all_movies.js
@@ -40,4 +40,4 @@ async function searchmovie ( req,res ){
route.get('/allmovies',getAllMovies)
route.get('/searchmovie',searchmovie)
-module.exports = route;
\ No newline at end of file
+module.exports = route;
diff --git a/imdb_frontend/public/index.html b/imdb_frontend/public/index.html
index 9b7346c..941fabe 100644
--- a/imdb_frontend/public/index.html
+++ b/imdb_frontend/public/index.html
@@ -25,7 +25,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
-
React App
+ IMDB App
diff --git a/imdb_frontend/src/App.js b/imdb_frontend/src/App.js
index dea457c..74d8b8f 100644
--- a/imdb_frontend/src/App.js
+++ b/imdb_frontend/src/App.js
@@ -14,6 +14,7 @@ import {Routes, Route} from "react-router-dom"
import SignUp from './Components/Signup/singup';
import Createaccount from './Components/Createaccount/createaccount';
import Login from './Components/Login/login';
+import { SingleMovie } from './searchBar/SingleSearch';
function App() {
return (
@@ -27,6 +28,7 @@ function App() {
} >} >} >
+ {/* } > */}
diff --git a/imdb_frontend/src/Components/Homepage/homepage.jsx b/imdb_frontend/src/Components/Homepage/homepage.jsx
index 572fd15..0678716 100644
--- a/imdb_frontend/src/Components/Homepage/homepage.jsx
+++ b/imdb_frontend/src/Components/Homepage/homepage.jsx
@@ -9,7 +9,9 @@ import {Video} from "../../trailor&FooterComponent/video"
import css from "./homepage.css"
const Homepage =() => {
const user = useSelector((store)=>store.user)
- console.log(user)
+ // console.log(id)
+ console.log( user)
+
function getLoggedIn(){
let token = JSON.parse(localStorage.getItem("token"));
console.log(token)
diff --git a/imdb_frontend/src/components/Createaccount/createaccount.jsx b/imdb_frontend/src/components/Createaccount/createaccount.jsx
index c60ed57..895c5ee 100644
--- a/imdb_frontend/src/components/Createaccount/createaccount.jsx
+++ b/imdb_frontend/src/components/Createaccount/createaccount.jsx
@@ -31,7 +31,7 @@ import { useState } from "react";
if(!email.includes("@gmail.com")){
return alert('Please Fill Correct Email id')
}else if(password.length < 8){
- return alert("Password length should be 8")
+ return alert("Password must be atleast 8 caracters")
}else if(password != resetpassowrd){
return alert("Password did not match")
}
diff --git a/imdb_frontend/src/image/30days.png b/imdb_frontend/src/image/30days.png
new file mode 100644
index 0000000..aa3daf4
Binary files /dev/null and b/imdb_frontend/src/image/30days.png differ
diff --git a/imdb_frontend/src/image/Related news.png b/imdb_frontend/src/image/Related news.png
new file mode 100644
index 0000000..e27d773
Binary files /dev/null and b/imdb_frontend/src/image/Related news.png differ
diff --git a/imdb_frontend/src/image/action.png b/imdb_frontend/src/image/action.png
new file mode 100644
index 0000000..d9d17ba
Binary files /dev/null and b/imdb_frontend/src/image/action.png differ
diff --git a/imdb_frontend/src/image/amazonPrime.png b/imdb_frontend/src/image/amazonPrime.png
new file mode 100644
index 0000000..3e16041
Binary files /dev/null and b/imdb_frontend/src/image/amazonPrime.png differ
diff --git a/imdb_frontend/src/image/contribute.png b/imdb_frontend/src/image/contribute.png
new file mode 100644
index 0000000..a071b36
Binary files /dev/null and b/imdb_frontend/src/image/contribute.png differ
diff --git a/imdb_frontend/src/image/first.png b/imdb_frontend/src/image/first.png
new file mode 100644
index 0000000..a31ef34
Binary files /dev/null and b/imdb_frontend/src/image/first.png differ
diff --git a/imdb_frontend/src/image/imdb copy.png b/imdb_frontend/src/image/imdb copy.png
new file mode 100644
index 0000000..043f8d2
Binary files /dev/null and b/imdb_frontend/src/image/imdb copy.png differ
diff --git a/imdb_frontend/src/image/imdbPro copy.png b/imdb_frontend/src/image/imdbPro copy.png
new file mode 100644
index 0000000..98e23d0
Binary files /dev/null and b/imdb_frontend/src/image/imdbPro copy.png differ
diff --git a/imdb_frontend/src/image/increasing.png b/imdb_frontend/src/image/increasing.png
new file mode 100644
index 0000000..72f11fe
Binary files /dev/null and b/imdb_frontend/src/image/increasing.png differ
diff --git a/imdb_frontend/src/image/meta.png b/imdb_frontend/src/image/meta.png
new file mode 100644
index 0000000..5775e67
Binary files /dev/null and b/imdb_frontend/src/image/meta.png differ
diff --git a/imdb_frontend/src/image/netflix.png b/imdb_frontend/src/image/netflix.png
new file mode 100644
index 0000000..177b354
Binary files /dev/null and b/imdb_frontend/src/image/netflix.png differ
diff --git a/imdb_frontend/src/image/rate.png b/imdb_frontend/src/image/rate.png
new file mode 100644
index 0000000..bdce418
Binary files /dev/null and b/imdb_frontend/src/image/rate.png differ
diff --git a/imdb_frontend/src/image/second.png b/imdb_frontend/src/image/second.png
new file mode 100644
index 0000000..d0d1161
Binary files /dev/null and b/imdb_frontend/src/image/second.png differ
diff --git a/imdb_frontend/src/image/share.png b/imdb_frontend/src/image/share.png
new file mode 100644
index 0000000..1a1f2e3
Binary files /dev/null and b/imdb_frontend/src/image/share.png differ
diff --git a/imdb_frontend/src/image/singleImdb.png b/imdb_frontend/src/image/singleImdb.png
new file mode 100644
index 0000000..21ced1e
Binary files /dev/null and b/imdb_frontend/src/image/singleImdb.png differ
diff --git a/imdb_frontend/src/image/sponsr.png b/imdb_frontend/src/image/sponsr.png
new file mode 100644
index 0000000..effb86c
Binary files /dev/null and b/imdb_frontend/src/image/sponsr.png differ
diff --git a/imdb_frontend/src/image/topRated.png b/imdb_frontend/src/image/topRated.png
new file mode 100644
index 0000000..e905ce6
Binary files /dev/null and b/imdb_frontend/src/image/topRated.png differ
diff --git a/imdb_frontend/src/image/trailer.webp b/imdb_frontend/src/image/trailer.webp
new file mode 100644
index 0000000..0c2dc2f
Binary files /dev/null and b/imdb_frontend/src/image/trailer.webp differ
diff --git a/imdb_frontend/src/searchBar/SingleSearch.jsx b/imdb_frontend/src/searchBar/SingleSearch.jsx
new file mode 100644
index 0000000..ef1a67f
--- /dev/null
+++ b/imdb_frontend/src/searchBar/SingleSearch.jsx
@@ -0,0 +1,170 @@
+// import { useParams } from "react-router-dom";
+// import amazonPrime from "../image/amazonPrime.png";
+// import increasing from "../image/increasing.png";
+// import rate from '../image/rate.png';
+// import share from '../image/share.png';
+// import action from '../image/action.png';
+// import singleImdb from '../image/singleImdb.png';
+// import netflix from '../image/netflix.png';
+// import meta from '../image/meta.png';
+// import releatedNews from '../image/Related news.png';
+// import first from '../image/first.png';
+// import second from '../image/second.png';
+// import contribute from '../image/contribute.png';
+// import topRated from '../image/topRated.png';
+// import days from '../image/30days.png';
+// import sponsr from '../image/sponsr.png';
+// import trailer from '../image/trailer.webp';
+// import { Box, Image, Flex, Text, Link, Divider, Button } from '@chakra-ui/react';
+// import { useState } from "react";
+
+// export function SingleMovie() {
+// let [data,setData]=useState({});
+// // let {id} = useParams();
+// // console.log(id)
+// function getData(){
+// fetch(`http//:localhost3000/allMovies/${id}`)
+// .then((res)=>res)
+// .then((e)=>setData(e))
+// .catch((err)=>console.log(err))
+// }
+
+// // let data = {
+// // fullTitle: "Spider Man:Far from home",
+// // year: "2021",
+// // imDbRating: "4.1",
+// // image: "https://via.placeholder.com/300.png"
+// // }
+// return (
+// <>
+//
+//
+//
+//
+//
+//
+//
+//
+//
+// {data.fullTitle}
+//
{data.year}{' · '}{'PG-13 · 2h28m'}
+
+//
+
+//
+//
+// IMDb RATING
+//
+// ⭐{data.imDbRating}
+//
+//
+//
+// YOUR RATING
+//
+//
+//
+//
+//
+// POPULARITY
+//
+//
+//
+
+//
+
+//
+//
+//
+//
+//
+//
+//
+//
+// With Spider-Man's identity now revealed, Peter asks Doctor Strange for help. When a spell goes wrong, dangerous foes from other worlds start to appear, forcing Peter to discover what it truly means to be Spider-Man.
+//
+
+//
+
+//
+// Director Jon Watts
+//
+
+//
+
+//
+// Writers Chris McKenna · Erik Sommers · Stan Lee
+//
+
+//
+
+//
+// Stars Tom Holland · Zendaya · Benedict Cumberbatch
+//
+
+//
+
+//
+
+//
+//
+//
+//
+//
+//
+//
+//
+//
+// ≡ More Watch Option
+//
+//
+//
+//
+// + Add to Watchlist
+//
+
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+// IMDb Answers: Help fill gaps in our data
+//
+//
+//
+// Learn more about contributing
+//
+//
+//
+// >
+// )
+// }
\ No newline at end of file
diff --git a/imdb_frontend/src/searchBar/inputContent.jsx b/imdb_frontend/src/searchBar/inputContent.jsx
index 72e3f9f..0bd2a83 100644
--- a/imdb_frontend/src/searchBar/inputContent.jsx
+++ b/imdb_frontend/src/searchBar/inputContent.jsx
@@ -1,31 +1,63 @@
-import { Image,Box,Flex,Text } from '@chakra-ui/react'
+// import { Image,Box,Flex,Text } from '@chakra-ui/react'
+// // import abc from ''
+// export function InputContent(props) {
+// console.log('check',props)
+// let data=props.props;
+// return (
+// <>
+
+// {data.map((e)=>(
+//
+//
+//
+//
+//
+// {e.fullTitle}
+//
+// {e.year}
+// {/* {e.crew.map((name)=>(name+' '))} */}
+// {/* {e.crew.map((name,index)=>(
+// ({name}{index)
+
+// ))} */}
+//
+//
+//
+// ))}
+
+// >
+// )
+// }
+
+import { Image, Box, Flex, Text, Link } from '@chakra-ui/react'
// import abc from ''
export function InputContent(props) {
- // console.log(props)
- let data=props.props;
+ console.log(props)
+ let data = props.props;
return (
<>
-
- {data.map((e)=>(
-
-
-
-
-
- {e.fullTitle}
-
- {e.year}
- {/* {e.crew.map((name)=>(name+' '))} */}
- {e.crew.map((name,index)=>(
- ({name}{index)
-
- ))}
-
-
-
- ))}
-
+
+ {data.map((e) => (
+
+
+
+
+
+
+ {e.fullTitle}
+
+ {e.year}
+ {/* {e.crew.map((name)=>(name+' '))}
+ {e.crew.map((name, index) => (
+ ({name}{index < e.crew.length - 1 ? ', ' : ''})
+
+ ))} */}
+
+
+
+
+ ))}
+
>
)
-}
-
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/imdb_frontend/src/searchBar/search.jsx b/imdb_frontend/src/searchBar/search.jsx
index e1bd0a1..57b4402 100644
--- a/imdb_frontend/src/searchBar/search.jsx
+++ b/imdb_frontend/src/searchBar/search.jsx
@@ -10,149 +10,125 @@ import {
PopoverAnchor,
Menu,
MenuButton,
+
Box,
MenuList,
IconButton,
Divider,
- Link,
- Text,
+ Link
} from '@chakra-ui/react';
import imdbLogo from '../image/imdb.png';
import imdbPro from '../image/imdbPro.png';
import menu from '../image/menu.png';
import watchlist from '../image/watchlist.png';
-import { Input, InputGroup, InputRightElement } from '@chakra-ui/react';
+import { Input, InputGroup, InputRightElement } from '@chakra-ui/react'
import { SearchIcon, HamburgerIcon } from '@chakra-ui/icons';
import { Image } from '@chakra-ui/react';
import { useEffect, useState, useRef } from 'react';
import { InputContent } from './inputContent';
-import { useNavigate } from 'react-router';
-import { useSelector } from 'react-redux';
// import abc from ''
export function Search() {
- const user = useSelector((store)=>store.user)
- console.log(user)
- const Navigate = useNavigate();
- const initialFocusRef = useRef();
+ // const initialFocusRef = useRef()
const [inputGiven, setInputGiven] = useState('');
const [movieList, setMovieList] = useState([]);
- const [search, setSearch] = useState(0); //will be used while debouncing
- const [timer, setTimer] = useState(0); //will be used for debouncing
-
+ const [search, setSearch] = useState(0);//will be used while debouncing
+ const [timer, setTimer] = useState(0);//will be used for debouncing
async function fetchMovieDetails(inputGiven) {
- const res = await fetch(`http://localhost:8080/allMovies?q=${inputGiven}`);
- const data = await res.json();
- setMovieList(data);
- }
-
- function searchBar(e){
- setInputGiven(e.target.value);
- fetchMovieDetails(inputGiven);
+
+ const res = await fetch(`http://localhost:8080/searchmovie?q=${inputGiven}`);
+ const data = await res.json();
+ console.log('data',data.data)
+ setMovieList(data.data)
}
+ // useEffect(() => {
+ // fetchMovieDetails(inputGiven)
+ // },[inputGiven])
- const[signOut,setSignOut]=useState(false)
- const setInLocalStorage = ( ) =>{
- localStorage.setItem("token","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYyZTY3NjJmNTBmYzZkZTJlMzM3MTQzYyIsImVtYWlsIjoidGVzdEBnbWFpbC5jb20iLCJuYW1lIjoidGVzdCIsInN1YnNjcmliZWQiOltdLCJpYXQiOjE2NTkyNzA3MjZ9.UZpX2PWPPJtCrucXyEHYZSWpAFoeMomu2IzxYbqmEwU")
+ const handleInput = (e ) =>{
+ setInputGiven(e.target.value)
+ fetchMovieDetails(inputGiven)
}
-
return (
- <>
-
-
-
-
-
-
-
-
-
-
-
-
- }
- />
- {
- searchBar(e)
- }}
- />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ <>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ }
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Sign In
+
+
+ Eng
+
-
-
-
-
- {user && user.name != 'test' ? (setSignOut(!signOut)}
- >
-
- {user.name}
- ): Navigate('/signup')}
- >
-
- Sign In
- }
- {/* {signOut ? ( setInLocalStorage}>
- Sign out
- ):''} */}
- {/*
- Button
- */}
-
- Eng
-
-
- >
- );
-}
+ >
+ )
+}
\ No newline at end of file
diff --git a/imdb_frontend/src/trailor&FooterComponent/Footer.css b/imdb_frontend/src/trailor&FooterComponent/Footer.css
index a95e5e3..20cdf32 100644
--- a/imdb_frontend/src/trailor&FooterComponent/Footer.css
+++ b/imdb_frontend/src/trailor&FooterComponent/Footer.css
@@ -9,7 +9,7 @@
width: 2vw;
}
.footerSecondLine{
- width: 55vw;
+ width: 60vw;
margin: auto;
display: grid;
grid-template-columns: repeat(6,1fr);
@@ -21,7 +21,7 @@
text-decoration: underline;
}
.footerThirdLine{
- width: 60vw;
+ width: 65vw;
margin: auto;
display: grid;
grid-template-columns: repeat(6,1fr);