use create react app to simplify the application

This commit is contained in:
dennis.ludwig
2021-06-10 10:08:45 +02:00
parent 630e03a92d
commit 8231afa50f
47 changed files with 1288 additions and 12936 deletions

View File

@@ -1,15 +1,22 @@
import React from 'react';
import './flag.scss';
import {FlagType} from "../../model";
import React from "react";
import "./flag.scss";
export type FlagType = "new" | "changed" | "default";
interface ItemFlag {
flag: FlagType;
}
export default function Flag({ item, short = false }: { item: ItemFlag; short?: boolean }) {
export default function Flag({
item,
short = false,
}: {
item: ItemFlag;
short?: boolean;
}) {
const ucFirst = (s: string) => s.charAt(0).toUpperCase() + s.slice(1);
if (item.flag !== 'default') {
if (item.flag !== "default") {
let name = item.flag.toUpperCase();
let title = ucFirst(item.flag);
if (short === true) {