Front: Pretty and Lint (#225)

This commit is contained in:
Arthur Jamet
2023-06-17 07:01:23 +01:00
committed by GitHub
parent 399c7d0d9e
commit c5d465df97
94 changed files with 3627 additions and 3089 deletions
+12 -18
View File
@@ -1,14 +1,10 @@
import React from "react";
import { StyleProp, ViewStyle } from "react-native";
import { Element } from "./Element";
import useColorScheme from "../../hooks/colorScheme";
import { ElementProps } from "./ElementTypes";
import React from 'react';
import { StyleProp, ViewStyle } from 'react-native';
import { Element } from './Element';
import useColorScheme from '../../hooks/colorScheme';
import { ElementProps } from './ElementTypes';
import {
Box,
Column,
Divider,
} from "native-base";
import { Box, Column, Divider } from 'native-base';
type ElementListProps = {
elements: ElementProps[];
@@ -17,23 +13,21 @@ type ElementListProps = {
const ElementList = ({ elements, style }: ElementListProps) => {
const colorScheme = useColorScheme();
const isDark = colorScheme === "dark";
const isDark = colorScheme === 'dark';
const elementStyle = {
borderRadius: 10,
boxShadow: isDark
? "0px 0px 3px 0px rgba(255,255,255,0.6)"
: "0px 0px 3px 0px rgba(0,0,0,0.4)",
overflow: "hidden",
? '0px 0px 3px 0px rgba(255,255,255,0.6)'
: '0px 0px 3px 0px rgba(0,0,0,0.4)',
overflow: 'hidden',
} as const;
return (
<Column style={[style, elementStyle]}>
{elements.map((element, index, __) => (
{elements.map((element, index) => (
<Box key={element.title}>
<Element {...element} />
{ index < elements.length - 1 &&
<Divider />
}
{index < elements.length - 1 && <Divider />}
</Box>
))}
</Column>