Skip to content
Snippets Groups Projects
Commit 8df58b4d authored by Julien MARGAIL's avatar Julien MARGAIL
Browse files

rename to Socials

parent 418f90fb
No related branches found
No related tags found
No related merge requests found
......@@ -80,7 +80,7 @@ export function Carousel(props: Image): JSX.Element;
interface SearchProps {}
export function Search(props: SearchProps): JSX.Element;
interface ISocialMediaList {
interface ISocials {
logo?: any,
name?: string,
url?: string,
......@@ -88,7 +88,7 @@ interface ISocialMediaList {
layout?:string
// dataList: any
}
export function SocialMediaList(props: ISocialMediaList): JSX.Element;
export function Socials(props: ISocials): JSX.Element;
interface IMenu {}
export function Menu(props: IMenu): JSX.Element;
......
......@@ -24,8 +24,8 @@ export { default as Carousel } from "./src/components/core/Carousel";
// Logo components
export { default as Logo } from "./src/components/core/Logo";
// SocialMediaList components
export { default as SocialMediaList } from "./src/components/socialmedialist";
// Socials components
export { default as Socials } from "./src/components/Socials";
// Menu components
export { default as Menu } from "./src/components/core/Menu";
......
import React from "react";
import Logo from "./core/Logo";
interface ISocialMediaList {
interface ISocials {
layout?: string;
name: string;
logo: any;
url: string;
}
const SocialMediaList = (props: ISocialMediaList) => {
const Socials = (props: ISocials) => {
const { layout, name, logo, url } = props;
return (
......@@ -28,4 +28,4 @@ const SocialMediaList = (props: ISocialMediaList) => {
);
};
export default SocialMediaList;
export default Socials;
......@@ -26,8 +26,6 @@ function index(): ReactElement {
<br></br>
<Link to="/doc/core/logo">Logo</Link>
<br></br>
<Link to="/doc/core/socialmedialist">List Social Media</Link>
<br></br>
<Link to="/doc/core/menu">Menu</Link>
<br></br>
<Link to="/doc/core/image">Image</Link>
......
......@@ -13,6 +13,8 @@ function index(): ReactElement {
<br></br>
<Link to="/doc/hero">Hero</Link>
<br></br>
<Link to="/doc/socials">Socials</Link>
<br></br>
<Link to="/doc/feature">Feature</Link>
</div>
</Content>
......
import React, { ReactElement } from "react";
import { Content } from "@onegeo/gatsby-theme-onegeo";
import { SocialMediaList } from "@onegeo/gatsby-theme-onegeo";
import { Socials } from "@onegeo/gatsby-theme-onegeo";
import { graphql, Link, PageProps } from "gatsby";
type Logo = {
......@@ -13,7 +13,7 @@ type Data = {
};
};
const socialmedialist = ({ data }: PageProps<Data>): ReactElement => {
const Socials = ({ data }: PageProps<Data>): ReactElement => {
const dataList = data.directus.partners;
return (
......@@ -27,7 +27,7 @@ const socialmedialist = ({ data }: PageProps<Data>): ReactElement => {
<pre>
<code>
{`
interface ISocialMediaList {
interface ISocials {
logo?: any,
name?: string,
url?: string,
......@@ -60,7 +60,7 @@ const socialmedialist = ({ data }: PageProps<Data>): ReactElement => {
{dataList.map((item: any) => {
return (
<div key={item.id}>
<SocialMediaList
<Socials
name={item.name}
url={item.url}
logo={`${process.env.DIRECTUS_URL}assets/${item.logo.id}`}
......@@ -76,7 +76,7 @@ const socialmedialist = ({ data }: PageProps<Data>): ReactElement => {
{dataList.map((item: any) => {
return (
<div key={item.id}>
<SocialMediaList
<Socials
name={item.name}
url={item.url}
logo={`${process.env.DIRECTUS_URL}assets/${item.logo.id}`}
......@@ -87,13 +87,13 @@ const socialmedialist = ({ data }: PageProps<Data>): ReactElement => {
})}
</div>
{/* <div className="flex gap-6 m-4">
<SocialMediaList dataList={dataList} layout="col" />
<Socials dataList={dataList} layout="col" />
</div> */}
</Content>
);
};
export default socialmedialist;
export default Socials;
export const query = graphql`
query {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment