parent
09165fdb78
commit
3d71877776
@ -0,0 +1,31 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { View, Image, Text, StyleSheet } from 'react-native';
|
||||||
|
|
||||||
|
const ArtistCard = ({ imageUri, name }) => {
|
||||||
|
return (
|
||||||
|
<View style={styles.container}>
|
||||||
|
<Image source={{ uri: imageUri }} style={styles.image}/>
|
||||||
|
<Text style={styles.name}>{name}</Text>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const styles = StyleSheet.create({
|
||||||
|
container: {
|
||||||
|
flexDirection: 'row',
|
||||||
|
alignItems: 'center',
|
||||||
|
margin: 10,
|
||||||
|
},
|
||||||
|
image: {
|
||||||
|
width: 80,
|
||||||
|
height: 80,
|
||||||
|
borderRadius: 40,
|
||||||
|
marginRight: 10,
|
||||||
|
},
|
||||||
|
name: {
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: 'bold',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
export default ArtistCard;
|
@ -1,9 +0,0 @@
|
|||||||
import {Text} from "react-native";
|
|
||||||
|
|
||||||
export default function ArtistView() {
|
|
||||||
return (
|
|
||||||
<View>
|
|
||||||
<Text>bonjour</Text>
|
|
||||||
</View>
|
|
||||||
)
|
|
||||||
}
|
|
@ -0,0 +1,31 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { View, Image, Text, StyleSheet } from 'react-native';
|
||||||
|
|
||||||
|
const ArtistPage = ({ name, imageUri }) => {
|
||||||
|
return (
|
||||||
|
<View style={styles.container}>
|
||||||
|
<Image source={{ uri: imageUri }} style={styles.image} />
|
||||||
|
<Text style={styles.name}>{name}</Text>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const styles = StyleSheet.create({
|
||||||
|
container: {
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
},
|
||||||
|
image: {
|
||||||
|
width: 200,
|
||||||
|
height: 200,
|
||||||
|
borderRadius: 100,
|
||||||
|
marginBottom: 10,
|
||||||
|
},
|
||||||
|
name: {
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: 'bold',
|
||||||
|
textAlign: 'center',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
export default ArtistPage;
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,9 @@
|
|||||||
|
import {FETCH_ARTISTE} from '../constants';
|
||||||
|
import Artist from '../defineObject/Artist';
|
||||||
|
|
||||||
|
export const setArtistList = (ArtistList: Artist[]) => {
|
||||||
|
return {
|
||||||
|
type: FETCH_ARTISTE,
|
||||||
|
payload: ArtistList,
|
||||||
|
};
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
const initialState = {
|
||||||
|
artists: [],
|
||||||
|
}
|
||||||
|
|
||||||
|
export default appReducer = (state = initialState, action) => {
|
||||||
|
switch (action.type) {
|
||||||
|
case FETCH_ARTISTE:
|
||||||
|
return {...state, artists: action.payload};
|
||||||
|
default:
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
import {configureStore} from '@reduxjs/toolkit'
|
||||||
|
import appReducer from './appReducer';
|
||||||
|
|
||||||
|
// Reference here all your application reducers
|
||||||
|
const reducer = {
|
||||||
|
appReducer: appReducer,
|
||||||
|
}
|
||||||
|
|
||||||
|
// @ts-ignore
|
||||||
|
const store = configureStore({
|
||||||
|
reducer,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
export default store;
|
Loading…
Reference in new issue