chore: optimize layout of image resources (#2221)
Optimize layout of image resource
This commit is contained in:
parent
e6a90a8be8
commit
0c0c72c3ca
1 changed files with 6 additions and 1 deletions
|
|
@ -52,7 +52,12 @@ const MemoResourceListView: React.FC<Props> = (props: Props) => {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div className={classNames("w-full mt-2 grid gap-2 grid-cols-2 sm:grid-cols-3")}>
|
<div
|
||||||
|
className={classNames(
|
||||||
|
"w-full mt-2 grid gap-2 grid-cols-2",
|
||||||
|
imageResourceList.length === 4 ? "sm:grid-cols-2" : "sm:grid-cols-3"
|
||||||
|
)}
|
||||||
|
>
|
||||||
{imageResourceList.map((resource) => {
|
{imageResourceList.map((resource) => {
|
||||||
const url = getResourceUrl(resource);
|
const url = getResourceUrl(resource);
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue