Skip to content

Commit 4d2bf79

Browse files
authored
feat(app): Add language button (#628)
1 parent 88503c9 commit 4d2bf79

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/pages/App.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,11 @@ const AppPage: React.FC = () => {
118118
await AppLauncher.openUrl({ url: '' });
119119
};
120120

121+
const getAppLanguage = async () => {
122+
const info = await App.getAppLanguage();
123+
setAppInfoJson(JSON.stringify(info, null, 2));
124+
};
125+
121126
useIonViewDidLeave(() => {
122127
stateChangeHandler.remove();
123128
urlOpenHandler.remove();
@@ -160,6 +165,9 @@ const AppPage: React.FC = () => {
160165
<IonButton expand="block" onClick={failCall}>
161166
Test Failing Call
162167
</IonButton>
168+
<IonButton expand="block" onClick={getAppLanguage}>
169+
Get App Language
170+
</IonButton>
163171
<IonButton expand="block" href="https://flems.io/#0=N4IgzgpgNhDGAuEAmIBcIB0ALeBbKIANCAGYCWMYaA2qAHYCGuEamO+RIsA9nYn6wA8WAIwA+ADp1BDAARYAThBIBeCSDJ8IfVAHpdWbswDEASS18A3GFhYIzFT1wZYDAA4NYZeNwUArMAx3NwxEMHhgyw9YAGsGAHMIRyMXd09vXwCgtxCwiJzLT3gyXhUGOiQFbjIkDE1+eCCEEroMADVTAFEAdUttJEt1STpZWQAVCHDUWQB5N21ZAEEABWWpQV0GYY3RMU5IGGbeKnQAJlQRADYQAF9CeiYWdAwAzh4LeCE5RWU1LhTXNEMv5AsFQpN8m49AYjBAAPwkKq4FRICAQNxQTQxIZjToAZTGGy2+2gcGKx1YAAZUJcAOy3e4gRjMVguMBUYjvBqsW4AXRuQA">
164172
{/* If the link above ever expires, this is the HTML to test opening an intent for this app.
165173
<h1>

0 commit comments

Comments
 (0)