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

Added Redirect to /organize - removed link buttons #1917

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

kizouker
Copy link

@kizouker kizouker commented Apr 18, 2024

Description

This PR resolves #1826 by using a re-direct to locahost:3000/organize.

Screenshots

Pasted Graphic 3

Redirecting

Get involved with your

Changes

[Add a list of features added/changed, bugs fixed etc]

  • Adds…

    • a call to 'router.push('/organize');'
    • a message 'Redirecting'
  • Removes:

    • The buttongroup with links

Notes to reviewer

  1. Point the browser to 'localhost:3000'
  2. See that the browser displays "Redirecting"
  3. Finally the url shows "http://login.dev.zetkin.org/..." and the web page shows "Get involved with your organization" and a login form.

Related issues

Resolves #1826

Copy link
Contributor

@ziggabyte ziggabyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello! Congrats on your first (I think???) PR!! :D

I've played with this both in the Vercel deploy and locally, and I think it works well! The only thing Iäm going to ask you to change is the order of the imports, so when that is fixed i can approve it!

@@ -6,6 +6,7 @@ export default makeMessages('core', {
pageNotFound: m('Page not found'),
},
home: {
redirecting: m('Redirecting...'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

src/pages/index.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@ziggabyte ziggabyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Soooo close, it's almost heart-breaking to ask for a change again 😂 but there are still some mis-sorted imports, I wrote the correct order in the comment, you can just copy that :)

import getUserMemberships from 'utils/getUserMemberships';
import { Msg } from 'core/i18n';
import Head from 'next/head';
import messageIds from 'core/l10n/messageIds';
import requiredEnvVar from 'utils/requiredEnvVar';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the order the imports should be in:

import { getIronSession } from 'iron-session';
import { GetServerSideProps } from 'next';
import Head from 'next/head';
import { useRouter } from 'next/router';
import { Container, Typography } from '@mui/material';

import { AppSession } from '../utils/types';
import getUserMemberships from 'utils/getUserMemberships';
import messageIds from 'core/l10n/messageIds';
import { Msg } from 'core/i18n';
import requiredEnvVar from 'utils/requiredEnvVar';
import { scaffold } from '../utils/next';
import { ZetkinUser } from '../utils/types/zetkin';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Redirect / to /organize
2 participants