👌 IMPROVE: Changements URL /profile en /users
This commit is contained in:
@ -28,11 +28,11 @@ const CommentCard = forwardRef((props, ref) => {
|
||||
<div ref={ref} className="CommentCard col-24">
|
||||
<div className="CommentCard__container">
|
||||
<div className="row">
|
||||
<Link href={"/profile/[name]"} as={`/profile/${props.user.name}`}>
|
||||
<Link href={"/users/[name]"} as={`/users/${props.user.name}`}>
|
||||
<img className="CommentCard__user-logo" src={API_URL + props.user.logo} alt={props.user.name} />
|
||||
</Link>
|
||||
<span className="CommentCard__message-info">
|
||||
<Link href={"/profile/[name]"} as={`/profile/${props.user.name}`}>
|
||||
<Link href={"/users/[name]"} as={`/users/${props.user.name}`}>
|
||||
<a>{props.user.name}</a>
|
||||
</Link>
|
||||
- {date.format(new Date(props.createdAt), 'DD/MM/YYYY à HH:mm', true)}
|
||||
|
@ -40,14 +40,14 @@ export default function Header() {
|
||||
{
|
||||
(!isAuth) ?
|
||||
<Fragment>
|
||||
<NavigationLink name="S'inscrire" path="/register" />
|
||||
<NavigationLink name="Connexion" path="/login" />
|
||||
<NavigationLink name="S'inscrire" path="/users/register" />
|
||||
<NavigationLink name="Connexion" path="/users/login" />
|
||||
</Fragment>
|
||||
:
|
||||
<Fragment>
|
||||
<li className="navbar-item">
|
||||
<Link href={"/profile/[name]"} as={`/profile/${user.name}`}>
|
||||
<a className={`navbar-link ${pathname === "/profile/[name]" ? "navbar-link-active" : null}`}>Mon Profil</a>
|
||||
<Link href={"/users/[name]"} as={`/users/${user.name}`}>
|
||||
<a className={`navbar-link ${pathname === "/users/[name]" ? "navbar-link-active" : null}`}>Mon Profil</a>
|
||||
</Link>
|
||||
</li>
|
||||
<li className="navbar-item">
|
||||
|
@ -85,7 +85,7 @@ const manageQuotes = (props) => {
|
||||
<td className="table-row text-center">{currentQuote.quote}</td>
|
||||
<td className="table-row text-center">{currentQuote.author}</td>
|
||||
<td className="table-row text-center">
|
||||
<Link href={"/profile/[name]"} as={`/profile/${currentQuote.user.name}`}>
|
||||
<Link href={"/users/[name]"} as={`/users/${currentQuote.user.name}`}>
|
||||
<a>{currentQuote.user.name}</a>
|
||||
</Link>
|
||||
</td>
|
||||
|
@ -130,7 +130,7 @@ const QuoteList = () => {
|
||||
<td className="table-row text-center">{currentQuote.quote}</td>
|
||||
<td className="table-row text-center">{currentQuote.author}</td>
|
||||
<td className="table-row text-center">
|
||||
<Link href={"/profile/[name]"} as={`/profile/${currentQuote.user.name}`}>
|
||||
<Link href={"/users/[name]"} as={`/users/${currentQuote.user.name}`}>
|
||||
<a>{currentQuote.user.name}</a>
|
||||
</Link>
|
||||
</td>
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { Fragment, useState } from 'react';
|
||||
import htmlParser from 'html-react-parser';
|
||||
import Loader from '../components/Loader';
|
||||
import HeadTag from '../components/HeadTag';
|
||||
import api from '../utils/api';
|
||||
import withoutAuth from '../hoc/withoutAuth';
|
||||
import '../public/css/pages/register-login.css';
|
||||
import Loader from '../../components/Loader';
|
||||
import HeadTag from '../../components/HeadTag';
|
||||
import api from '../../utils/api';
|
||||
import withoutAuth from '../../hoc/withoutAuth';
|
||||
import '../../public/css/pages/register-login.css';
|
||||
|
||||
const forgotPassword = () => {
|
||||
|
@ -2,11 +2,11 @@ import { Fragment, useContext, useState } from 'react';
|
||||
import { useRouter } from 'next/router';
|
||||
import Link from 'next/link';
|
||||
import htmlParser from 'html-react-parser';
|
||||
import Loader from '../components/Loader';
|
||||
import HeadTag from '../components/HeadTag';
|
||||
import { UserContext } from '../contexts/UserContext';
|
||||
import withoutAuth from '../hoc/withoutAuth';
|
||||
import '../public/css/pages/register-login.css';
|
||||
import Loader from '../../components/Loader';
|
||||
import HeadTag from '../../components/HeadTag';
|
||||
import { UserContext } from '../../contexts/UserContext';
|
||||
import withoutAuth from '../../hoc/withoutAuth';
|
||||
import '../../public/css/pages/register-login.css';
|
||||
|
||||
const Login = () => {
|
||||
|
@ -1,11 +1,11 @@
|
||||
import { Fragment, useState } from 'react';
|
||||
import htmlParser from 'html-react-parser';
|
||||
import Loader from '../components/Loader';
|
||||
import HeadTag from '../components/HeadTag';
|
||||
import api from '../utils/api';
|
||||
import redirect from '../utils/redirect';
|
||||
import withoutAuth from '../hoc/withoutAuth';
|
||||
import '../public/css/pages/register-login.css';
|
||||
import Loader from '../../components/Loader';
|
||||
import HeadTag from '../../components/HeadTag';
|
||||
import api from '../../utils/api';
|
||||
import redirect from '../../utils/redirect';
|
||||
import withoutAuth from '../../hoc/withoutAuth';
|
||||
import '../../public/css/pages/register-login.css';
|
||||
|
||||
const newPassword = (props) => {
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { Fragment, useState } from 'react';
|
||||
import htmlParser from 'html-react-parser';
|
||||
import Loader from '../components/Loader';
|
||||
import HeadTag from '../components/HeadTag';
|
||||
import api from '../utils/api';
|
||||
import withoutAuth from '../hoc/withoutAuth';
|
||||
import '../public/css/pages/register-login.css';
|
||||
import Loader from '../../components/Loader';
|
||||
import HeadTag from '../../components/HeadTag';
|
||||
import api from '../../utils/api';
|
||||
import withoutAuth from '../../hoc/withoutAuth';
|
||||
import '../../public/css/pages/register-login.css';
|
||||
|
||||
const Register = () => {
|
||||
|
Reference in New Issue
Block a user