mirror of
https://github.com/aljazceru/react-native-pubky.git
synced 2026-02-02 05:34:19 +01:00
refactor: add getHomeserver
Adds getHomeserver method. Updates example app. Bumps version to 0.10.2. Updates README.md.
This commit is contained in:
@@ -22,6 +22,7 @@ import {
|
||||
session,
|
||||
deleteFile,
|
||||
getSignupToken,
|
||||
getHomeserver,
|
||||
} from '@synonymdev/react-native-pubky';
|
||||
|
||||
const HOMESERVER = '8pinxxgqs41n4aididenw5apqp1urfmzdztr8jt4abrkdn435ewo';
|
||||
@@ -190,6 +191,23 @@ export default function App() {
|
||||
}
|
||||
}}
|
||||
/>
|
||||
<Button
|
||||
title={'getHomeserver'}
|
||||
onPress={async (): Promise<void> => {
|
||||
try {
|
||||
const res = await getHomeserver(
|
||||
PUBLIC_KEY // Public key
|
||||
);
|
||||
if (res.isErr()) {
|
||||
console.log(res.error.message);
|
||||
return;
|
||||
}
|
||||
console.log(res.value);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
<Button
|
||||
title={'signout'}
|
||||
onPress={async (): Promise<void> => {
|
||||
|
||||
Reference in New Issue
Block a user