Improved authentication on the API and CLIENT side with error management
continuous-integration/drone/push Build is passing
Details
Before Width: | Height: | Size: 366 KiB After Width: | Height: | Size: 368 KiB |
Before Width: | Height: | Size: 677 B After Width: | Height: | Size: 934 B |
Before Width: | Height: | Size: 674 B After Width: | Height: | Size: 964 B |
Before Width: | Height: | Size: 4.0 MiB After Width: | Height: | Size: 247 KiB |
Before Width: | Height: | Size: 766 KiB After Width: | Height: | Size: 209 KiB |
Before Width: | Height: | Size: 760 KiB After Width: | Height: | Size: 208 KiB |
Before Width: | Height: | Size: 218 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 756 KiB After Width: | Height: | Size: 205 KiB |
Before Width: | Height: | Size: 4.1 MiB After Width: | Height: | Size: 313 KiB |
Before Width: | Height: | Size: 778 KiB After Width: | Height: | Size: 214 KiB |
After Width: | Height: | Size: 379 B |
Before Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 4.2 KiB |
@ -0,0 +1,20 @@
|
||||
import { View } from 'react-native'
|
||||
|
||||
interface HalfCirlceProps {
|
||||
backgroundColor: string;
|
||||
}
|
||||
|
||||
export default function HalfCirlce({ backgroundColor }: HalfCirlceProps) {
|
||||
return (
|
||||
<View style={{
|
||||
width: RADIUS * 2,
|
||||
height: RADIUS * 2,
|
||||
overflow: "hidden",
|
||||
|
||||
}}>
|
||||
<View style={{ backgroundColor: backgroundColor, width: RADIUS * 2, height: RADIUS * 2, borderRadius: RADIUS, }}>
|
||||
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
};
|
@ -1,29 +0,0 @@
|
||||
import { Image, StyleSheet, Pressable } from 'react-native'
|
||||
import React from 'react'
|
||||
import Icons from '../assets/icon';
|
||||
import { RiveRef } from 'rive-react-native';
|
||||
|
||||
export default function PlayButtonComponent() {
|
||||
const riveRef = React.useRef<RiveRef>(null);
|
||||
|
||||
const handlePlay = () => { riveRef.current?.play() };
|
||||
return (
|
||||
<Pressable onPress={handlePlay}>
|
||||
<Image source={Icons.discovery} style={[styles.image]} />
|
||||
</Pressable>
|
||||
);
|
||||
};
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
button: {
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
},
|
||||
image: {
|
||||
borderRadius: 24,
|
||||
resizeMode: 'cover',
|
||||
width: 65,
|
||||
height: 65,
|
||||
backgroundColor: 'black',
|
||||
}
|
||||
})
|
@ -1,8 +0,0 @@
|
||||
import { User } from "../User";
|
||||
|
||||
export class UserMapper {
|
||||
|
||||
public static toModel(user: any): User {
|
||||
return new User(user.idFlad, user.idSpotify, user.email, user.createdAt, user.name, user.imageUrl);
|
||||
}
|
||||
}
|
@ -1,33 +1,33 @@
|
||||
export class User {
|
||||
private _idFlad: string;
|
||||
private _id: string;
|
||||
private _idSpotify: string;
|
||||
private _email: string;
|
||||
private _createdAt: Date;
|
||||
private _name: string;
|
||||
private _email: string;
|
||||
private _creationDate: Date;
|
||||
public image: string;
|
||||
|
||||
constructor(idFlad: string, idSpotify: string, email: string, createdAt: Date, name: string, image: string) {
|
||||
this._name = name;
|
||||
this._idFlad = idFlad;
|
||||
constructor(id: string, idSpotify: string, name: string, email: string, creationDate: Date, image: string) {
|
||||
this._id = id;
|
||||
this._idSpotify = idSpotify;
|
||||
this._createdAt = createdAt;
|
||||
this._name = name;
|
||||
this._email = email;
|
||||
this._creationDate = creationDate;
|
||||
this.image = image;
|
||||
}
|
||||
|
||||
get idFlad(): string {
|
||||
return this._idFlad;
|
||||
get id(): string {
|
||||
return this._id;
|
||||
}
|
||||
get idSpotify(): string {
|
||||
return this._idSpotify;
|
||||
}
|
||||
get name(): string {
|
||||
return this._name;
|
||||
}
|
||||
get email(): string {
|
||||
return this._email;
|
||||
}
|
||||
get createAt(): Date {
|
||||
return this._createdAt;
|
||||
}
|
||||
get name(): string {
|
||||
return this._name;
|
||||
get creationDate(): Date {
|
||||
return this._creationDate;
|
||||
}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
import { User } from "../User";
|
||||
|
||||
export class UserMapper {
|
||||
public static toModel(user: any): User {
|
||||
return new User(user._id, user.idSpotify, user.name, user.email, new Date(user.createdAt), user.image);
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
import { setDarkMode } from "../actions/userActions";
|
||||
|
||||
export const darkMode = (value: boolean) => {
|
||||
//@ts-ignore
|
||||
return async dispatch => {
|
||||
dispatch(setDarkMode(value));
|
||||
}
|
||||
}
|