From 3735be3e9b46e16fb7e9a4c01c40f7ed2228702c Mon Sep 17 00:00:00 2001 From: Tushar3099 Date: Wed, 10 Jun 2020 22:06:19 +0530 Subject: [PATCH] final changes --- Client/package-lock.json | 14 ++ Client/src/App.js | 83 ++++++-- Client/src/components/AddSong.js | 49 +++++ Client/src/components/ListItems.js | 4 +- Client/src/components/LoginPage.js | 77 +++++-- Client/src/components/ModList.js | 18 ++ Client/src/components/ModeratorPage.js | 46 ++++ Client/src/components/Navbar.js | 154 ++++++++------ Client/src/components/Playlist.js | 103 +++------ Client/src/components/PlaylistPage.js | 121 +++++++---- Client/src/components/Rating.js | 94 --------- Client/src/components/Reviews.js | 21 +- Client/src/components/Sidebar.js | 128 ++++++++---- Client/src/components/SignupPage.js | 159 ++++++++++---- Client/src/components/SongPage.js | 202 +++++++++++------- Client/src/components/Upload.js | 46 ++-- Client/src/components/demo.js | 160 +++++++------- Client/src/components/home.js | 69 ++++++ Client/src/components/search.js | 92 ++++---- Client/src/components/songlist.js | 51 +++++ Client/src/components/testsongs.js | 90 -------- Client/src/songContext.js | 16 ++ Client/src/stylesheet/addsong.css | 133 ++++++++++++ Client/src/stylesheet/loginpage.css | 70 +++++-- Client/src/stylesheet/moderatorpage.css | 114 ++++++++++ Client/src/stylesheet/navbar.css | 262 +++++++++++------------ Client/src/stylesheet/playlist.css | 74 +++---- Client/src/stylesheet/reviews.css | 71 +++++-- Client/src/stylesheet/search.css | 265 ++++++++++++------------ Client/src/stylesheet/sidebar.css | 244 +++++++++++----------- Client/src/stylesheet/signuppage.css | 143 ++++++++----- Client/src/stylesheet/songpage.css | 263 ++++++++++++----------- Client/src/stylesheet/styles.css | 3 +- Client/src/stylesheet/upload.css | 10 +- Client/src/userContext.js | 40 ++-- package-lock.json | 110 ---------- 36 files changed, 2101 insertions(+), 1498 deletions(-) create mode 100644 Client/src/components/AddSong.js create mode 100644 Client/src/components/ModList.js create mode 100644 Client/src/components/ModeratorPage.js delete mode 100644 Client/src/components/Rating.js create mode 100644 Client/src/components/home.js create mode 100644 Client/src/components/songlist.js delete mode 100644 Client/src/components/testsongs.js create mode 100644 Client/src/songContext.js create mode 100644 Client/src/stylesheet/addsong.css create mode 100644 Client/src/stylesheet/moderatorpage.css delete mode 100644 package-lock.json diff --git a/Client/package-lock.json b/Client/package-lock.json index 2b506d6e..eab99421 100644 --- a/Client/package-lock.json +++ b/Client/package-lock.json @@ -3550,6 +3550,11 @@ } } }, + "classnames": { + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz", + "integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q==" + }, "clean-css": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.3.tgz", @@ -11056,6 +11061,15 @@ "workbox-webpack-plugin": "4.3.1" } }, + "react-star-rating-component": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/react-star-rating-component/-/react-star-rating-component-1.4.1.tgz", + "integrity": "sha512-i0YEvQzToS0s0GDkxn01Jy4EeLpVEyh023NXJTJ+/1+xkvhpACyD4d1YeBhYWZab53ppUnUxs5gmp75gJr3khA==", + "requires": { + "classnames": "^2.2.5", + "prop-types": "^15.6.1" + } + }, "react-transition-group": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-1.2.1.tgz", diff --git a/Client/src/App.js b/Client/src/App.js index cc42d18b..abd0f7b5 100644 --- a/Client/src/App.js +++ b/Client/src/App.js @@ -1,5 +1,5 @@ -import React from "react"; -import { BrowserRouter, Route, Switch } from "react-router-dom"; +import React, { useContext } from "react"; +import { BrowserRouter, Route, Switch, Redirect } from "react-router-dom"; import "./stylesheet/styles.css"; import "./stylesheet/sidebar.css"; import "./stylesheet/playlist.css"; @@ -10,39 +10,80 @@ import "./stylesheet/profilepage.css"; import "./stylesheet/search.css"; import "./stylesheet/loginpage.css"; import "./stylesheet/signuppage.css"; +import "./stylesheet/moderatorpage.css"; +import AddSong from "./components/AddSong"; +import ModeratorPage from "./components/ModeratorPage"; +import Home from "./components/home"; +import "./stylesheet/addsong.css"; import Sidebar from "./components/Sidebar"; import Navbar from "./components/Navbar"; import PlaylistPage from "./components/PlaylistPage"; import SongPage from "./components/SongPage"; import ProfilePage from "./components/ProfilePage"; -import Search from "./components/search"; import LoginPage from "./components/LoginPage"; import SignupPage from "./components/SignupPage"; +import { UserProvider, UserContext } from "./userContext"; +import { SongProvider } from "./songContext"; + +const renderPlaylistPage = ({ match }) => { + const id = match.params.id; + return ; +}; +const renderSongPage = ({ match }) => { + const id = match.params.id; + return ; +}; + +const RenderUser = () => { + const [user, setUser] = useContext(UserContext); + if (user) + return ( + <> + +
+ + + + + + + +
+ + ); + + return ; +}; + +const RenderAuth = () => { + const [user, setUser] = useContext(UserContext); + if (!user) + return ( + <> + + + + + ); + + return ; +}; -import { UserProvider } from "./userContext"; const App = () => { return ( - - - -
- - -
- - - - - - - - + + + + +
+ +
+
+
-
- ); }; diff --git a/Client/src/components/AddSong.js b/Client/src/components/AddSong.js new file mode 100644 index 00000000..593f7f96 --- /dev/null +++ b/Client/src/components/AddSong.js @@ -0,0 +1,49 @@ +import React from 'react'; +import Upload from "./Upload"; +import '../stylesheet/upload.css'; + +const AddSong = () => { + + return( +
+

New Song

+
+

Song Cover

+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+