Skip to content

Commit fd7aab2

Browse files
Merge pull request #2109 from zetkin/main
240823 Release
2 parents 8d54989 + 13a6320 commit fd7aab2

File tree

6 files changed

+35
-20
lines changed

6 files changed

+35
-20
lines changed

next.config.js

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,6 @@ module.exports = {
3333
permanent: false,
3434
},
3535
// redirects to Gen2 for MVP August 2021
36-
{
37-
source: '/organize/:orgId/people/:personId/edit',
38-
destination: `http://organize.${process.env.ZETKIN_API_DOMAIN}/people/person%3A:personId/?org=:orgId`,
39-
permanent: false,
40-
},
4136
{
4237
source: '/organize/:orgId(\\d{1,})',
4338
destination: '/legacy?orgId=:orgId',
@@ -60,21 +55,6 @@ module.exports = {
6055
destination: '/legacy?path=/campaign/action%3A:eventId&orgId=:orgId',
6156
permanent: false,
6257
},
63-
{
64-
source: '/o/:orgId',
65-
destination: `http://${process.env.ZETKIN_API_DOMAIN}/o/:orgId`,
66-
permanent: false,
67-
},
68-
{
69-
source: '/o/:orgId/events/:eventId',
70-
destination: `http://${process.env.ZETKIN_API_DOMAIN}/o/:orgId`,
71-
permanent: false,
72-
},
73-
{
74-
source: '/o/:orgId/projects/:campId',
75-
destination: `http://${process.env.ZETKIN_API_DOMAIN}/o/:orgId/campaigns/:campId`,
76-
permanent: false,
77-
},
7858
{
7959
source: '/organize/:orgId/campaigns/:path*',
8060
destination: '/organize/:orgId/projects/:path*',
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { redirect } from 'next/navigation';
2+
3+
export default function Page({ params }: { params: { orgId: string } }) {
4+
redirect(`http://${process.env.ZETKIN_API_DOMAIN}/o/${params.orgId}`);
5+
}

src/app/o/[orgId]/page.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { redirect } from 'next/navigation';
2+
3+
export default function Page({ params }: { params: { orgId: string } }) {
4+
redirect(`http://${process.env.ZETKIN_API_DOMAIN}/o/${params.orgId}`);
5+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { redirect } from 'next/navigation';
2+
3+
export default function Page({
4+
params,
5+
}: {
6+
params: { orgId: string; projId: string };
7+
}) {
8+
const { orgId, projId } = params;
9+
redirect(
10+
`http://${process.env.ZETKIN_API_DOMAIN}/o/${orgId}/campaigns/${projId}`
11+
);
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { redirect } from 'next/navigation';
2+
3+
export default function Page({
4+
params,
5+
}: {
6+
params: { orgId: string; surveyId: string };
7+
}) {
8+
const { orgId, surveyId } = params;
9+
redirect(
10+
`http://${process.env.ZETKIN_API_DOMAIN}/o/${orgId}/surveys/${surveyId}`
11+
);
12+
}

src/features/calendar/components/CalendarWeekView/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ const CalendarWeekView = ({ focusDate, onClickDay }: CalendarWeekViewProps) => {
254254
setGhostAnchorEl(null);
255255
await createEvent({
256256
activity_id: null,
257+
campaign_id: campId,
257258
end_time: pendingEvent[1].toISOString(),
258259
location_id: null,
259260
start_time: pendingEvent[0].toISOString(),

0 commit comments

Comments
 (0)