-
Notifications
You must be signed in to change notification settings - Fork 19
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
1 parent
eb42195
commit 3904de9
Showing
7 changed files
with
114 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
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,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; |
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,3 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; |
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,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> | ||
); | ||
|
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
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; |
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,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'; |