Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
majakomel committed Nov 26, 2024
1 parent 703df13 commit dceb071
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
8 changes: 0 additions & 8 deletions components/ConditionalWrapper.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
// import type { ReactNode } from 'react'

// type ConditionalWrapperProps = {
// condition: boolean
// wrapper: (children: ReactNode) => ReactNode
// children: ReactNode
// }

const ConditionalWrapper = ({ condition, wrapper, children }) =>
condition ? wrapper(children) : children

Expand Down
2 changes: 1 addition & 1 deletion components/Layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useMemo } from 'react'
import { StyledStickyNavBar } from 'components/SharedStyledComponents'
import { UserProvider } from 'hooks/useUser'
import { useRouter } from 'next/router'
import ConditionalWrapper from './ConditionalWrapper'
// import ConditionalWrapper from './ConditionalWrapper'
import Footer from './Footer'
import Header from './Header'
import NavBar from './NavBar'
Expand Down

0 comments on commit dceb071

Please sign in to comment.