diff --git a/global.d.ts b/global.d.ts index f2619f17b7..fdcf8203cc 100644 --- a/global.d.ts +++ b/global.d.ts @@ -25,6 +25,15 @@ declare global { updateCallbackDone: () => void skipTransition(): void } + + declare module 'react' { + export interface HTMLAttributes + extends AriaAttributes, + DOMAttributes { + 'data-hide-print'?: boolean + 'data-testid'?: string + } + } } export {} diff --git a/src/app/notes/layout.tsx b/src/app/notes/layout.tsx index 0f612b1a57..880b1c2196 100644 --- a/src/app/notes/layout.tsx +++ b/src/app/notes/layout.tsx @@ -19,7 +19,8 @@ export default async (props: PropsWithChildren) => {
{ - + + + + diff --git a/src/components/layout/header/internal/AnimatedLogo.tsx b/src/components/layout/header/internal/AnimatedLogo.tsx new file mode 100644 index 0000000000..ec01b63471 --- /dev/null +++ b/src/components/layout/header/internal/AnimatedLogo.tsx @@ -0,0 +1,30 @@ +'use client' + +import { AnimatePresence, motion } from 'framer-motion' + +import { useViewport } from '~/atoms' + +import { useHeaderMetaShouldShow } from './hooks' +import { Logo } from './Logo' + +export const AnimatedLogo = () => { + const shouldShowMeta = useHeaderMetaShouldShow() + + const isDesktop = useViewport(($) => $.lg && $.w !== 0) + + if (isDesktop) return + + return ( + + {!shouldShowMeta && ( + + + + )} + + ) +} diff --git a/src/components/layout/header/internal/HeaderArea.tsx b/src/components/layout/header/internal/HeaderArea.tsx index 5d3d434969..2fad494c25 100644 --- a/src/components/layout/header/internal/HeaderArea.tsx +++ b/src/components/layout/header/internal/HeaderArea.tsx @@ -8,7 +8,9 @@ import styles from './grid.module.css' export const HeaderLogoArea: Component = ({ children }) => { return (
-
{children}
+
+ {children} +
) } diff --git a/src/components/layout/header/internal/HeaderMeta.tsx b/src/components/layout/header/internal/HeaderMeta.tsx index b8136ed8d6..d6c30de241 100644 --- a/src/components/layout/header/internal/HeaderMeta.tsx +++ b/src/components/layout/header/internal/HeaderMeta.tsx @@ -35,7 +35,8 @@ export const HeaderMeta = () => { {show && (
@@ -47,7 +48,7 @@ export const HeaderMeta = () => {
-
+
{slug} {seoTitle} diff --git a/src/components/layout/header/internal/UserAuth.tsx b/src/components/layout/header/internal/UserAuth.tsx index 7219568b50..f99729dc42 100644 --- a/src/components/layout/header/internal/UserAuth.tsx +++ b/src/components/layout/header/internal/UserAuth.tsx @@ -22,7 +22,7 @@ export function UserAuth() { return ( -
+
) => v.lg +const selector = (v: ExtractAtomValue) => v.lg && v.w !== 0 export const OnlyDesktop: Component = ({ children }) => { const isClient = useIsClient()