Skip to content

Commit

Permalink
Merge branch 'prod' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Ravi Maurya authored Apr 7, 2023
2 parents c375b3e + f624922 commit d152d8f
Show file tree
Hide file tree
Showing 16 changed files with 12,778 additions and 40 deletions.
2 changes: 1 addition & 1 deletion new_client/.env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
REACT_APP_API=http://localhost:8000/api
REACT_APP_API=https://www.communityofcoders.in/server/api
3 changes: 2 additions & 1 deletion new_client/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ node_modules
*.webp
*.ttf
*.jpeg
*.pdf
*.pdf
yarn.lock
2 changes: 1 addition & 1 deletion new_client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,4 @@
"prettier": "2.2.1",
"sass": "^1.49.7"
}
}
}
Binary file added new_client/public/coc.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion new_client/src/components/blogs/AddBlog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function AddBlog(props) {
})
.catch((err) => console.log(err));
}
});
}, [isEditPage, props.username]);

useEffect(() => {
if (isEditPage) {
Expand Down
16 changes: 3 additions & 13 deletions new_client/src/components/blogs/Blog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,17 +118,7 @@ const Blogs = (props) => {
});
};

let addBlogFab = (
<Grid item style={{ position: "fixed", right: "50px", bottom: "25px" }}>
<Tooltip title="Login Required" aria-label="add">
<span>
<Fab color="secondary" disabled>
<AddIcon />
</Fab>
</span>
</Tooltip>
</Grid>
);
let addBlogFab;

if (props.isAuthenticated) {
addBlogFab = (
Expand All @@ -148,7 +138,7 @@ const Blogs = (props) => {

if (!isLoading) {
blogComponent = posts.map((article) => (
<Grid item xs={6} key={article._id}>
<Grid item xs={12} md={6} lg={6} key={article._id}>
<Card>
<CardHeader
title={article.blogTitle}
Expand Down Expand Up @@ -214,7 +204,7 @@ const Blogs = (props) => {

return (
<div className={classes.root}>
<Container maxWidth="md">
<Container maxWidth="lg">
<Grid container spacing={3}>
{blogComponent}
{addBlogFab}
Expand Down
9 changes: 5 additions & 4 deletions new_client/src/components/events/EventList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import Banner from "./Banner";
import { isFuture } from "date-fns";
import { TitleWithDivider } from "./EventPage";
import useAuthenticatedAxios from "../Utilities/useAuthenticatedAxios.js";
import "./EventList.css";
import { format } from "date-fns";

function TabPanel(props) {
Expand Down Expand Up @@ -159,7 +160,7 @@ function EventList(props) {
},
{
label: "Cancel",
onClick: () => {},
onClick: () => { },
},
],
});
Expand All @@ -177,9 +178,9 @@ function EventList(props) {
try {
const url = !isUserRegistered
? process.env.REACT_APP_API +
`/events/register?eid=${eventId}&uid=${props.userID}`
`/events/register?eid=${eventId}&uid=${props.userID}`
: process.env.REACT_APP_API +
`/events/unregister?eid=${eventId}&uid=${props.userID}`;
`/events/unregister?eid=${eventId}&uid=${props.userID}`;
const response = await authenticatedAxios.post(url);
if (response.status === 200) {
const isRegisteredTemp = {
Expand Down Expand Up @@ -278,7 +279,7 @@ function EventList(props) {
</Tabs>
</Grid>
</Grid>

<Grid item>
{years.map((year, index) => (
<TabPanel key={year} value={tabValue} index={index}>
Expand Down
2 changes: 1 addition & 1 deletion new_client/src/components/glimpses/Glimpse.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const Glimpse = () => {
<Grid container spacing={4}>
{isLoading ? <Spinner /> : null}
{glimpses.map((glimpse) => (
<Grid item xs={6} md={6} lg={4} key={glimpse._id}>
<Grid item xs={12} md={6} lg={4} key={glimpse._id}>
<IndividualGlimpse
imgSrc={glimpse.preview}
title={glimpse.eventName}
Expand Down
Loading

0 comments on commit d152d8f

Please sign in to comment.