Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(docz-theme-default): logo link point to dynamic base #815

Merged
merged 1 commit into from
Apr 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion core/docz-theme-default/src/components/shared/Logo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ interface LogoProps {

export const Logo: SFC<LogoProps> = ({ showBg }) => {
const {
base,
title,
linkComponent: Link,
themeConfig: { logo },
Expand All @@ -74,7 +75,7 @@ export const Logo: SFC<LogoProps> = ({ showBg }) => {
if (!Link) return null
return (
<Wrapper showBg={showBg}>
<Link to="/">
<Link to={typeof base === 'string' ? base : '/'}>
{logo ? (
<LogoImg src={logo.src} width={logo.width} alt={title} />
) : (
Expand Down
1 change: 1 addition & 0 deletions core/docz/src/state.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export interface Config {
native: boolean
separator: string
codeSandbox: boolean
base?: string
}

export type Entries = Array<{ key: string; value: Entry }>
Expand Down