feat: introduce firebase authentication

This commit is contained in:
Ali BARIN
2021-10-24 01:02:34 +02:00
parent 2eeeeb0028
commit 17907a288c
8 changed files with 500 additions and 11 deletions

View File

@@ -1,3 +1,4 @@
import * as React from 'react';
import Avatar from '@mui/material/Avatar';
type AppIconProps = {
@@ -6,11 +7,22 @@ type AppIconProps = {
color?: string;
};
const inlineImgStyle: React.CSSProperties = {
objectFit: 'contain',
};
export default function AppIcon(props: AppIconProps) {
const { name, url } = props;
const color = url ? 'white' : props.color
return (
<Avatar component="span" variant="square" sx={{ bgcolor: `#${color}` }} src={url} alt={name} />
<Avatar
component="span"
variant="square"
sx={{ bgcolor: `#${color}` }}
imgProps={{ style: inlineImgStyle }}
src={url}
alt={name}
/>
);
};