Fakultas Ilmu Komputer UI

Commit 3f12e3fb authored by Jonathan Chandra's avatar Jonathan Chandra
Browse files

Merge branch 'master' of...

Merge branch 'master' of https://gitlab.cs.ui.ac.id/functional-programming/diskuy-frontend into jonathan
parents 71c6af8a 8977fd2b
......@@ -11,7 +11,7 @@
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Forum based website created for Functional Programming courses project"
content="Forum based website created for Functional Programming course project"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
......
......@@ -130,11 +130,7 @@ export default function Post(props) {
<div className="likeSection">
{loggedIn && (
<button className="likeButton" onClick={handleLike}>
{isLiked ? (
<i className="far fa-thumbs-up active" />
) : (
<i className="far fa-thumbs-up inactive" />
)}
<i className={`far fa-thumbs-up ${isLiked ? 'active' : 'inactive'}`} />
</button>
)}
<div className="pointContainer">
......
/* eslint-disable eqeqeq */
import axios from 'axios';
import React, { useState } from 'react';
import { useInput } from '../../helpers/hooks/input-hook';
......
/* eslint-disable eqeqeq */
import React, { useEffect, useState } from 'react';
import axios from 'axios';
import ThreadList from '../thread/ThreadList';
......
/* eslint-disable eqeqeq */
import React, { useEffect, useState } from 'react';
import axios from 'axios';
import { Link } from 'react-router-dom';
......
export default function authHeader() {
const user = JSON.parse(localStorage.getItem('user'));
if (user && user.tokenId)
return { Authorization: `Bearer ${user.accessToken}` };
else if (user && user.data.token)
if (user?.tokenId)
return { Authorization: `Bearer ${user?.accessToken}` };
else if (user?.data?.token)
// kalo make google
return { Authorization: `Bearer ${user.data.token}` };
return { Authorization: `Bearer ${user?.data.token}` };
// if (user && user.token)
// return { Authorization: `Bearer ${user.token}` }
else return {};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment