mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-06-06 17:41:52 -04:00
fix: use html entity for branding separation dash
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
3feaa8d6a5
commit
40e9478c67
5 changed files with 43 additions and 20 deletions
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file)
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
import type { BrandingConfig } from '../../../api/config/types'
|
||||
import { useFrontendConfig } from '../frontend-config-context/use-frontend-config'
|
||||
import { useMemo } from 'react'
|
||||
|
||||
/**
|
||||
* Extracts the branding from the config.
|
||||
*
|
||||
* @return the branding configuration or null if no branding has been configured
|
||||
*/
|
||||
export const useBrandingDetails = (): null | BrandingConfig => {
|
||||
const branding = useFrontendConfig().branding
|
||||
|
||||
return useMemo(() => {
|
||||
return !branding.name && !branding.logo ? null : branding
|
||||
}, [branding])
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue