Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

route changed #30

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
} from './routes';
import AddNewProjectModal from './components/AddNewProjectModal';
import FAQ from './pages/FAQ';
import ProjectContent from './components/ProjectContent';

function App() {
return (
Expand All @@ -33,7 +34,9 @@ function App() {
<Route path={ABOUT_ROUTE} element={<About />} />
<Route path={CONTACT_ROUTE} element={<Contact />} />
<Route path={LOGIN_ROUTE} element={<Login />} />
<Route path={PROJECT_ROUTE} element={<Project />} />
<Route path={PROJECT_ROUTE} element={<Project />}>
<Route path=":pId" element={ProjectContent} />
</Route>
<Route path={SIGN_UP_ROUTE} element={<SignUp />} />
<Route path={POSTS_ROUTE} element={<Posts />} />
<Route path={FAQS_ROUTE} element={<FAQ />} />
Expand Down
2 changes: 1 addition & 1 deletion src/components/ProjectContent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function ProjectContent({ title, type, address, date, pic, skills, isOpen }) {
/>
<div className="flex flex-col">
<h1 className="text-center sm:text-center md:text-left lg:text-left text-2xl text-blue-600 py-3 font-normal">
Name: {title}
{title.toUpperCase()}
</h1>
<span className="text-blue-600 text-center sm:text-center md:text-left lg:text-left">
Deadline: {date.slice(0, 10)}
Expand Down
1 change: 0 additions & 1 deletion src/pages/Project/Project.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ function Project() {
const project = useSelector((state) => state.projects.list);
/* eslint no-underscore-dangle: 0 */
const filteredP = project.filter((x) => x._id === params.pId).map((p) => p);

return (
<div className="container mx-auto px-8 py-6">
{filteredP.map((p) => {
Expand Down
Loading