Skip to content

Commit

Permalink
Revert "(enhancement) Update activities feature flow (unstructuredstu…
Browse files Browse the repository at this point in the history
…dio#885)" (unstructuredstudio#986)

This reverts commit 1b996f2.
  • Loading branch information
tuxology authored Oct 31, 2023
1 parent 995af0f commit 4b601fa
Show file tree
Hide file tree
Showing 16 changed files with 1,075 additions and 972 deletions.
4 changes: 2 additions & 2 deletions zubhub_backend/zubhub/activities/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

urlpatterns = [
path('', PublishedActivitiesAPIView.as_view(), name='index'),
path('un-published', UnPublishedActivitiesAPIView.as_view(), name='unPublished'),
path('my-activities', UserActivitiesAPIView.as_view(), name='myActivities'),
path('unPublished', UnPublishedActivitiesAPIView.as_view(), name='unPublished'),
path('myActivities', UserActivitiesAPIView.as_view(), name='myActivities'),
path('create/', ActivityCreateAPIView.as_view(), name='create'),
path('<uuid:pk>/update/', ActivityUpdateAPIView.as_view(), name='update'),
path('<uuid:pk>/delete/', ActivityDeleteAPIView.as_view(), name='delete'),
Expand Down
55 changes: 42 additions & 13 deletions zubhub_frontend/zubhub/src/App.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import React, { useContext, useEffect, useState } from 'react';
import React, { useContext } from 'react';
import { withTranslation } from 'react-i18next';
import { BrowserRouter as Router, Route, Redirect, Switch } from 'react-router-dom';
import CreateActivity from './views/create_activity/CreateActivity';
import { useEffect } from 'react';
import { connect } from 'react-redux';
import { updateTheme } from './theme';
import LoadingPage from './views/loading/LoadingPage';
import PageWrapper from './views/PageWrapper';
import ProtectedRoute from './components/protected_route/ProtectedRoute';
import ZubhubAPI from '../src/api/api';
import { updateTheme } from './theme';
import ScrollToTop from './ScrollToTop';

const SearchResults = React.lazy(() => import('./views/search_results/SearchResults'));

const Signup = React.lazy(() => import('./views/signup/Signup'));
const Login = React.lazy(() => import('./views/login/Login'));

const CreateEditActivity = React.lazy(() => import('./views/create_activity/CreateEditActivity'));
const PasswordReset = React.lazy(() => import('./views/password_reset/PasswordReset'));
const PasswordResetConfirm = React.lazy(() => import('./views/password_reset_confirm/PasswordResetConfirm'));
const EmailConfirm = React.lazy(() => import('./views/email_confirm/EmailConfirm'));
Expand Down Expand Up @@ -43,7 +43,6 @@ const CreateProject = React.lazy(() => import('./views/create_project/CreateProj
const ProjectDetails = React.lazy(() => import('./views/project_details/ProjectDetails'));
const StaffPickDetails = React.lazy(() => import('./views/staff_pick_details/StaffPickDetails'));
const Activities = React.lazy(() => import('./views/activities/activities'));
const MyActivities = React.lazy(() => import('./views/my_activities/MyActivities'));
const ActivityDetails = React.lazy(() => import('./views/activity_details/ActivityDetailsV2'));
const CreateTeam = React.lazy(() => import('./views/create_team/CreateTeam'));
const LinkedProjects = React.lazy(() => import('./views/linked_projects/LinkedProjects'));
Expand Down Expand Up @@ -119,13 +118,23 @@ function App(props) {
</PageWrapper>
)}
/> */}

<ProtectedRoute path="/settings" component={Settings} {...props} />

<Route
path="/search"
path="/activities/create"
render={routeProps => (
<PageWrapper {...routeProps} {...props}>
<LazyImport LazyComponent={SearchResults} {...routeProps} {...props} />
<LazyImport LazyComponent={CreateActivity} {...routeProps} {...props} />
</PageWrapper>
)}
/>

<Route
path="/activities/:id/linkedProjects"
render={routeProps => (
<PageWrapper {...routeProps} {...props}>
<LazyImport LazyComponent={LinkedProjects} {...routeProps} {...props} />
</PageWrapper>
)}
/>
Expand Down Expand Up @@ -448,12 +457,32 @@ function App(props) {
)}
/>

<ProtectedRoute path="/activities/create" component={CreateEditActivity} {...props} />
<ProtectedRoute path="/activities/my-activities" component={MyActivities} {...props} />
<ProtectedRoute path="/activities/:id/linked-projects" component={LinkedProjects} {...props} />
<ProtectedRoute path="/activities/:id/edit" component={CreateEditActivity} {...props} editting />
<ProtectedRoute path="/activities/:id" component={ActivityDetails} {...props} />
<ProtectedRoute path="/activities" component={Activities} {...props} />
<Route
path="/activities/:id/edit"
render={routeProps => (
<PageWrapper {...routeProps} {...props}>
<LazyImport LazyComponent={CreateActivity} {...routeProps} {...props} />
</PageWrapper>
)}
/>

<Route
path="/activities/:id"
render={routeProps => (
<PageWrapper {...routeProps} {...props}>
<LazyImport LazyComponent={ActivityDetails} {...routeProps} {...props} />
</PageWrapper>
)}
/>

<Route
path="/activities"
render={routeProps => (
<PageWrapper {...routeProps} {...props}>
<LazyImport LazyComponent={Activities} {...routeProps} {...props} />
</PageWrapper>
)}
/>

<Route
path="/create-team"
Expand Down
Loading

0 comments on commit 4b601fa

Please sign in to comment.