Skip to content

Commit 7a02b07

Browse files
authored
Merge pull request #4167 from Northeastern-Electric-Racing/#4142-maintenance-more-confetti
#4142 More Confetti
2 parents f5915ab + 78de965 commit 7a02b07

2 files changed

Lines changed: 23 additions & 0 deletions

File tree

src/frontend/src/pages/FinancePage/CreateReimbursementRequest.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* This file is part of NER's FinishLine and licensed under GNU AGPLv3.
33
* See the LICENSE file in the repository root folder for details.
44
*/
5+
import confetti from 'canvas-confetti';
56
import { useHistory, useLocation } from 'react-router-dom';
67
import { WbsNumber, CreateRefundSourceArgs, ReimbursementReceiptUploadArgs } from 'shared';
78
import { ReimbursementRequestFormInput } from './ReimbursementRequestForm/ReimbursementRequestForm';
@@ -31,6 +32,17 @@ const CreateReimbursementRequestPage: React.FC = () => {
3132
id: reimbursementRequestId,
3233
files: data.receiptFiles.map((file) => file.file!)
3334
});
35+
[0, 0.15, 0.3, 0.45, 0.6, 0.75, 0.9].forEach((xPos) => {
36+
confetti({
37+
origin: { y: -0.5, x: xPos },
38+
angle: 270,
39+
gravity: 1.5,
40+
startVelocity: 35,
41+
spread: 70,
42+
particleCount: 50,
43+
zIndex: 1300
44+
});
45+
});
3446
return reimbursementRequestId;
3547
};
3648

src/frontend/src/pages/WorkPackageDetailPage/StageGateWorkPackageModalContainer/StageGateWorkPackageModalContainer.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* See the LICENSE file in the repository root folder for details.
44
*/
55

6+
import confetti from 'canvas-confetti';
67
import { useHistory } from 'react-router-dom';
78
import { ChangeRequestType, WbsNumber, wbsPipe } from 'shared';
89
import { useAuth } from '../../../hooks/auth.hooks';
@@ -45,6 +46,16 @@ const StageGateWorkPackageModalContainer: React.FC<StageGateWorkPackageModalCont
4546
type: ChangeRequestType.StageGate,
4647
confirmDone
4748
});
49+
[0, 0.15, 0.3, 0.45, 0.6, 0.75, 0.9].forEach((xPos) => {
50+
confetti({
51+
origin: { y: -0.5, x: xPos },
52+
angle: 270,
53+
gravity: 1.5,
54+
startVelocity: 35,
55+
spread: 70,
56+
particleCount: 50
57+
});
58+
});
4859
history.push(`${routes.PROJECTS}/${wbsPipe(wbsNum)}/change-requests`);
4960
} catch (e: unknown) {
5061
if (e instanceof Error) {

0 commit comments

Comments
 (0)