added missing logo util

This commit is contained in:
Roland Osborne 2023-02-17 10:16:32 -08:00
parent e2c5e6a8d6
commit 1e23bc25ae
3 changed files with 45 additions and 2 deletions

View File

@ -567,7 +567,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
@ -639,7 +639,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "c++14";
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;

View File

@ -0,0 +1,40 @@
import { useState } from 'react';
import { Image, View } from 'react-native';
import avatar from 'images/avatar.png';
import appstore from 'images/appstore.png';
import solution from 'images/solution.png';
import team from 'images/team.png';
export function Logo({ src, width, height, radius }) {
const [source, setSource] = useState(null);
if (src != source) {
setSource(src);
}
return (
<View style={{ borderRadius: radius, overflow: 'hidden', width, height }}>
{ source === 'team' && (
<Image source={team} style={{ width, height }} />
)}
{ source === 'avatar' && (
<Image source={avatar} style={{ width, height }} />
)}
{ source === 'appstore' && (
<Image source={appstore} style={{ width, height }} />
)}
{ source === 'solution' && (
<Image source={solution} style={{ width, height }} />
)}
{ !source && (
<Image source={avatar} style={{ width, height }} />
)}
{ source && source.startsWith('http') && (
<Image source={{ uri:source }} resizeMode={'contain'} style={{ width, height }} />
)}
</View>
);
}

View File

@ -0,0 +1,3 @@
{
"name": "utils"
}