Skip to content

Commit

Permalink
chore: exclude phn-header temporally | hj
Browse files Browse the repository at this point in the history
  • Loading branch information
henrijoss committed Jan 8, 2025
1 parent 04add4d commit cade169
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions app/phn-header/page.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
'use client';

import { PButton, PIcon, PLinkPure } from '@porsche-design-system/components-react/ssr';
import React, { useEffect } from 'react';
import { defineCustomElements } from '@porschehn/navigation/loader';
import React from 'react';
// import { defineCustomElements } from '@porschehn/navigation/loader';

export default function PhnHeaderPage() {
useEffect(() => {
if (typeof window !== 'undefined') {
defineCustomElements(window);
}
}, []);
// useEffect(() => {
// if (typeof window !== 'undefined') {
// defineCustomElements(window);
// }
// }, []);

return (
<>
<phn-header env="preview" locale="de-DE" style={{ position: 'absolute', left: 0, right: 0 }} />
{/*<phn-header env="preview" locale="de-DE" style={{ position: 'absolute', left: 0, right: 0 }} />*/}

<div style={{ paddingTop: 180 }}>
<PButton>Some PButton</PButton>
Expand Down
2 changes: 1 addition & 1 deletion components/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { PDivider, PHeadline } from '@porsche-design-system/components-react/ssr
import React from 'react';
import { PrefixedLink } from './prefixedLink';

export const Header = (): JSX.Element => (
export const Header = () => (
<>
<PHeadline variant="headline-2" align="center">
Example usage of the Porsche-Design-System NextJS
Expand Down
2 changes: 1 addition & 1 deletion components/prefixedLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { PLinkPure } from '@porsche-design-system/components-react/ssr';
import Link, { LinkProps } from 'next/link';
import React, { PropsWithChildren } from 'react';

export const PrefixedLink = ({ href, ...props }: PropsWithChildren<LinkProps>): JSX.Element => (
export const PrefixedLink = ({ href, ...props }: PropsWithChildren<LinkProps>) => (
<PLinkPure>
<Link href={href} as={`${process.env.BASE_PATH ?? ''}${href}`} {...props} />
</PLinkPure>
Expand Down

0 comments on commit cade169

Please sign in to comment.