Skip to content
Snippets Groups Projects
Commit 7b41c5fa authored by zh393's avatar zh393
Browse files

added a skeleton loading tile

parent a64c4d1b
Branches
No related tags found
1 merge request!4Added Banner.mov video
import { Container, Typography } from '@mui/material'
import { Container, Skeleton, Typography } from '@mui/material'
import React, { useState, useEffect } from 'react'
import { useLocation, Link } from "react-router-dom"
import config from "../../config"
......@@ -106,7 +106,26 @@ function Results() {
flexWrap: "wrap",
justifyContent: "space-between",
}}>
{recipeComponent}
{recipes.length !== 0 ?
recipeComponent :
<>
<div>
<Skeleton variant="rect" width="370px" height="231px" />
<Skeleton variant="text" width="70%" />
<Skeleton variant="text" width="80%" />
</div>
<div>
<Skeleton variant="rect" width="370px" height="231px" />
<Skeleton variant="text" width="70%" />
<Skeleton variant="text" width="80%" />
</div>
<div>
<Skeleton variant="rect" width="370px" height="231px" />
<Skeleton variant="text" width="70%" />
<Skeleton variant="text" width="80%" />
</div>
</>
}
</div>
</ Container>
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment