@ludo.ninja/components 1.6.8 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4 @@
1
+ import { AppProps } from 'next/app';
2
+ import { ApolloClient, NormalizedCacheObject } from '@apollo/client';
3
+ export declare const APOLLO_STATE_PROP_NAME = "__APOLLO_STATE__";
4
+ export declare function addApolloState(client: ApolloClient<NormalizedCacheObject>, pageProps: AppProps['pageProps']): any;
@@ -0,0 +1,7 @@
1
+ export var APOLLO_STATE_PROP_NAME = '__APOLLO_STATE__';
2
+ export function addApolloState(client, pageProps) {
3
+ if (pageProps === null || pageProps === void 0 ? void 0 : pageProps.props) {
4
+ pageProps.props[APOLLO_STATE_PROP_NAME] = client.cache.extract();
5
+ }
6
+ return pageProps;
7
+ }
@@ -5,7 +5,7 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
5
5
  import React, { useEffect } from 'react';
6
6
  import { DM_Sans, Poppins } from 'next/font/google';
7
7
  import { css } from 'styled-components';
8
- import { poppinsFontVarCss } from '@/fonts/vars';
8
+ import { poppinsFontVarCss } from '@ludo.ninja/components/src/fonts';
9
9
  // const poppinsFont = Poppins({
10
10
  // subsets: ['latin'],
11
11
  // style: ['normal'],
@@ -1,7 +1,6 @@
1
1
  import { AppProps } from 'next/app';
2
- import { ApolloClient, NormalizedCacheObject } from '@apollo/client';
3
- export declare const APOLLO_STATE_PROP_NAME = "__APOLLO_STATE__";
4
- export declare function addApolloState(client: ApolloClient<NormalizedCacheObject>, pageProps: AppProps['pageProps']): any;
2
+ import { APOLLO_STATE_PROP_NAME } from '@ludo.ninja/components/src/api/graphql';
3
+ import { ApolloClient, NormalizedCacheObject } from "@apollo/client";
5
4
  type PagePropsWithApollo = AppProps['pageProps'] & {
6
5
  [APOLLO_STATE_PROP_NAME]?: NormalizedCacheObject;
7
6
  };
@@ -1,12 +1,6 @@
1
1
  import { useMemo } from 'react';
2
2
  import { graphqlConfig } from '@ludo.ninja/api';
3
- export var APOLLO_STATE_PROP_NAME = '__APOLLO_STATE__';
4
- export function addApolloState(client, pageProps) {
5
- if (pageProps === null || pageProps === void 0 ? void 0 : pageProps.props) {
6
- pageProps.props[APOLLO_STATE_PROP_NAME] = client.cache.extract();
7
- }
8
- return pageProps;
9
- }
3
+ import { APOLLO_STATE_PROP_NAME } from '@ludo.ninja/components/src/api/graphql';
10
4
  export function useApollo(pageProps, ENV) {
11
5
  var state = pageProps[APOLLO_STATE_PROP_NAME];
12
6
  return useMemo(function () { return graphqlConfig.initializeApollo(state, ENV); }, [state, ENV]);
@@ -1,6 +1,6 @@
1
1
  import React, { useEffect, useState } from 'react';
2
2
  import Skeleton from 'react-loading-skeleton';
3
- import { useMediaStore } from '@ludo.ninja/components';
3
+ import { useMediaStore } from '@ludo.ninja/components/src/store';
4
4
  import StyledImg from '@/system/Cards/Styles/Image';
5
5
  import { getWindowDimensions } from '@/utils/screen';
6
6
  import PauseIcon from '@/public/video/pause.svg';