Skip to content

Commit

Permalink
Apply prettier to file
Browse files Browse the repository at this point in the history
  • Loading branch information
folkforms committed Apr 23, 2024
1 parent 4247dfb commit 6c00788
Showing 1 changed file with 24 additions and 14 deletions.
38 changes: 24 additions & 14 deletions packages/carbon-addons-devenv/src/apollo-client-hooks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
* Copyright Merative US L.P. 2020
*/

import React from 'react';
import ReactDOM from 'react-dom';
import PersonComponentApolloClientHook from './hook_samples/Person';
import LogoComponentApolloClientHook from './hook_samples/Logo';
import ApolloClientConfig from './core/ApolloClientConfig';
import ApolloClientDataProvider from './core/ApolloClientDataProvider';
import ApolloClientQueryProvider from './core/ApolloClientQueryProvider';
import Renderer from '../../sample_renderers/Renderer';
import { settings } from '../react';
import React from "react";
import ReactDOM from "react-dom";
import PersonComponentApolloClientHook from "./hook_samples/Person";
import LogoComponentApolloClientHook from "./hook_samples/Logo";
import ApolloClientConfig from "./core/ApolloClientConfig";
import ApolloClientDataProvider from "./core/ApolloClientDataProvider";
import ApolloClientQueryProvider from "./core/ApolloClientQueryProvider";
import Renderer from "../../sample_renderers/Renderer";
import { settings } from "../react";

/**
* Contains a list of all the custom appolo client hooks with components
Expand All @@ -21,19 +21,29 @@ import { settings } from '../react';
*/
const ApolloClientHookTemplate = (container, configuration, DataProvider) => {
const apolloClient = ApolloClientConfig.getConfig(configuration);

ReactDOM.render(
React.createElement(DataProvider, {
apolloClient,
configuration
configuration,
}),
container
container,
);
};

// sample apollo client compponents used
const SampleApolloClientHooks = { LogoComponentApolloClientHook, PersonComponentApolloClientHook };
const SampleApolloClientHooks = {
LogoComponentApolloClientHook,
PersonComponentApolloClientHook,
};

// ApolloClientHookTemplate, ApolloClientDataProvider, ApolloClientQueryProvider, Renderer are all apollo client helper objects that
// need to be referened in custom-carbon-addons package
export { SampleApolloClientHooks as ApolloClientHooks, ApolloClientHookTemplate, ApolloClientDataProvider, ApolloClientQueryProvider, Renderer, settings };
export {
SampleApolloClientHooks as ApolloClientHooks,
ApolloClientHookTemplate,
ApolloClientDataProvider,
ApolloClientQueryProvider,
Renderer,
settings,
};

0 comments on commit 6c00788

Please sign in to comment.