Revert workouts to be text instead of an input
These workouts being an input is confusing because they are not editable. Closes #65
This commit is contained in:
parent
80553234bd
commit
13c4879470
24
SetForm.tsx
24
SetForm.tsx
|
@ -1,6 +1,6 @@
|
||||||
import React, {useContext, useEffect, useRef, useState} from 'react';
|
import React, {useContext, useEffect, useRef, useState} from 'react';
|
||||||
import {ScrollView} from 'react-native';
|
import {ScrollView, View} from 'react-native';
|
||||||
import {Button} from 'react-native-paper';
|
import {Button, Text} from 'react-native-paper';
|
||||||
import MassiveInput from './MassiveInput';
|
import MassiveInput from './MassiveInput';
|
||||||
import {SnackbarContext} from './MassiveSnack';
|
import {SnackbarContext} from './MassiveSnack';
|
||||||
import Set from './set';
|
import Set from './set';
|
||||||
|
@ -107,11 +107,21 @@ export default function SetForm({
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{workouts.length > 0 && !!settings.workouts && (
|
{workouts.length > 0 && !!settings.workouts && (
|
||||||
<MassiveInput
|
<View style={{flexDirection: 'row'}}>
|
||||||
label="Todays workout"
|
{workouts.map((workout, index) => (
|
||||||
value={workouts?.join(', ')}
|
<Text>
|
||||||
editable={false}
|
<Text
|
||||||
/>
|
style={
|
||||||
|
workout === name
|
||||||
|
? {textDecorationLine: 'underline', fontWeight: 'bold'}
|
||||||
|
: null
|
||||||
|
}>
|
||||||
|
{workout}
|
||||||
|
</Text>
|
||||||
|
{index === workouts.length - 1 ? '' : ', '}
|
||||||
|
</Text>
|
||||||
|
))}
|
||||||
|
</View>
|
||||||
)}
|
)}
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
<Button
|
<Button
|
||||||
|
|
Loading…
Reference in New Issue
Block a user