Skip to content

Commit

Permalink
use WordPress site name instead hardcoded name (#539)
Browse files Browse the repository at this point in the history
Co-authored-by: Riccardo Di Curti <[email protected]>
  • Loading branch information
riccardodicurti and riccardodicurtimk authored Jul 4, 2023
1 parent fc00231 commit 43e6dc5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion projects/wp-nextjs/src/components/Header/Logo.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { useAppSettings } from '@headstartwp/next';
import { css } from '@linaria/core';

const logoStyles = css`
Expand All @@ -16,9 +17,15 @@ const logoStyles = css`
`;

export const Logo = () => {
const { data, loading } = useAppSettings();

if (loading) {
return null;
}

return (
<div className={logoStyles}>
<span>Brand Logo</span>
<span>{data?.settings?.site_name || 'Brand Logo'}</span>
</div>
);
};

1 comment on commit 43e6dc5

@vercel
Copy link

@vercel vercel bot commented on 43e6dc5 Jul 4, 2023

Choose a reason for hiding this comment

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

Please sign in to comment.