mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 11:42:29 +08:00
fix: reduce webapp icon displayed on browser tab flickering when page is loading (#9212)
This commit is contained in:
parent
fe41e8bc18
commit
1c1e008dcf
|
@ -1,7 +1,12 @@
|
|||
import React from 'react'
|
||||
import type { FC } from 'react'
|
||||
import type { Metadata } from 'next'
|
||||
import GA, { GaType } from '@/app/components/base/ga'
|
||||
|
||||
export const metadata: Metadata = {
|
||||
icons: 'data:,', // prevent browser from using default favicon
|
||||
}
|
||||
|
||||
const Layout: FC<{
|
||||
children: React.ReactNode
|
||||
}> = ({ children }) => {
|
||||
|
|
|
@ -21,7 +21,7 @@ export function useAppFavicon(options: UseAppFaviconOptions) {
|
|||
} = options
|
||||
|
||||
useAsyncEffect(async () => {
|
||||
if (!enable)
|
||||
if (!enable || (icon_type === 'image' && !icon_url) || (icon_type === 'emoji' && !icon))
|
||||
return
|
||||
|
||||
const isValidImageIcon = icon_type === 'image' && icon_url
|
||||
|
|
Loading…
Reference in New Issue
Block a user