Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
Whats_In_Your_Fridge
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CI102-3TeamL
Whats_In_Your_Fridge
Commits
bb77cab5
Commit
bb77cab5
authored
3 years ago
by
zh393
Browse files
Options
Downloads
Patches
Plain Diff
added skeleton to recipe page
parent
2507504c
No related branches found
No related tags found
1 merge request
!4
Added Banner.mov video
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/pages/recipe/Recipe.js
+10
-2
10 additions, 2 deletions
src/pages/recipe/Recipe.js
with
10 additions
and
2 deletions
src/pages/recipe/Recipe.js
+
10
−
2
View file @
bb77cab5
import
React
,
{
useEffect
,
useState
}
from
'
react
'
import
{
useParams
}
from
"
react-router-dom
"
import
{
Container
,
Typography
}
from
'
@mui/material
'
;
import
{
Container
,
Typography
,
Skeleton
}
from
'
@mui/material
'
;
import
parse
from
'
html-react-parser
'
;
import
config
from
"
../../config
"
var
axios
=
require
(
"
axios
"
).
default
;
...
...
@@ -29,7 +29,15 @@ function Recipe() {
},
[])
// eslint-disable-line react-hooks/exhaustive-deps
let
body
=
<
Typography
variant
=
"
p
"
>
Loading
...
<
/Typography>
;
let
body
=
<
div
>
<
Skeleton
sx
=
{{
padding
:
2
}}
variant
=
"
text
"
width
=
"
100%
"
/>
<
Skeleton
sx
=
{{
marginBottom
:
10
,
padding
:
2
}}
variant
=
"
text
"
width
=
"
100%
"
/>
<
Skeleton
variant
=
"
text
"
width
=
"
100%
"
/>
<
Skeleton
variant
=
"
text
"
width
=
"
100%
"
/>
<
Skeleton
variant
=
"
text
"
width
=
"
100%
"
/>
<
Skeleton
variant
=
"
text
"
width
=
"
100%
"
/>
<
/div>
;
if
(
data
.
length
!==
0
)
{
let
pattern
=
/<.+>/
;
if
(
pattern
.
test
(
data
.
instructions
))
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment