Skip to content

Commit 5033bd4

Browse files
committed
non-logged in users can see activity page
1 parent 7fdb08c commit 5033bd4

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed

zubhub_backend/zubhub/activities/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class ActivityDetailsAPIView(RetrieveAPIView):
4747

4848
queryset = Activity.objects.all()
4949
serializer_class = ActivitySerializer
50-
permission_classes = [IsAuthenticated]
50+
permission_classes = [AllowAny]
5151

5252
def get_object(self):
5353
queryset = self.get_queryset()

zubhub_frontend/zubhub/src/views/PageWrapper.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ function PageWrapper(props) {
245245
'/signup',
246246
'/login',
247247
'/projects/:id',
248+
'/activities/:id',
248249
'/ambassadors',
249250
'/creators/:username',
250251
'/privacy_policy',
@@ -267,6 +268,7 @@ function PageWrapper(props) {
267268
'/login',
268269
'/password-reset',
269270
'/projects/:id',
271+
'/activities/:id',
270272
'/ambassadors',
271273
'/creators/:username',
272274
'/privacy_policy',

zubhub_frontend/zubhub/src/views/activity_details/ActivityDetails.styles.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ export const activityDetailsStyles = theme => ({
77
},
88
[theme.breakpoints.down('xs')]: {
99
margin: '0 12px'
10+
},
11+
},
12+
signedOutMainContainer: {
13+
padding: '2em 12em',
14+
[theme.breakpoints.down('sm')]: {
15+
padding: '2em 0'
16+
},
17+
[theme.breakpoints.down('xs')]: {
18+
padding: '3em 0'
1019
}
1120
},
1221
card: {

zubhub_frontend/zubhub/src/views/activity_details/ActivityDetailsV2.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export default function ActivityDetailsV2(props) {
124124
});
125125

126126
return (
127-
<div ref={ref} className={classes.mainContainer}>
127+
<div ref={ref} className={clsx(classes.mainContainer, !auth?.token && classes.signedOutMainContainer)}>
128128
{open ? <ReactConfetti width={width} height={height} /> : null}
129129
<div className={classes.card}>
130130
<div className={classes.headerFlex}>

0 commit comments

Comments
 (0)