mirror of
https://github.com/vercel/commerce.git
synced 2025-07-23 04:36:49 +00:00
Upgrade dependencies & pnpm (#785)
* Updated log * Updates to root * Updates to pnpm * successfully moved to pnpm * type issue * Local as the default provider * Upgrade dependencies * Revert to local * Upgrade React * Update node-fetch deps * Fix types * Ignore warnings * Fix missing dependency * Update pnpm-lock.yaml * Add missing @types/cookie * Upgrade dependencies * Fix missing dependencies * Update README.md Co-authored-by: Bel Curcio <curciobel@gmail.com>
This commit is contained in:
@@ -5,7 +5,7 @@ import React, {
|
||||
JSXElementConstructor,
|
||||
useRef,
|
||||
} from 'react'
|
||||
import mergeRefs from 'react-merge-refs'
|
||||
import { mergeRefs } from 'react-merge-refs'
|
||||
import s from './Button.module.css'
|
||||
import { LoadingDots } from '@components/ui'
|
||||
|
||||
|
@@ -7,7 +7,7 @@ import useMeasure from 'react-use-measure'
|
||||
|
||||
export interface CollapseProps {
|
||||
title: string
|
||||
children: ReactNode
|
||||
children?: ReactNode
|
||||
}
|
||||
|
||||
const Collapse: FC<CollapseProps> = ({ title, children }) => {
|
||||
|
@@ -4,7 +4,7 @@ import s from './Grid.module.css'
|
||||
|
||||
interface GridProps {
|
||||
className?: string
|
||||
children?: ReactNode[] | Component[] | any[]
|
||||
children?: ReactNode
|
||||
layout?: 'A' | 'B' | 'C' | 'D' | 'normal'
|
||||
variant?: 'default' | 'filled'
|
||||
}
|
||||
|
@@ -1,6 +1,10 @@
|
||||
import NextLink, { LinkProps as NextLinkProps } from 'next/link'
|
||||
|
||||
const Link: React.FC<NextLinkProps> = ({ href, children, ...props }) => {
|
||||
const Link: React.FC<
|
||||
NextLinkProps & {
|
||||
children?: React.ReactNode
|
||||
}
|
||||
> = ({ href, children, ...props }) => {
|
||||
return (
|
||||
<NextLink href={href}>
|
||||
<a {...props}>{children}</a>
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { FC, useRef, useEffect, useCallback } from 'react'
|
||||
import { FC, useRef, useEffect, useCallback, ReactNode } from 'react'
|
||||
import s from './Modal.module.css'
|
||||
import FocusTrap from '@lib/focus-trap'
|
||||
import { Cross } from '@components/icons'
|
||||
@@ -6,9 +6,8 @@ import { disableBodyScroll, clearAllBodyScrollLocks } from 'body-scroll-lock'
|
||||
|
||||
interface ModalProps {
|
||||
className?: string
|
||||
children?: any
|
||||
children?: ReactNode
|
||||
onClose: () => void
|
||||
onEnter?: () => void | null
|
||||
}
|
||||
|
||||
const Modal: FC<ModalProps> = ({ children, onClose }) => {
|
||||
|
@@ -11,6 +11,7 @@ interface SkeletonProps {
|
||||
width?: string | number
|
||||
height?: string | number
|
||||
boxHeight?: string | number
|
||||
children?: React.ReactNode
|
||||
}
|
||||
|
||||
const Skeleton: React.FC<SkeletonProps> = ({
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import React, { FC, useCallback, useMemo } from 'react'
|
||||
import React, { FC, ReactNode, useCallback, useMemo } from 'react'
|
||||
import { ThemeProvider } from 'next-themes'
|
||||
|
||||
export interface State {
|
||||
@@ -124,7 +124,7 @@ function uiReducer(state: State, action: Action) {
|
||||
}
|
||||
}
|
||||
|
||||
export const UIProvider: FC = (props) => {
|
||||
export const UIProvider: FC<{ children?: ReactNode }> = (props) => {
|
||||
const [state, dispatch] = React.useReducer(uiReducer, initialState)
|
||||
|
||||
const openSidebar = useCallback(
|
||||
@@ -195,6 +195,7 @@ export const UIProvider: FC = (props) => {
|
||||
setSidebarView,
|
||||
setUserAvatar,
|
||||
}),
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
[state]
|
||||
)
|
||||
|
||||
@@ -209,7 +210,9 @@ export const useUI = () => {
|
||||
return context
|
||||
}
|
||||
|
||||
export const ManagedUIContext: FC = ({ children }) => (
|
||||
export const ManagedUIContext: FC<{ children?: ReactNode }> = ({
|
||||
children,
|
||||
}) => (
|
||||
<UIProvider>
|
||||
<ThemeProvider>{children}</ThemeProvider>
|
||||
</UIProvider>
|
||||
|
Reference in New Issue
Block a user