Skip to content

Commit

Permalink
FIX console errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dolf321 committed Jul 21, 2023
1 parent 4fc636d commit ae75c36
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions web/src/components/forums/Editor/Toolbar/Embed/EmbedImage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default function EmbedImage({embedImage}) {
const uploadImage = (file) => {
const data = new FormData();
data.append('file', file);
axios.post(`/api/public/forums/post/image`, data)
axios.post(`/api/public/forums/image`, data)
.then((image_url) => {
// Wait for image url of uploaded image to be returned
return image_url.data;
Expand All @@ -54,7 +54,7 @@ export default function EmbedImage({embedImage}) {
const reader = new FileReader();
reader.readAsDataURL(file);
reader.onloadend = () => {
// const image_url = uploadImage(file);
const image_url = uploadImage(file);
embedImage(image_url);
};
closeModal();
Expand Down
8 changes: 4 additions & 4 deletions web/src/components/forums/Post/Post.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,19 @@ export default function Post({
{user[0]}
</Typography>
</Box>
<Typography className={classes.user}>
<Typography className={classes.User}>
{user}
</Typography>
<Typography className={classes.whenPosted}>
posted {toRelativeDate(new Date(createdDate))}
</Typography>
</Box>
<Typography className={classes.title}>
<Typography className={classes.Title}>
{title}
</Typography>
<Typography className={classes.content}>
<Box className={classes.content}>
<RichTextEditor content={content} readOnly={true} enableToolbar={false}/>
</Typography>
</Box>
<Box className={classes.extraInfo}>
<Box className={classes.infoToolbar}>
<Box className={classes.infoContainer}>
Expand Down
4 changes: 2 additions & 2 deletions web/src/components/forums/Post/Post.styles.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ export const useStyles = makeStyles((theme) => ({
width: '30px',
height: '30px',
},
user: {
User: {

},
whenPosted: {
opacity: '.7',
},
title: {
Title: {
width: '100%',
fontSize: '28px',
fontWeight: '600',
Expand Down

0 comments on commit ae75c36

Please sign in to comment.