Front: Prettier

This commit is contained in:
Arthur Jamet
2023-12-02 08:20:08 +01:00
parent 454835338f
commit c6365113c4
3 changed files with 36 additions and 34 deletions
+16 -16
View File
@@ -20,22 +20,22 @@ type ScoreModalProps = {
};
};
const ScoreModal = (props: ScoreModalProps) => {
// const props = {
// songId: 1,
// overallScore: 74,
// precision: 0,
// score: {
// missed: 9,
// good: 1,
// great: 2,
// perfect: 4,
// wrong: 0,
// max_score: 100,
// current_streak: 1,
// max_streak: 11,
// } as const
// } as const; //TODO DELETE ME
const ScoreModal = () => {
const props = {
songId: 1,
overallScore: 74,
precision: 0,
score: {
missed: 9,
good: 1,
great: 2,
perfect: 4,
wrong: 0,
max_score: 100,
current_streak: 1,
max_streak: 11,
} as const
} as const; //TODO DELETE ME
const navigation = useNavigation()
const theme = useTheme();
const score = (props.overallScore * 100) / props.score.max_score
+14 -12
View File
@@ -34,18 +34,20 @@ const PopupCC = ({ title, description, children, isVisible, setIsVisible }: Popu
}}
space={4}
>
{(setIsVisible || title) && <Heading size="md" mb={2} alignItems={'flex-end'}>
<Row style={{ flex: 1, width: '100%', alignItems: 'flex-end' }}>
<Text style={{ flex: 1, width: '100%' }}>{title}</Text>
{setIsVisible !== undefined && (
<ButtonBase
type="menu"
icon={CloseSquare}
onPress={async () => setIsVisible(false)}
/>
)}
</Row>
</Heading>}
{(setIsVisible || title) && (
<Heading size="md" mb={2} alignItems={'flex-end'}>
<Row style={{ flex: 1, width: '100%', alignItems: 'flex-end' }}>
<Text style={{ flex: 1, width: '100%' }}>{title}</Text>
{setIsVisible !== undefined && (
<ButtonBase
type="menu"
icon={CloseSquare}
onPress={async () => setIsVisible(false)}
/>
)}
</Row>
</Heading>
)}
{description !== undefined && <Text>{description}</Text>}
{children !== undefined && children}
</Column>