Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
canifa_note
Commits
a60d4dee
Commit
a60d4dee
authored
Sep 19, 2023
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: remove lazy loading image
parent
7da10cd3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
26 deletions
+0
-26
Image.tsx
web/src/components/Image.tsx
+0
-24
MemoResourceListView.tsx
web/src/components/MemoResourceListView.tsx
+0
-2
No files found.
web/src/components/Image.tsx
deleted
100644 → 0
View file @
7da10cd3
import
showPreviewImageDialog
from
"./PreviewImageDialog"
;
import
"@/less/image.less"
;
interface
Props
{
imgUrls
:
string
[];
index
:
number
;
className
?:
string
;
}
const
Image
:
React
.
FC
<
Props
>
=
(
props
:
Props
)
=>
{
const
{
className
,
imgUrls
,
index
}
=
props
;
const
handleImageClick
=
()
=>
{
showPreviewImageDialog
(
imgUrls
,
index
);
};
return
(
<
div
className=
{
"image-container "
+
className
}
onClick=
{
handleImageClick
}
>
<
img
src=
{
imgUrls
[
index
]
}
decoding=
"async"
loading=
"lazy"
/>
</
div
>
);
};
export
default
Image
;
web/src/components/MemoResourceListView.tsx
View file @
a60d4dee
...
@@ -49,7 +49,6 @@ const MemoResourceListView: React.FC<Props> = (props: Props) => {
...
@@ -49,7 +49,6 @@ const MemoResourceListView: React.FC<Props> = (props: Props) => {
src=
{
getResourceUrl
(
imageResourceList
[
0
])
}
src=
{
getResourceUrl
(
imageResourceList
[
0
])
}
onClick=
{
()
=>
handleImageClick
(
getResourceUrl
(
imageResourceList
[
0
]))
}
onClick=
{
()
=>
handleImageClick
(
getResourceUrl
(
imageResourceList
[
0
]))
}
decoding=
"async"
decoding=
"async"
loading=
"lazy"
/>
/>
</
div
>
</
div
>
)
:
(
)
:
(
...
@@ -71,7 +70,6 @@ const MemoResourceListView: React.FC<Props> = (props: Props) => {
...
@@ -71,7 +70,6 @@ const MemoResourceListView: React.FC<Props> = (props: Props) => {
src=
{
resource
.
externalLink
?
url
:
url
+
"?thumbnail=1"
}
src=
{
resource
.
externalLink
?
url
:
url
+
"?thumbnail=1"
}
onClick=
{
()
=>
handleImageClick
(
url
)
}
onClick=
{
()
=>
handleImageClick
(
url
)
}
decoding=
"async"
decoding=
"async"
loading=
"lazy"
/>
/>
</
SquareDiv
>
</
SquareDiv
>
);
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment