Newer
Older
import { graphql, useStaticQuery } from "gatsby"
import React from "react"
import Logo from "./core/Logo"
layout?: string
name: string
logo: any
url: string
const dataDirectus = useStaticQuery(graphql`
query getSocials {
directus {
socials(
filter: { status: { _eq: "published" } }
sort: "sort"
) {
imageFile {
childImageSharp {
gatsbyImageData
}
name
publicURL
}
}
}
}
`)
const dataSocials = dataDirectus.directus.socials
const { layout } = props
const options = props.options ?? {}
{dataSocials.map((item: any, key: number) => {
return (
<div
`tooltip`,
layout == "row" ? "tooltip-top" : "tooltip-right",
oClass.social
data-tip={item.name}
key={key}
>
<Logo
image={item.logo?.imageFile}