Add basic typing to config objects
Also fixed the blips to be clickable
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import React from 'react';
|
||||
import './flag.scss';
|
||||
import {FlagType} from "../../model";
|
||||
import {blipFlags} from "../../config";
|
||||
|
||||
interface ItemFlag {
|
||||
flag: FlagType;
|
||||
@@ -10,7 +9,7 @@ interface ItemFlag {
|
||||
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 !== blipFlags.default.name) {
|
||||
if (item.flag !== FlagType.default) {
|
||||
let name = item.flag.toUpperCase();
|
||||
let title = ucFirst(item.flag);
|
||||
if (short === true) {
|
||||
|
||||
Reference in New Issue
Block a user