Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
JyothiSwaroopReddy07 authored Oct 28, 2023
1 parent eb42195 commit 3904de9
Show file tree
Hide file tree
Showing 7 changed files with 114 additions and 0 deletions.
Empty file added src/App.css
Empty file.
77 changes: 77 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
import './App.css';
import Home from './Pages/Home/Home';
import Login from './Pages/Login/Login';
import Register from './Pages/Register/Register';
import ErrorPage from './Pages/ErrorPage/ErrorPage';
import AllArticlesPage from './Pages/AllArticlesPage/AllArticlesPage';
import Communities from './Pages/Communities/Communities';
import SubmitArticle from './Pages/SubmitArticle/SubmitArticle';
import SuccessfulSubmission from './Components/SuccessfulSubmission';
import SuccessfulRegistration from './Components/SuccessfulRegistration';
import CommunityCreation from './Components/CommunityCreation';
import CreateCommunity from './Pages/CreateCommunity/CreateCommunity';
import Notifications from './Pages/Notifications/Notifications';
import Feed from './Pages/Feed/Feed';
import CommunityPage from './Pages/CommunityPage/CommunityPage';
import JoinRequest from './Pages/JoinRequest/JoinRequest';
import SinglePost from './Pages/SinglePost/SinglePost';
import CommunityAdminPage from './Pages/CommunityAdminPage/CommunityAdminPage';
import Profile from './Pages/Profile/Profile';
import Timeline from './Pages/Timeline/Timeline';
import BookMarks from './Pages/Bookmarks/Bookmarks';
import ArticlePage from './Pages/ArticlePage/ArticlePage';
import FavouritePage from './Pages/FavouritePage/FavouritePage';
import MyPostsPage from './Pages/MyPostsPage/MyPostsPage';
import MyArticlesPage from './Pages/MyArticlesPage/MyArticlesPage';
import AuthorArticlePage from './Pages/AuthorArticlePage/AuthorArticlePage';
import CommunityArticlePage from './Pages/CommunityArticlePage/CommunityArticlePage';
import MyProfile from './Pages/MyProfile/MyProfile';
import ForgotPassword from './Pages/ForgotPassword/ForgotPassword';
import Verify from './Pages/Verify/Verify';
import PrivateRoute from './Pages/PrivateRoute/PrivateRoute';
// import AllMessages from './Pages/AllMessagesPage/AllMessagesPage';
import ChatPage from './Pages/ChatPage/ChatPage';
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';

function App() {
return (
<Router>
<Routes>
<Route path='/' element={<Home />} />
<Route path='/login' element={<Login />} />
<Route path='/register' element={<Register />} />
<Route path='/articles' element={<AllArticlesPage />} />
<Route path='/communities' element={<Communities/>}/>
<Route path='/submitarticle' element={<PrivateRoute redirectTo="/login" component={<SubmitArticle/>}/>}/>
<Route path='/articlesuccessfulsubmission' element={<PrivateRoute redirectTo="/login" component={<SuccessfulSubmission/>}/>}/>
<Route path='/registersuccessful' element={<PrivateRoute redirectTo="/login" component={<SuccessfulRegistration/>}/>}/>
<Route path='/createcommunity' element={<PrivateRoute redirectTo="/login" component={<CreateCommunity/>}/>}/>
<Route path='/communitysuccessfulcreated' element={<PrivateRoute redirectTo="/login" component={<CommunityCreation/>}/>}/>
<Route path='/notifications' element={<PrivateRoute redirectTo="/login" component={<Notifications/>}/>}/>
<Route path='/explore' element={<Feed/>}/>
<Route path='/mytimeline' element={<PrivateRoute redirectTo="/login" component={<Timeline/>}/>}/>
<Route path='/bookmarks' element={<PrivateRoute redirectTo="/login" component={<BookMarks/>}/>}/>
<Route path="/community/:communityName" element={<CommunityPage/>}/>
<Route path="/join-community/:communityName" element={<PrivateRoute redirectTo="/login" component={<JoinRequest/>}/>}/>
<Route path="/mycommunity" element={<PrivateRoute redirectTo="/login" component={<CommunityAdminPage/>}/>}/>
<Route path="/post/:postId" element={<SinglePost/>}/>
<Route path="/profile/:username" element={<Profile/>}/>
<Route path="/article/:articleId" element={<ArticlePage/>}/>
<Route path="/favourites" element={<PrivateRoute redirectTo="/login" component={<FavouritePage/>}/>} />
<Route path="/myposts" element={<PrivateRoute redirectTo="/login" component={<MyPostsPage/>}/>}/>
<Route path="/myarticles" element={<PrivateRoute redirectTo="/login" component={<MyArticlesPage/>}/>}/>
<Route path="/myarticles/:articleId" element={<PrivateRoute redirectTo="/login" component={<AuthorArticlePage/>} />}/>
{/* <Route path="/myactivity" element={<PrivateRoute redirectTo="/login" component={<UserActivity/>}/>}/> */}
<Route path="/community/:communityName/:articleId" element={<PrivateRoute redirectTo="/login" component={<CommunityArticlePage/>}/>}/>
<Route path="/chat/:id" element={<PrivateRoute redirectTo="/login" component={<ChatPage/>}/>}/>
{/* <Route path="/messages" element={<PrivateRoute redirectTo="/login" component={<AllMessages/>}/>}/> */}
<Route path="/myprofile" element={<PrivateRoute redirectTo="/login" component={<MyProfile/>}/>}/>
<Route path="/forgotpassword" element={<ForgotPassword/>}/>
<Route path="/verify" element={<Verify/>}/>
<Route path = "*" element={<ErrorPage/>} />
</Routes>
</Router>
);
}

export default App;
3 changes: 3 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
15 changes: 15 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import { AppProvider } from './Context/StateContext';

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<React.StrictMode>
<AppProvider>
<App />
</AppProvider>
</React.StrictMode>
);

1 change: 1 addition & 0 deletions src/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions src/reportWebVitals.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const reportWebVitals = onPerfEntry => {
if (onPerfEntry && onPerfEntry instanceof Function) {
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
getCLS(onPerfEntry);
getFID(onPerfEntry);
getFCP(onPerfEntry);
getLCP(onPerfEntry);
getTTFB(onPerfEntry);
});
}
};

export default reportWebVitals;
5 changes: 5 additions & 0 deletions src/setupTests.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// jest-dom adds custom jest matchers for asserting on DOM nodes.
// allows you to do things like:
// expect(element).toHaveTextContent(/react/i)
// learn more: https://github.com/testing-library/jest-dom
import '@testing-library/jest-dom';

0 comments on commit 3904de9

Please sign in to comment.