-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2429 from zetkin/release-241217
241217 Release
- Loading branch information
Showing
82 changed files
with
2,749 additions
and
246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { redirect } from 'next/navigation'; | ||
|
||
interface PageProps { | ||
params: { | ||
callAssId: string; | ||
}; | ||
} | ||
|
||
export default async function Page({ params }: PageProps) { | ||
const callUrl = process.env.ZETKIN_GEN2_CALL_URL; | ||
const assignmentUrl = callUrl + '/assignments/' + params.callAssId; | ||
redirect(assignmentUrl); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import redirectIfLoginNeeded from 'core/utils/redirectIfLoginNeeded'; | ||
import AllEventsPage from 'features/home/pages/AllEventsPage'; | ||
|
||
export default async function Page() { | ||
await redirectIfLoginNeeded(); | ||
|
||
return <AllEventsPage />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import redirectIfLoginNeeded from 'core/utils/redirectIfLoginNeeded'; | ||
import HomePage from 'features/home/pages/HomePage'; | ||
|
||
export default async function Page() { | ||
await redirectIfLoginNeeded(); | ||
|
||
return <HomePage />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { FC, ReactNode } from 'react'; | ||
import { Metadata } from 'next'; | ||
import { headers } from 'next/headers'; | ||
|
||
import HomeLayout from 'features/home/layouts/HomeLayout'; | ||
import HomeThemeProvider from 'features/home/components/HomeThemeProvider'; | ||
import { getBrowserLanguage } from 'utils/locale'; | ||
import getServerMessages from 'core/i18n/server'; | ||
import messageIds from 'features/home/l10n/messageIds'; | ||
|
||
export async function generateMetadata(): Promise<Metadata> { | ||
const lang = getBrowserLanguage(headers().get('accept-language') || ''); | ||
const messages = await getServerMessages(lang, messageIds); | ||
|
||
return { | ||
icons: [{ url: '/logo-zetkin.png' }], | ||
title: process.env.HOME_TITLE || messages.title(), | ||
}; | ||
} | ||
|
||
type Props = { | ||
children: ReactNode; | ||
}; | ||
|
||
const MyHomeLayout: FC<Props> = ({ children }) => { | ||
const homeTitle = process.env.HOME_TITLE; | ||
|
||
return ( | ||
<HomeThemeProvider> | ||
<HomeLayout title={homeTitle}>{children}</HomeLayout> | ||
</HomeThemeProvider> | ||
); | ||
}; | ||
|
||
export default MyHomeLayout; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.