Fakultas Ilmu Komputer UI

Commit 8038ba9b authored by FadhilP's avatar FadhilP
Browse files

refactor

parent ce4c227a
...@@ -130,11 +130,7 @@ export default function Post(props) { ...@@ -130,11 +130,7 @@ export default function Post(props) {
<div className="likeSection"> <div className="likeSection">
{loggedIn && ( {loggedIn && (
<button className="likeButton" onClick={handleLike}> <button className="likeButton" onClick={handleLike}>
{isLiked ? ( <i className={`far fa-thumbs-up ${isLiked ? 'active' : 'inactive'}`} />
<i className="far fa-thumbs-up active" />
) : (
<i className="far fa-thumbs-up inactive" />
)}
</button> </button>
)} )}
<div className="pointContainer"> <div className="pointContainer">
......
/* eslint-disable eqeqeq */
import axios from 'axios'; import axios from 'axios';
import React, { useState } from 'react'; import React, { useState } from 'react';
import { useInput } from '../../helpers/hooks/input-hook'; import { useInput } from '../../helpers/hooks/input-hook';
......
/* eslint-disable eqeqeq */
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';
import axios from 'axios'; import axios from 'axios';
import ThreadList from '../thread/ThreadList'; import ThreadList from '../thread/ThreadList';
......
/* eslint-disable eqeqeq */
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';
import axios from 'axios'; import axios from 'axios';
import { Link } from 'react-router-dom'; import { Link } from 'react-router-dom';
......
Supports Markdown
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