Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

Remove 'paddleLoaded'

Blue Mouseb6a9b6f21615
diff --git a/web/app/lib/reducers/ui/misc.ts b/web/app/lib/reducers/ui/misc.ts
index 6528a5f17..fc24b9807 100644
--- a/web/app/lib/reducers/ui/misc.ts
+++ b/web/app/lib/reducers/ui/misc.ts
@@ -9,7 +9,6 @@ import { secondsTillNextMonth } from '~/utils/generic'
interface InitialState {
stats: Stats
metainfo: Metainfo
- paddleLoaded: boolean
paddle: any
showNoEventsLeftBanner: boolean
lastBlogPost: any
@@ -29,7 +28,6 @@ const initialState: InitialState = {
symbol: '$',
code: 'USD',
},
- paddleLoaded: false,
paddle: {},
showNoEventsLeftBanner: false,
lastBlogPost: null,
diff --git a/web/app/pages/Billing/index.tsx b/web/app/pages/Billing/index.tsx
index c9412d364..3c42ca3d8 100644
--- a/web/app/pages/Billing/index.tsx
+++ b/web/app/pages/Billing/index.tsx
@@ -45,7 +45,6 @@ const Billing = ({ ssrAuthenticated, ssrTheme }: BillingProps) => {
const { user, loading: authLoading } = useSelector((state: StateType) => state.auth)
const { theme: reduxTheme } = useSelector((state: StateType) => state.ui.theme)
const theme = isBrowser ? reduxTheme : ssrTheme
- const paddleLoaded = useSelector((state: StateType) => state.ui.misc.paddleLoaded)
const reduxAuthenticated = useSelector((state: StateType) => state.auth.authenticated)
const [usageInfo, setUsageInfo] = useState<UsageInfo>({
total: 0,
@@ -85,10 +84,6 @@ const Billing = ({ ssrAuthenticated, ssrTheme }: BillingProps) => {
// Paddle (payment processor) set-up
useEffect(() => {
- if (paddleLoaded) {
- return
- }
-
loadScript(PADDLE_JS_URL)
const eventCallback = (data: any) => {
@@ -109,7 +104,7 @@ const Billing = ({ ssrAuthenticated, ssrTheme }: BillingProps) => {
clearInterval(interval)
}
}
- }, [paddleLoaded]) // eslint-disable-line
+ }, []) // eslint-disable-line
const loadUsageInfo = async () => {
if (!isLoading) {