Skip to content

Commit

Permalink
bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Lvyshnevska committed Nov 13, 2023
1 parent 393c736 commit 3ff890d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions FrontEnd/src/components/ProfileDetail/ProfileDetailPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ import BannerImage from './BannerImage';
import classes from './ProfileDetailPage.module.css';

function ProfileDetailPage({ isAuthorized }) {
const authToken = localStorage.getItem('Token');
const { id } = useParams();
const urlProfile = `${process.env.REACT_APP_BASE_API_URL}/api/profiles/${id}`;

async function fetcher(url) {
const headers = {
'Content-Type': 'application/json',
};
if (isAuthorized) {
const authToken = localStorage.getItem('Token');
if (authToken) {
headers.Authorization = `Token ${authToken}`;
}
return fetch(url, {
Expand Down

0 comments on commit 3ff890d

Please sign in to comment.