mirror of
https://github.com/vale981/Vulcan
synced 2025-03-09 12:16:37 -04:00
33 lines
615 B
JavaScript
33 lines
615 B
JavaScript
![]() |
import React, { Component } from 'react';
|
||
|
import { graphql } from 'react-apollo';
|
||
|
import gql from 'graphql-tag';
|
||
|
|
||
|
const withSiteData = component => {
|
||
|
|
||
|
return graphql(
|
||
|
gql`
|
||
|
query getSiteData {
|
||
|
SiteData {
|
||
|
url
|
||
|
title
|
||
|
sourceVersion
|
||
|
logoUrl
|
||
|
}
|
||
|
}
|
||
|
`, {
|
||
|
alias: 'withSiteData',
|
||
|
|
||
|
props(props) {
|
||
|
const { data } = props;
|
||
|
return {
|
||
|
siteDataLoading: data.loading,
|
||
|
siteData: data.SiteData,
|
||
|
siteDataData: data,
|
||
|
};
|
||
|
},
|
||
|
}
|
||
|
)(component);
|
||
|
}
|
||
|
|
||
|
export default withSiteData;
|