fix: footer
This commit is contained in:
+29
-14
@@ -1,7 +1,7 @@
|
||||
'use client'
|
||||
import { Button } from '@/components/ui/button'
|
||||
import { Separator } from '@/components/ui/separator'
|
||||
import { Call, Location, Sms } from 'iconsax-react'
|
||||
import { Call, Location, Sms, Share } from 'iconsax-react'
|
||||
import Image from 'next/image'
|
||||
import Link from 'next/link'
|
||||
import { FC } from 'react'
|
||||
@@ -111,19 +111,34 @@ const Footer: FC = () => {
|
||||
</div>
|
||||
|
||||
<div className='flex gap-1.5'>
|
||||
{siteSetting.results.siteSetting.socialMediaLinks.map((social) => (
|
||||
<Link key={social.id} href={social.url} target="_blank" rel="noopener noreferrer">
|
||||
<div className='size-10 bg-[#878787] hover:bg-primary rounded-full flex justify-center items-center transition-colors'>
|
||||
<Image
|
||||
src={social.icon}
|
||||
alt='social media'
|
||||
width={20}
|
||||
height={20}
|
||||
className='w-5 h-5 object-contain brightness-0 invert'
|
||||
/>
|
||||
</div>
|
||||
</Link>
|
||||
))}
|
||||
{siteSetting.results.siteSetting.socialMediaLinks.map((social) => {
|
||||
const isValidUrl = (str: string) => {
|
||||
try {
|
||||
new URL(str)
|
||||
return true
|
||||
} catch {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<Link key={social.id} href={social.url} target="_blank" rel="noopener noreferrer">
|
||||
<div className='size-10 bg-[#878787] hover:bg-primary rounded-full flex justify-center items-center transition-colors'>
|
||||
{isValidUrl(social.icon) ? (
|
||||
<Image
|
||||
src={social.icon}
|
||||
alt='social media'
|
||||
width={20}
|
||||
height={20}
|
||||
className='w-5 h-5 object-contain brightness-0 invert'
|
||||
/>
|
||||
) : (
|
||||
<Share size={20} className='text-white' />
|
||||
)}
|
||||
</div>
|
||||
</Link>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user