Skip to content

Commit

Permalink
feeback maxNoteTextLength => 200
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominic Wrege committed Jul 12, 2024
1 parent 496d609 commit e07b9e2
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions screens/feedbackView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { LadefuchsButton } from "../components/detail/ladefuchsButton";
import { Tariff } from "../types/tariff";
import { ChargeMode, TariffCondition } from "../types/conditions";
import { ScaledSheet } from "react-native-size-matters";
import { useFormatNumber } from "../hooks/numberFormat";
import { FeedbackContext, FeedbackRequest } from "../types/feedback";
import { useShallow } from "zustand/react/shallow";
import { useAppStore } from "../state/state";
Expand All @@ -21,7 +20,6 @@ import { Operator } from "../types/operator";
export function FeedbackView(): JSX.Element {
const route = useRoute();
const navigation = useNavigation();
const { formatNumber } = useFormatNumber();

const { tariff, acTariffCondition, dcTariffCondition, operator } =
route.params as {
Expand Down Expand Up @@ -119,7 +117,7 @@ export function FeedbackView(): JSX.Element {
]);
};

const maxNoteTextLength = 160;
const maxNoteTextLength = 200;
const remainingCharacters = maxNoteTextLength - noteText.length;

const renderPriceInput = ({
Expand Down Expand Up @@ -206,15 +204,15 @@ export function FeedbackView(): JSX.Element {
<View style={feedbackStyles.noteContainer}>
<TextInput
style={feedbackStyles.noteInput}
placeholder="Willst Du dem Fuchs noch etwas flüstern?\n (max. 160 Zeichen)"
placeholder={`Willst Du dem Fuchs noch etwas flüstern?\n (max. ${maxNoteTextLength} Zeichen)`}
maxLength={maxNoteTextLength}
value={noteText}
onChangeText={setNoteText}
multiline
numberOfLines={5}
/>
<Text style={feedbackStyles.charCount}>
{remainingCharacters} / 160
{remainingCharacters} / maxNoteTextLength
</Text>
</View>
<LadefuchsButton
Expand Down

0 comments on commit e07b9e2

Please sign in to comment.