fix: loading images and tracks

This commit is contained in:
Mateusz Pstrucha committed 2021-09-08 23:28:53 +02:00
1 parent 8fcf52a36d
commit 94b3e1de0f
6 files changed
+15 -5

No files matched your search

+1
View File
@@ -12,4 +12,5 @@
max-width: 600px;
margin: auto;
box-sizing: border-box;
padding-bottom: 8em;
}
+1
View File
@@ -15,6 +15,7 @@
.status-image {
height: 3em;
width: 3em;
float: left;
margin-right: 0.5em;
border-radius: 0.5em;
+2 -2
View File
@@ -8,8 +8,8 @@ import './Status.css'
function Status(props) {
const {
id,
title,
artists = [],
title = 'Tytuł',
artists = ['Autor'],
album = {},
duration,
} = useContext(PlayingContext),
+2 -1
View File
@@ -48,7 +48,8 @@
}
.track-image {
height: 100%;
height: 2em;
width: 2em;
border-radius: 3px;
}
+8 -1
View File
@@ -2,7 +2,14 @@ import { useState } from 'react'
import { Link } from 'react-router-dom'
import './Track.css'
function Track({ id, title, artists = [], album = {}, timestamp, rank }) {
function Track({
id,
title = 'Tytuł',
artists = ['Autor'],
album = {},
timestamp,
rank,
}) {
const [open, setOpen] = useState(false)
return (
+1 -1
View File
@@ -10,7 +10,7 @@ body {
:root {
--deg: 170deg;
--white: hsl(0, 0%, 100%);
--light: hsl(var(--deg) 50% 92%);
--light: hsl(var(--deg) 50% 88%);
--main: hsl(var(--deg), 57%, 52%);
--dark: hsl(var(--deg) 55% 22%);
}