Skip to content

Commit

Permalink
update -滑动条
Browse files Browse the repository at this point in the history
  • Loading branch information
YuChanGongzhu committed Oct 14, 2024
1 parent 3592b2d commit 8eb1268
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 deletions.
7 changes: 0 additions & 7 deletions components/MainUI/Main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import Right2 from "@/assets/icons/right2.svg";
import HealthIcon from "@/assets/icons/health.svg";
import LoyaltyIcon from "@/assets/icons/loyalty.svg";
import FitnessIcon from "@/assets/icons/fitness.svg";
import GameDataBackGround from "@/assets/icons/CTA.svg";
import { UIState } from "@/lib/UI";

import Chat from "./chat";
Expand Down Expand Up @@ -119,12 +118,6 @@ export default function Main({
{/* 中间图标组 */}
<div className="relative flex justify-center items-center w-56 h-20
bg-[url('../assets/icons/CTA.svg')] bg-contain bg-center bg-no-repeat">
{/* <Image
src={GameDataBackGround}
alt="Background"
className="absolute top-0 left-0 w-full h-full object-fit"
style={{ transform: 'scale(1.2)', transformOrigin: 'center' }}
/> */}

{/* Image 组 */}
<div className="flex justify-center relative z-10 text-[8px]">
Expand Down
22 changes: 21 additions & 1 deletion components/MainUI/Store.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,27 @@ export default function Store({ onClose }: { onClose: () => void }) {
{dataLoading ? (
<LoadingAnimation text="loading" />
) : (
<div className="grid grid-cols-2 gap-x-2 gap-y-2 px-4 py-2">
<div className="grid grid-cols-2 gap-x-2 gap-y-2 px-4 py-2 max-h-96 overflow-y-auto">
{metadata.map((data, index) => (
<div className="flex justify-center" key={index}>
<StoreItem
key={index}
image={data.image}
name={data.name}
owned={false}
/>
</div>
))}
{metadata.map((data, index) => (
<div className="flex justify-center" key={index}>
<StoreItem
key={index}
image={data.image}
name={data.name}
owned={false}
/>
</div>
))}
{metadata.map((data, index) => (
<div className="flex justify-center" key={index}>
<StoreItem
Expand Down
2 changes: 1 addition & 1 deletion components/MainUI/storeItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default function StoreItem({ image, name, owned }: StoreItemProps) {
)} */}
</div>
<div
className="bg-[url('../assets/ui/pop-label.svg')] bg-cover bg-center mt-4 w-full"
className="bg-[url('../assets/ui/pop-label.svg')] bg-cover bg-center mt-2 w-full"
onClick={() => handleItemClick()}
>
<p className="font-[12px] text-center">Buy</p>
Expand Down

0 comments on commit 8eb1268

Please sign in to comment.