Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Commit

Permalink
Revert "Hasan/fix: hero image flickering (#5716)" (#5775)
Browse files Browse the repository at this point in the history
This reverts commit f07b219.
  • Loading branch information
habib-deriv authored Oct 13, 2023
1 parent dbfae02 commit 564bf78
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
8 changes: 8 additions & 0 deletions gatsby-browser.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react'
import { createRoot } from 'react-dom/client'
import { WrapPagesWithLocaleContext } from './src/components/localization'
import { isProduction } from './src/common/websocket/config'
import { LocalStore } from './src/common/storage'
Expand Down Expand Up @@ -141,4 +142,11 @@ export const onRouteUpdate = () => {
}, 1500)
}

export const replaceHydrateFunction = () => {
return (element, container) => {
const root = createRoot(container)
root.render(element)
}
}

export const wrapPageElement = WrapPagesWithLocaleContext
11 changes: 7 additions & 4 deletions src/features/components/templates/navigation/template/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,13 @@ const NavTemplate = ({

{has_items ? (
<>
<span ref={nav_wrapper_ref}>
<MobileMenu has_top_nav={has_top_nav} />
</span>
<DesktopMenu has_centered_items={has_centered_items} />
{is_mobile_or_tablet ? (
<span ref={nav_wrapper_ref}>
<MobileMenu has_top_nav={has_top_nav} />
</span>
) : (
<DesktopMenu has_centered_items={has_centered_items} />
)}
</>
) : null}
{children}
Expand Down

1 comment on commit 564bf78

@vercel
Copy link

@vercel vercel bot commented on 564bf78 Oct 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

deriv-com – ./

deriv-com-git-master.binary.sx
deriv-com.binary.sx

Please sign in to comment.