Skip to content

Commit 5587e71

Browse files
committed
Refactor from let to const
* Refactor on OSButtons.tsx let to const i
1 parent 70e17fe commit 5587e71

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/RNOneSignalTS/src/OSButtons.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class OSButtons extends React.Component<Props, State> {
9090
);
9191

9292
const locationShared = renderButtonView("is Location Shared", color, async () => {
93-
let appHasLocationShared = await OneSignal.isLocationShared();
93+
const appHasLocationShared = await OneSignal.isLocationShared();
9494
loggingFunction(`Application has location shared active: ${appHasLocationShared}`);
9595
})
9696

@@ -131,7 +131,7 @@ class OSButtons extends React.Component<Props, State> {
131131
const { loggingFunction } = this.props;
132132

133133
const deviceStateButton = renderButtonView("Get Device State", color, async () => {
134-
let deviceState = await OneSignal.getDeviceState();
134+
const deviceState = await OneSignal.getDeviceState();
135135
loggingFunction(`Device State: ${JSON.stringify(deviceState)}`);
136136
})
137137

@@ -149,7 +149,7 @@ class OSButtons extends React.Component<Props, State> {
149149
"is Privacy Consent Required",
150150
color,
151151
async () => {
152-
let appRequiresUserPrivacyConsent = await OneSignal.requiresUserPrivacyConsent();
152+
const appRequiresUserPrivacyConsent = await OneSignal.requiresUserPrivacyConsent();
153153
loggingFunction(`Application requires privacy consent: ${appRequiresUserPrivacyConsent}`);
154154
})
155155

@@ -161,7 +161,7 @@ class OSButtons extends React.Component<Props, State> {
161161
})
162162

163163
const userProvidedPrivacyConsent = renderButtonView("Did User Provide Privacy Consent", color, async () => {
164-
let didProvide = await OneSignal.userProvidedPrivacyConsent();
164+
const didProvide = await OneSignal.userProvidedPrivacyConsent();
165165
loggingFunction(`Provided Privacy Consent: ${didProvide}`);
166166
})
167167

0 commit comments

Comments
 (0)