fix: update image component sizes for better responsiveness

- Added sizes attribute to Image components in Footer, MobileMenu, Nav, Calculator, Banner, and adjusted viewport meta tag in layout for improved layout handling.
This commit is contained in:
Atash03 2026-01-26 00:19:11 +05:00
parent 895d1b8c08
commit d02e8620d4
7 changed files with 13 additions and 11 deletions

View File

@ -53,7 +53,7 @@ export default function RootLayout({ children }: IProps) {
<link rel="icon" href="/logo.png" sizes="any" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no;"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
></meta>
</head>
<body className="relative overflow-x-hidden">

View File

@ -59,39 +59,39 @@ const Footer = () => {
<div className="flex md:flex-row flex-col md:gap-12 gap-6">
<div className="flex items-center gap-6">
<div className="relative w-20 h-20 rounded-full overflow-hidden">
<Image src={app2} alt="asf" fill />
<Image src={app2} alt="asf" fill sizes="80px" />
</div>
<div className="flex flex-col gap-3 w-fit">
<Link
href="https://apps.apple.com/ru/app/t%C3%BCrkmen-radio/id1622189361"
className="relative h-12 w-40 block"
target="_blank">
<Image src={apple} alt="app store" fill />
<Image src={apple} alt="app store" fill sizes="160px" />
</Link>
<Link
href="https://play.google.com/store/apps/details?id=com.app.telecom_radio"
className="relative h-12 w-40 block"
target="_blank">
<Image src={play} alt="google play" fill />
<Image src={play} alt="google play" fill sizes="160px" />
</Link>
</div>
</div>
<div className="flex items-center gap-6">
<div className="relative w-20 h-20 rounded-lg overflow-hidden">
<Image src={app1} alt="asf" fill />
<Image src={app1} alt="asf" fill sizes="80px" />
</div>
<div className="flex flex-col gap-3 w-fit">
<Link
href="https://apps.apple.com/ru/app/t%C3%BCrkmen-tv/id915833573"
className="relative h-12 w-40 block"
target="_blank">
<Image src={apple} alt="app store" fill />
<Image src={apple} alt="app store" fill sizes="160px" />
</Link>
<Link
href="https://play.google.com/store/apps/details?id=tm.ykjam.turkmentv"
className="relative h-12 w-40 block"
target="_blank">
<Image src={play} alt="google play" fill />
<Image src={play} alt="google play" fill sizes="160px" />
</Link>
</div>
</div>

View File

@ -58,7 +58,7 @@ const MobileMenu = () => {
className="relative w-[24px] h-[24px] cursor-pointer "
onClick={() => setBurgerOpen(false)}
>
<Image src={close} fill alt="menu" />
<Image src={close} fill sizes="24px" alt="menu" />
</div>
</div>
<ul className="flex flex-col gap-10 items-start justify-center p-6">

View File

@ -191,7 +191,7 @@ const Nav = () => {
<div
className="md:hidden block relative w-[24px] h-[24px] cursor-pointer p-4"
onClick={() => setBurgerOpen(true)}>
<Image src={burger} fill alt="menu" />
<Image src={burger} fill sizes="24px" alt="menu" />
</div>
</div>
</div>

View File

@ -49,7 +49,7 @@ const Calculator = () => {
<div
className="w-[24px] h-[24px] relative p-1 rounded-full flex items-center justify-center cursor-pointer"
onClick={() => calculatorContext.setCalculatorOpen(false)}>
<Image src={closeIcon} fill alt="close" />
<Image src={closeIcon} fill sizes="24px" alt="close" />
</div>
</div>
<div className="flex flex-col gap-4">

View File

@ -31,7 +31,7 @@ const Banner = () => {
{data!.data.map((item) => (
<SwiperSlide key={v4()} className="w-[200px] h-[400px]">
<Link href={item.url} className="w-full h-full" target="_blank">
<Image src={item.img_url} unoptimized alt={item.alt} fill priority className="" />
<Image src={item.img_url} unoptimized alt={item.alt} fill sizes="200px" priority className="" />
</Link>
</SwiperSlide>
))}

View File

@ -37,6 +37,8 @@ const ParticipantsList = ({ vote_id, all }: IParams) => {
const [eventStatus, setEventStatus] = useState<string>("Not started");
const [manualClose, setManualClose] = useState(false); // Track manual closure
console.log('participantsData', participantsData)
const [winnersCount, setWinnersCount] = useState<number>(0);
// States realted to web socket