From 08e3c7a6a7fc182ea08c70fc79f73f73819b30c1 Mon Sep 17 00:00:00 2001 From: Tyler Shipe Date: Tue, 13 Apr 2021 15:48:36 -0400 Subject: [PATCH] testing netlify deploy --- components/Tooltip.tsx | 48 ++++++++++++++++++++++++++++++++++++++++++ netlify.toml | 6 ++++++ next.config.js | 1 + pages/stats.tsx | 4 ++-- 4 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 components/Tooltip.tsx create mode 100644 netlify.toml diff --git a/components/Tooltip.tsx b/components/Tooltip.tsx new file mode 100644 index 0000000..9db17a7 --- /dev/null +++ b/components/Tooltip.tsx @@ -0,0 +1,48 @@ +import React, { useRef } from 'react' +import { useTooltipTriggerState } from '@react-stately/tooltip' +import { mergeProps } from '@react-aria/utils' +import { useTooltip, useTooltipTrigger } from '@react-aria/tooltip' + +function TooltipContent({ state, ...props }) { + const { tooltipProps } = useTooltip(props, state) + + return ( + + {props.children} + + ) +} + +export default function Tooltip(props) { + const state = useTooltipTriggerState(props) + const ref = useRef() + + console.log('content', props.content) + + const { triggerProps, tooltipProps } = useTooltipTrigger(props, state, ref) + + return ( + + + {/* {React.cloneElement(props.children, { ref, ...triggerProps })} */} + {state.isOpen && ( + + {props.content} + + )} + + ) +} diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 0000000..7b33b9d --- /dev/null +++ b/netlify.toml @@ -0,0 +1,6 @@ +[build] +command = "npm run build" +publish = "out" + +[[plugins]] +package = "@netlify/plugin-nextjs" diff --git a/next.config.js b/next.config.js index 006e7c4..07ac0eb 100644 --- a/next.config.js +++ b/next.config.js @@ -1,6 +1,7 @@ const withAntdLess = require('next-plugin-antd-less') module.exports = withAntdLess({ + target: 'serverless', lessVarsFilePath: './styles/theme.less', webpack(config) { config.module.rules.push({ diff --git a/pages/stats.tsx b/pages/stats.tsx index 57a2392..c22a05b 100644 --- a/pages/stats.tsx +++ b/pages/stats.tsx @@ -255,7 +255,7 @@ export default function StatsPage() { {selectedAsset ? (
- Historical + Historical - Stats + Stats