Fakultas Ilmu Komputer UI
Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Functional Programming
Diskuy-Frontend
Commits
0826b12d
Commit
0826b12d
authored
Feb 22, 2021
by
Jonathan
Browse files
Merge branch 'master' into 'jonathan'
# Conflicts: # public/index.html
parents
6be604ad
8038ba9b
Changes
6
Hide whitespace changes
Inline
Side-by-side
public/index.html
View file @
0826b12d
...
...
@@ -11,7 +11,7 @@
<meta
name=
"theme-color"
content=
"#000000"
/>
<meta
name=
"description"
content=
"Forum based website created for Functional Programming course
s
project"
content=
"Forum based website created for Functional Programming course project"
/>
<link
rel=
"apple-touch-icon"
href=
"%PUBLIC_URL%/logo192.png"
/>
<!--
...
...
src/components/thread/Post.jsx
View file @
0826b12d
...
...
@@ -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"
>
...
...
src/components/topic/CreateTopicForm.jsx
View file @
0826b12d
/* eslint-disable eqeqeq */
import
axios
from
'
axios
'
;
import
React
,
{
useState
}
from
'
react
'
;
import
{
useInput
}
from
'
../../helpers/hooks/input-hook
'
;
...
...
src/components/topic/Topic.jsx
View file @
0826b12d
/* eslint-disable eqeqeq */
import
React
,
{
useEffect
,
useState
}
from
'
react
'
;
import
axios
from
'
axios
'
;
import
ThreadList
from
'
../thread/ThreadList
'
;
...
...
src/components/topic/TopicList.jsx
View file @
0826b12d
/* eslint-disable eqeqeq */
import
React
,
{
useEffect
,
useState
}
from
'
react
'
;
import
axios
from
'
axios
'
;
import
{
Link
}
from
'
react-router-dom
'
;
...
...
src/helpers/services/authHeader.service.js
View file @
0826b12d
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
{};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment