Skip to content

Commit

Permalink
Migrate referrals pages to React Router (#7454)
Browse files Browse the repository at this point in the history
* Migrate send referral form to React Router

* Migrate referral details page to React Router

* Refactor ReferralHelp to incorporate above changes

* Elevate referrals code to modules

* Remove legacy code

* Refactor and update tests
  • Loading branch information
cgsunkel authored Jan 10, 2025
1 parent feb0b1b commit 615252b
Show file tree
Hide file tree
Showing 37 changed files with 607 additions and 884 deletions.
35 changes: 0 additions & 35 deletions src/apps/companies/apps/referrals/__tests__/transformer.test.js

This file was deleted.

152 changes: 0 additions & 152 deletions src/apps/companies/apps/referrals/details/client/ReferralDetails.jsx

This file was deleted.

4 changes: 0 additions & 4 deletions src/apps/companies/apps/referrals/details/client/reducer.js

This file was deleted.

8 changes: 0 additions & 8 deletions src/apps/companies/apps/referrals/details/client/tasks.js

This file was deleted.

19 changes: 0 additions & 19 deletions src/apps/companies/apps/referrals/details/controller.js

This file was deleted.

This file was deleted.

12 changes: 0 additions & 12 deletions src/apps/companies/apps/referrals/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,12 @@ const router = require('express').Router()

const urls = require('../../../../lib/urls')

const renderReferralDetails = require('./details/controller')
const {
renderSendReferralForm,
submitSendReferralForm,
} = require('./send-referral/controllers')
const interactionsRouter = require('../../../interactions/router.sub-app')
const {
setReferralDetails,
setInteractionsDetails,
} = require('./middleware/interactions')

router
.route(urls.companies.referrals.send.route)
.get(renderSendReferralForm)
.post(submitSendReferralForm)
// the details route needs to go below the send route so that it does not try to handle the send route
router.get(urls.companies.referrals.details.route, renderReferralDetails)

// Adding an interaction to complete a referral
// This mounts the interactions sub app on the details route
router.use(
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 615252b

Please sign in to comment.