From 93864cdc1bc1d2d07584de3f5bc2ebc0eea87d09 Mon Sep 17 00:00:00 2001 From: Atul Varma Date: Thu, 29 Nov 2018 14:04:37 -0500 Subject: [PATCH] Add confetti to HP Action confirmation page. Fixes #395. --- frontend/lib/confetti-loadable.tsx | 19 +++++++++++++++++++ frontend/lib/confetti.tsx | 2 +- frontend/lib/hp-action.tsx | 2 ++ frontend/lib/pages/loc-confirmation.tsx | 16 ++-------------- 4 files changed, 24 insertions(+), 15 deletions(-) create mode 100644 frontend/lib/confetti-loadable.tsx diff --git a/frontend/lib/confetti-loadable.tsx b/frontend/lib/confetti-loadable.tsx new file mode 100644 index 000000000..58c74a7ab --- /dev/null +++ b/frontend/lib/confetti-loadable.tsx @@ -0,0 +1,19 @@ +import React from 'react'; +import Loadable from 'react-loadable'; +import { ConfettiProps } from './confetti'; +import { SimpleProgressiveEnhancement } from './progressive-enhancement'; + +const LoadableConfetti = Loadable({ + loader: () => import(/* webpackChunkName: "confetti" */ './confetti'), + // We don't want to display anything while the confetti is loading. + loading() { return null; }, + // This ensures that our server doesn't generate