Skip to content

Commit

Permalink
feat: create a protected route for campaign applications (Epic podkre…
Browse files Browse the repository at this point in the history
…pi-bg#1842) (podkrepi-bg#1855)

* create a protected route for campaign applications

* fix: self-closing tag linter error
  • Loading branch information
teodorazhelyazkova authored and gparlakov committed Jun 19, 2024
1 parent 02df23b commit a927b2f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/common/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export const routes = {
campaigns: {
index: '/campaigns',
create: '/campaigns/create',
application: 'campaigns/application',
viewCampaignBySlug: (slug: string) => `/campaigns/${slug}`,
viewExpenses: (slug: string) => `/campaigns/${slug}/expenses`,
oneTimeDonation: (slug: string) => `/campaigns/donation/${slug}`,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import Layout from '../layout/Layout'

export default function CampaignApplicationPage() {
return <Layout />
}
11 changes: 11 additions & 0 deletions src/pages/campaigns/application.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { GetServerSideProps } from 'next'
import { securedPropsWithTranslation } from 'middleware/auth/securedProps'
import { routes } from 'common/routes'
import CampaignApplicationPage from 'components/client/campaign-application/CampaignApplicationPage'

export const getServerSideProps: GetServerSideProps = securedPropsWithTranslation(
['common', 'auth', 'validation', 'campaigns'],
routes.campaigns.application,
)

export default CampaignApplicationPage

0 comments on commit a927b2f

Please sign in to comment.