fix some ts errors
This commit is contained in:
parent
2bbb3f60ce
commit
63722c2417
9 changed files with 19 additions and 14 deletions
|
@ -113,7 +113,7 @@ function FeedItem(props: PropsType) {
|
||||||
) : null}
|
) : null}
|
||||||
<Card.Content>
|
<Card.Content>
|
||||||
{item.message !== undefined ? (
|
{item.message !== undefined ? (
|
||||||
<Autolink<typeof Text>
|
<Autolink
|
||||||
text={item.message}
|
text={item.message}
|
||||||
hashtag={'facebook'}
|
hashtag={'facebook'}
|
||||||
component={Text}
|
component={Text}
|
||||||
|
|
|
@ -60,7 +60,7 @@ function DashboardEditAccordion(props: PropsType) {
|
||||||
};
|
};
|
||||||
|
|
||||||
const getItemLayout = (
|
const getItemLayout = (
|
||||||
data: Array<ServiceItemType> | null | undefined,
|
_data: Array<ServiceItemType> | null | undefined,
|
||||||
index: number
|
index: number
|
||||||
): { length: number; offset: number; index: number } => ({
|
): { length: number; offset: number; index: number } => ({
|
||||||
length: LIST_ITEM_HEIGHT,
|
length: LIST_ITEM_HEIGHT,
|
||||||
|
|
|
@ -88,7 +88,7 @@ class GroupListAccordion extends React.Component<PropsType> {
|
||||||
}
|
}
|
||||||
|
|
||||||
itemLayout = (
|
itemLayout = (
|
||||||
data: Array<PlanexGroupType> | null | undefined,
|
_data: Array<PlanexGroupType> | null | undefined,
|
||||||
index: number
|
index: number
|
||||||
): { length: number; offset: number; index: number } => ({
|
): { length: number; offset: number; index: number } => ({
|
||||||
length: LIST_ITEM_HEIGHT,
|
length: LIST_ITEM_HEIGHT,
|
||||||
|
|
|
@ -30,14 +30,14 @@ type PropsType = {
|
||||||
* Abstraction layer for Agenda component, using custom configuration
|
* Abstraction layer for Agenda component, using custom configuration
|
||||||
*/
|
*/
|
||||||
function CustomHTML(props: PropsType) {
|
function CustomHTML(props: PropsType) {
|
||||||
const openWebLink = (event: GestureResponderEvent, link: string) => {
|
const openWebLink = (_event: GestureResponderEvent, link: string) => {
|
||||||
Linking.openURL(link);
|
Linking.openURL(link);
|
||||||
};
|
};
|
||||||
|
|
||||||
const getBasicText = (
|
const getBasicText = (
|
||||||
htmlAttribs: any,
|
_htmlAttribs: any,
|
||||||
children: any,
|
children: any,
|
||||||
convertedCSSStyles: any,
|
_convertedCSSStyles: any,
|
||||||
passProps: any
|
passProps: any
|
||||||
) => {
|
) => {
|
||||||
return <Text {...passProps}>{children}</Text>;
|
return <Text {...passProps}>{children}</Text>;
|
||||||
|
|
|
@ -67,9 +67,9 @@ export default class ConnectionManager {
|
||||||
/**
|
/**
|
||||||
* Tries to recover login token from the secure keychain
|
* Tries to recover login token from the secure keychain
|
||||||
*
|
*
|
||||||
* @returns Promise<string>
|
* @returns Promise<void>
|
||||||
*/
|
*/
|
||||||
async recoverLogin(): Promise<string> {
|
async recoverLogin(): Promise<void> {
|
||||||
return new Promise((resolve: () => void) => {
|
return new Promise((resolve: () => void) => {
|
||||||
const token = this.getToken();
|
const token = this.getToken();
|
||||||
if (token != null) {
|
if (token != null) {
|
||||||
|
@ -103,7 +103,7 @@ export default class ConnectionManager {
|
||||||
* @param token
|
* @param token
|
||||||
* @returns Promise<void>
|
* @returns Promise<void>
|
||||||
*/
|
*/
|
||||||
async saveLogin(email: string, token: string): Promise<void> {
|
async saveLogin(_email: string, token: string): Promise<void> {
|
||||||
return new Promise((resolve: () => void, reject: () => void) => {
|
return new Promise((resolve: () => void, reject: () => void) => {
|
||||||
Keychain.setGenericPassword('token', token)
|
Keychain.setGenericPassword('token', token)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|
|
@ -69,7 +69,7 @@ function ClubAboutScreen() {
|
||||||
/>
|
/>
|
||||||
<Card.Content>
|
<Card.Content>
|
||||||
<Text>{i18n.t('screens.clubs.about.message')}</Text>
|
<Text>{i18n.t('screens.clubs.about.message')}</Text>
|
||||||
<Autolink<typeof Text>
|
<Autolink
|
||||||
text={CONTACT_LINK}
|
text={CONTACT_LINK}
|
||||||
hashtag={'facebook'}
|
hashtag={'facebook'}
|
||||||
component={Text}
|
component={Text}
|
||||||
|
|
|
@ -224,7 +224,7 @@ class ClubListScreen extends React.Component<PropsType, StateType> {
|
||||||
keyExtractor = (item: ClubType): string => item.id.toString();
|
keyExtractor = (item: ClubType): string => item.id.toString();
|
||||||
|
|
||||||
itemLayout = (
|
itemLayout = (
|
||||||
data: Array<ClubType> | null | undefined,
|
_data: Array<ClubType> | null | undefined,
|
||||||
index: number
|
index: number
|
||||||
): { length: number; offset: number; index: number } => ({
|
): { length: number; offset: number; index: number } => ({
|
||||||
length: LIST_ITEM_HEIGHT,
|
length: LIST_ITEM_HEIGHT,
|
||||||
|
|
|
@ -61,7 +61,12 @@ const styles = StyleSheet.create({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
type PermissionResults = 'unavailable' | 'denied' | 'blocked' | 'granted';
|
type PermissionResults =
|
||||||
|
| 'unavailable'
|
||||||
|
| 'denied'
|
||||||
|
| 'blocked'
|
||||||
|
| 'granted'
|
||||||
|
| 'limited';
|
||||||
|
|
||||||
class ScannerScreen extends React.Component<{}, StateType> {
|
class ScannerScreen extends React.Component<{}, StateType> {
|
||||||
constructor(props: {}) {
|
constructor(props: {}) {
|
||||||
|
|
|
@ -174,8 +174,8 @@ class PlanningScreen extends React.Component<PropsType, StateType> {
|
||||||
|
|
||||||
if (canRefresh) {
|
if (canRefresh) {
|
||||||
this.setState({ refreshing: true });
|
this.setState({ refreshing: true });
|
||||||
readData(Urls.amicale.events)
|
readData<Array<PlanningEventType>>(Urls.amicale.events)
|
||||||
.then((fetchedData: Array<PlanningEventType>) => {
|
.then((fetchedData) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
refreshing: false,
|
refreshing: false,
|
||||||
agendaItems: generateEventAgenda(fetchedData, AGENDA_MONTH_SPAN),
|
agendaItems: generateEventAgenda(fetchedData, AGENDA_MONTH_SPAN),
|
||||||
|
|
Loading…
Reference in a new issue