Skip to content

Commit

Permalink
Merge pull request #47 from domshyra/welcomeHeader
Browse files Browse the repository at this point in the history
Added header and loading
  • Loading branch information
domshyra committed May 25, 2023
2 parents 0899fd1 + 21db391 commit b231a7f
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions Web/src/components/Index.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Box, Grid, Skeleton, Typography } from "@mui/material";
import React, { useEffect, useState } from "react";

import { Grid } from "@mui/material";
import PlaylistCard from "./PlaylistCardSelfFetching";
import { useGetPlaylistsQuery } from "../redux/services/spotifyApi";
import { useGetRatingsQuery } from "../redux/services/playlistRatingApi";
Expand Down Expand Up @@ -28,9 +28,14 @@ const Index = () => {
};

return (
<Grid container>
{!isLoading ? cards : null}
</Grid>
<>
<Box sx={{ justifyContent: "center" }}>
<Typography variant="h3" gutterBottom>
Playlists
</Typography>
</Box>
<Grid container>{!isLoading ? cards : <Skeleton />}</Grid>
</>
);
};

Expand Down

0 comments on commit b231a7f

Please sign in to comment.