Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use environment variables to go to correct instance. #1698

Merged
merged 1 commit into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ NEXT_PUBLIC_APP_USE_TLS=0
# Zetkin API settings
ZETKIN_API_DOMAIN=dev.zetkin.org
ZETKIN_API_HOST=api.dev.zetkin.org
NEXT_PUBLIC_ZETKIN_APP_DOMAIN=https://www.zetk.in/
NEXT_PUBLIC_ZETKIN_APP_DOMAIN=http://www.dev.zetkin.org
ZETKIN_CLIENT_ID=a0db63a12bae45ff83d12de70c8992c0
ZETKIN_CLIENT_SECRET=MWQyZmE2M2UtMzM3Yi00ODUyLWI2NGMtOWY5YTY5NTY3YjU5
ZETKIN_APP_HOST=localhost:3000
Expand Down
6 changes: 3 additions & 3 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module.exports = {
// redirects to Gen2 for MVP August 2021
{
source: '/organize/:orgId/people/:personId/edit',
destination: `https://organize.${process.env.ZETKIN_API_DOMAIN}/people/person%3A:personId/?org=:orgId`,
destination: `http://organize.${process.env.ZETKIN_API_DOMAIN}/people/person%3A:personId/?org=:orgId`,
permanent: false,
},
{
Expand Down Expand Up @@ -60,7 +60,7 @@ module.exports = {
// all paths with /o redirected to Gen2
{
source: '/o/:path*',
destination: 'https://zetk.in/o/:path*',
destination: `http://${process.env.ZETKIN_API_DOMAIN}/o/:path*`,
permanent: false,
},
{
Expand All @@ -72,7 +72,7 @@ module.exports = {
source: '/organize/:orgId/people/views/:path*',
destination: '/organize/:orgId/people/lists/:path*',
permanent: false,
}
},
];
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ const CampaignActionButtons: React.FunctionComponent<
<Link
color="inherit"
display="flex"
href={`https://www.zetk.in/o/${orgId}/campaigns/${campaign.id}`}
href={`/o/${orgId}/campaigns/${campId}`}
sx={{ alignItems: 'center', gap: 1 }}
target="_blank"
underline="none"
Expand Down
4 changes: 2 additions & 2 deletions src/features/surveys/components/SurveyURLCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ const SurveyURLCard = ({ isOpen, orgId, surveyId }: SurveyURLCardProps) => {
>
<Box display="flex" paddingBottom={2}>
<ZUITextfieldToClipboard
copyText={`${process.env.NEXT_PUBLIC_ZETKIN_APP_DOMAIN}o/${orgId}/surveys/${surveyId}`}
copyText={`${process.env.NEXT_PUBLIC_ZETKIN_APP_DOMAIN}/o/${orgId}/surveys/${surveyId}`}
>
{`${process.env.NEXT_PUBLIC_ZETKIN_APP_DOMAIN}o/${orgId}/surveys/${surveyId}`}
{`${process.env.NEXT_PUBLIC_ZETKIN_APP_DOMAIN}/o/${orgId}/surveys/${surveyId}`}
</ZUITextfieldToClipboard>
</Box>
<Link
Expand Down
Loading