-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
48 changed files
with
1,432 additions
and
19,260 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
|
||
# dependencies | ||
/node_modules | ||
.env | ||
/.pnp | ||
.pnp.js | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,28 @@ | ||
/** @format */ | ||
import React from 'react'; | ||
import { BrowserRouter as Router } from 'react-router-dom'; // Import Router from react-router-dom | ||
import 'bootstrap/dist/css/bootstrap.min.css'; // Import Bootstrap CSS | ||
|
||
import React, { useEffect } from "react"; | ||
import { Route, BrowserRouter as Router, Routes } from "react-router-dom"; // Import Router from react-router-dom | ||
import "bootstrap/dist/css/bootstrap.min.css"; // Import Bootstrap CSS | ||
import Home from "./components/Home"; | ||
import Template from "./components/Auth/Template"; | ||
import { fairyDustCursor } from "./components/FairyDust"; // Import the fairy-dust effect | ||
import Header from './components/Header'; | ||
import NavBar from './components/NavBar'; | ||
import MovieList from './components/MovieList'; | ||
import ImageSlider from './components/ImageSlider'; | ||
import Footer from './components/Footer'; | ||
import Offers from './components/Offers'; | ||
import './App.css'; // Your custom CSS | ||
|
||
function App() { | ||
// Initialize the fairy-dust cursor effect globally | ||
useEffect(() => { | ||
fairyDustCursor(); | ||
}, []); | ||
|
||
return ( | ||
<div> | ||
<Router> | ||
<Routes> | ||
<Route path="/" element={<Home />} /> | ||
<Route path="/login" element={<Template formType={"login"} />} /> | ||
<Route path="/signup" element={<Template formType={"signup"} />} /> | ||
</Routes> | ||
</Router> | ||
</div> | ||
); | ||
return ( | ||
<Router> | ||
<div className="App"> | ||
<Header /> | ||
<NavBar /> | ||
<ImageSlider /> | ||
<MovieList /> | ||
<Offers /> | ||
<Footer /> | ||
</div> | ||
</Router> | ||
); | ||
} | ||
|
||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
|
||
|
||
const Config={ | ||
API_KEY: process.env.REACT_APP_FIREBASE_API_KEY, | ||
AUTH_DOMAIN: process.env.REACT_APP_AUTH_DOMAIN, | ||
PROJECT_ID: process.env.REACT_APP_PROJECTID, | ||
STORAGE_BUCKET: process.env.REACT_APP_STORAGE_BUCKET, | ||
SENDERID: process.env.REACT_APP_SENDERID, | ||
APPID: process.env.REACT_APP_APPID, | ||
} | ||
|
||
|
||
export default Config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
import React, { createContext, useEffect, useState } from 'react' | ||
import { useNavigate } from 'react-router-dom'; | ||
import {signInWithPopup, signOut} from 'firebase/auth' | ||
import {auth, provider} from '../pages/AuthGuard/Firebase' | ||
import {toast} from 'react-toastify' | ||
|
||
|
||
export const StoreContext=createContext(null); | ||
|
||
const ContextAPI = (props) => { | ||
const[loading, setLoading]=useState(false); | ||
const[userEmail, setUserEmail]=useState(null); | ||
const[token, setToken]=useState(" "); | ||
const navigate=useNavigate(); | ||
|
||
const handleGoogleSignIn = async () => { | ||
setLoading(true); | ||
await signInWithPopup(auth, provider) | ||
.then((result) => { | ||
setLoading(false); | ||
const user = result.user; | ||
const { email, refreshToken } = user; | ||
|
||
setToken(refreshToken || token); | ||
setUserEmail(email); | ||
|
||
toast.success("Registered Successfully!", { | ||
position: "top-left", | ||
theme: "dark", | ||
}); | ||
navigate("/"); | ||
}) | ||
.catch((error) => { | ||
setLoading(false); | ||
toast.error(`${error.message}`, { | ||
position: "top-left", | ||
autoClose: 5000, | ||
theme: "dark", | ||
}); | ||
}); | ||
}; | ||
|
||
const handleLogout = async () => { | ||
await signOut(auth) | ||
.then(() => { | ||
setToken(localStorage.removeItem("token")); | ||
setUserEmail(""); | ||
toast.success("Logged out!", { theme: "colored" }); | ||
navigate("/"); | ||
setTimeout(() => { | ||
window.location.reload(); | ||
}, 2000); | ||
}) | ||
.catch((error) => { | ||
toast.error(`${error.message}`, { theme: "colored" }); | ||
}); | ||
}; | ||
|
||
useEffect(()=>{ | ||
if(localStorage.getItem('token')){ | ||
setToken(localStorage.getItem('token')); | ||
} | ||
}, []) | ||
|
||
const ContextValue={ | ||
setLoading, loading, | ||
navigate, | ||
setToken, token, | ||
handleGoogleSignIn, handleLogout, | ||
userEmail, setUserEmail, | ||
} | ||
|
||
return ( | ||
<StoreContext.Provider value={ContextValue}> | ||
{props.children} | ||
</StoreContext.Provider> | ||
) | ||
} | ||
|
||
export default ContextAPI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import poster1 from '../assets/images/poster1.jpg'; | ||
import poster2 from '../assets/images/poster2.jpg'; | ||
import poster3 from '../assets/images/poster3.jpg'; | ||
import poster4 from '../assets/images/poster4.jpg'; | ||
import poster5 from '../assets/images/poster5.jpg'; | ||
|
||
import offer1 from '../assets/images/offer1.png'; | ||
import offer2 from '../assets/images/offer2.png'; | ||
import offer3 from '../assets/images/offer3.png'; | ||
import offer4 from '../assets/images/offer4.png'; | ||
import offer5 from '../assets/images/offer5.png'; | ||
|
||
import event1 from '../assets/images/eve.webp'; | ||
import event2 from '../assets/images/event.avif'; | ||
import event3 from '../assets/images/event2.avif'; | ||
import event4 from '../assets/images/events.avif'; | ||
import event5 from '../assets/images/events3.avif'; | ||
|
||
import show1 from '../assets/images/list.avif'; | ||
import show2 from '../assets/images/list2.avif'; | ||
import sport from '../assets/images/sport.avif'; | ||
import stream1 from '../assets/images/stream.webp'; | ||
import stream2 from '../assets/images/streams.webp'; | ||
import linkedin_icon from '../assets/images/linkedin_icon.png' | ||
import facebook_icon from '../assets/images/facebook_icon.png' | ||
import twitter_icon from '../assets/images/twitter_icon.png' | ||
|
||
export const assets={ | ||
poster1,poster2,poster3,poster4,poster5, | ||
offer1,offer2,offer3,offer4,offer5, | ||
event1, event2,event3,event4,event5, | ||
show1,show2, sport,stream1,stream2, | ||
linkedin_icon,facebook_icon,twitter_icon, | ||
}; |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* MovieList.css */ | ||
|
||
.event-wrapper{ | ||
display: flex; | ||
flex-direction: column; | ||
gap: 25px; | ||
margin: 8.5rem ; | ||
align-items: center; | ||
justify-content: flex-start; | ||
} | ||
.event-wrapper .event-header{ | ||
align-self: self-start; | ||
font-size: 3.34rem; | ||
color: #c31210; | ||
} | ||
.movie-list { | ||
display: flex; | ||
overflow-x: auto; | ||
scroll-snap-type: x mandatory; | ||
gap: 10px; | ||
padding: 10px; | ||
} | ||
|
||
.movie-list::-webkit-scrollbar { | ||
display: none; | ||
} | ||
|
||
.movie-list > div { | ||
flex: 0 0 calc(20% - 10px); | ||
scroll-snap-align: start; | ||
} | ||
|
Oops, something went wrong.