Skip to content

Commit

Permalink
Merge pull request #43 from BerkeAras/feature/41
Browse files Browse the repository at this point in the history
Bug/41
  • Loading branch information
BerkeAras authored May 1, 2021
2 parents 694924d + c6d3d1e commit a82615a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class App extends React.Component {
<Route exact path="/logout">
<LogOut />
</Route>
<Route path="/user/:email">
<Route path="/app/user/:email">
<User />
</Route>
</React.Fragment>
Expand Down
2 changes: 1 addition & 1 deletion src/components/HeaderDropdown/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class HeaderDropdown extends React.Component {
render() {
return (
<div className="header__dropdown">
<NavLink exact className="header__dropdown-item" activeClassName="header__dropdown-item--active" to={'/user/' + localStorage.getItem('user_email')}>
<NavLink exact className="header__dropdown-item" activeClassName="header__dropdown-item--active" to={'/app/user/' + localStorage.getItem('user_email')}>
My Account
</NavLink>
<NavLink exact className="header__dropdown-item" activeClassName="header__dropdown-item--active" to="/app/today">
Expand Down
6 changes: 3 additions & 3 deletions src/components/_App_CommentSection/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,12 @@ class CommentSection extends React.Component {
return (
<Comment key={comment.id}>
{comment.avatar == '' ? (
<Comment.Avatar href={'/user/' + comment.email} src={unknownAvatar} />
<Comment.Avatar href={'/app/user/' + comment.email} src={unknownAvatar} />
) : (
<Comment.Avatar href={'/user/' + comment.email} src={process.env.REACT_APP_API_URL + '/' + comment.avatar.replace('./', '')} />
<Comment.Avatar href={'/app/user/' + comment.email} src={process.env.REACT_APP_API_URL + '/' + comment.avatar.replace('./', '')} />
)}
<Comment.Content>
<Comment.Author href={'/user/' + comment.email}>{comment.name}</Comment.Author>
<Comment.Author href={'/app/user/' + comment.email}>{comment.name}</Comment.Author>
<Comment.Metadata>
<span>{this.getDate(comment.created_at)}</span>
</Comment.Metadata>
Expand Down
4 changes: 2 additions & 2 deletions src/components/_App_PostList/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -294,12 +294,12 @@ class PostsList extends React.Component {
{this.state.items.map((item) => (
<React.Fragment key={item.id}>
<Feed.Event>
<Feed.Label className="user-avatar" href={'/user/' + item.email}>
<Feed.Label className="user-avatar" href={'/app/user/' + item.email}>
{item.avatar == '' ? <img src={unknownAvatar} /> : <img src={process.env.REACT_APP_API_URL + '/' + item.avatar.replace('./', '')} />}
</Feed.Label>
<Feed.Content>
<Feed.Summary>
<Feed.User href={'/user/' + item.email}>{item.name}</Feed.User>
<Feed.User href={'/app/user/' + item.email}>{item.name}</Feed.User>
<Feed.Date>{this.getDate(item.created_at)}</Feed.Date>
</Feed.Summary>
<Feed.Extra text>
Expand Down
9 changes: 5 additions & 4 deletions src/components/_Header_Searchfield/index.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { useState, useEffect } from 'react'
import { Input, Form } from 'semantic-ui-react'
import { BrowserRouter as Router, Switch, Route, Link, Redirect } from 'react-router-dom'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { library } from '@fortawesome/fontawesome-svg-core'
import { faUser, faUsers, faCalendarDay, faHashtag } from '@fortawesome/free-solid-svg-icons'
Expand Down Expand Up @@ -87,9 +88,9 @@ const SearchField = () => {
{userResult.map((user) => {
return (
<li key={user.id}>
<a href="#">
<Link to={'/app/user/' + user.email}>
<FontAwesomeIcon icon="user" /> {user.name} <small>Rechtsabteilung</small>
</a>
</Link>
</li>
)
})}
Expand All @@ -101,9 +102,9 @@ const SearchField = () => {
{topicResult.map((topic) => {
return (
<li key={topic.id}>
<a href="#">
<Link to={'/app/topics/' + topic.topic}>
<FontAwesomeIcon icon="hashtag" /> {topic.topic}
</a>
</Link>
</li>
)
})}
Expand Down

0 comments on commit a82615a

Please sign in to comment.