forked from cerc-io/laconic-wallet
* Add navigation * Remove navigation * Change accordian title * Add page to sign message * Call sign page on button click * Change variable name * Change app title * Change create button color * Delete Cosmos component * Fix imports * Add line * Change sign message title * Ask for confirmation before resetting wallet * Make review changes * Hide dialog on clicking outside * Change dialog options * Make review changes * Remove import * Change title * Change default state --------- Co-authored-by: Adw8 <adwait@deepstacksoft.com>
29 lines
760 B
TypeScript
29 lines
760 B
TypeScript
import { View } from 'react-native';
|
|
import { Button, TextInput } from 'react-native-paper';
|
|
import React, { useState } from 'react';
|
|
|
|
import { signMessage } from '../utils';
|
|
|
|
export default function SignMessage() {
|
|
const [message, setMessage] = useState<string>('');
|
|
return (
|
|
<View style={{ marginTop: 30, paddingHorizontal: 48 }}>
|
|
<TextInput
|
|
mode="outlined"
|
|
placeholder="Enter your message"
|
|
onChangeText={text => setMessage(text)}
|
|
value={message}
|
|
/>
|
|
<View style={{ marginTop: 20, width: 150, alignSelf: 'center' }}>
|
|
<Button
|
|
mode="contained"
|
|
onPress={() => {
|
|
signMessage(message);
|
|
}}>
|
|
Sign
|
|
</Button>
|
|
</View>
|
|
</View>
|
|
);
|
|
}
|