Selaa lähdekoodia

add aws 3 for avatars

unknown 2 vuotta sitten
vanhempi
commit
ca3333f0e2

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
.eslintcache


+ 2 - 2
src/components/HomePage/LeftBar/EditBar/EditList/index.tsx

@@ -4,7 +4,7 @@ import Avatar from '@mui/material/Avatar';
 import AddAPhotoIcon from '@mui/icons-material/AddAPhoto';
 import AddAPhotoIcon from '@mui/icons-material/AddAPhoto';
 import { useEffect } from 'react';
 import { useEffect } from 'react';
 import { useDropzone } from 'react-dropzone';
 import { useDropzone } from 'react-dropzone';
-import { format,firstLetter,prodBaseURL } from '../../../../../helpers'
+import { format,firstLetter } from '../../../../../helpers'
 import { IAuthorizationState } from '../../../../../typescript/redux/authorization/interfaces'
 import { IAuthorizationState } from '../../../../../typescript/redux/authorization/interfaces'
 
 
 const useStyles = makeStyles({
 const useStyles = makeStyles({
@@ -105,7 +105,7 @@ const EditList = (props: IEditList) => {
           <AddAPhotoIcon className={classes.addPhoto} fontSize='large' />
           <AddAPhotoIcon className={classes.addPhoto} fontSize='large' />
           <input {...getInputProps()}/>
           <input {...getInputProps()}/>
         </div>
         </div>
-         <Avatar alt={name} src={avatarUrl?`${prodBaseURL}/${avatarUrl}`:undefined}
+         <Avatar alt={name} src={avatarUrl?`${avatarUrl}`:undefined}
            sx={{ background: color, width: 120, height: 120}}>
            sx={{ background: color, width: 120, height: 120}}>
            {`${firstLetter(name)}${firstLetter(lastName)}`}
            {`${firstLetter(name)}${firstLetter(lastName)}`}
          </Avatar>
          </Avatar>

+ 2 - 2
src/components/HomePage/LeftBar/SettingsBar/SettingsPicture/index.tsx

@@ -5,7 +5,7 @@ import { getAuthorizationState } from '../../../../../redux/authorization/select
 import { Carousel } from 'react-responsive-carousel';
 import { Carousel } from 'react-responsive-carousel';
 import DeleteOutlineIcon from '@mui/icons-material/DeleteOutline';
 import DeleteOutlineIcon from '@mui/icons-material/DeleteOutline';
 import Avatar from '@mui/material/Avatar';
 import Avatar from '@mui/material/Avatar';
-import { firstLetter, slicedWord, timeStampEU,prodBaseURL } from '../../../../../helpers'
+import { firstLetter, slicedWord, timeStampEU } from '../../../../../helpers'
 import DeleteModal from './DeleteModal';
 import DeleteModal from './DeleteModal';
 
 
 
 
@@ -83,7 +83,7 @@ const SettingsPicture = () => {
       <Carousel onChange={(i)=> setIndex(i)} selectedItem={index}>
       <Carousel onChange={(i)=> setIndex(i)} selectedItem={index}>
         {avatarsArr.map(({ avatarUrl, updatedAt }) =>
         {avatarsArr.map(({ avatarUrl, updatedAt }) =>
           <div key={avatarUrl}>
           <div key={avatarUrl}>
-            <img alt='pic' src={`${prodBaseURL}/${avatarUrl}`}/>
+            <img alt='pic' src={`${avatarUrl}`}/>
             <p className="legend">{timeStampEU(updatedAt)}</p>         
             <p className="legend">{timeStampEU(updatedAt)}</p>         
           </div>)}
           </div>)}
        </Carousel>      
        </Carousel>