File tree 5 files changed +12
-11
lines changed
5 files changed +12
-11
lines changed Original file line number Diff line number Diff line change 1
- import { Metadata } from 'next'
1
+ import type { PropsWithChildren , ReactElement } from 'react'
2
+ import type { Metadata } from 'next'
2
3
import './globals.css'
3
4
4
5
import { PageTitle } from 'components/PageTitle'
@@ -37,7 +38,7 @@ export const metadata: Metadata = {
37
38
} ,
38
39
}
39
40
40
- export default function RootLayout ( { children } : { children : React . ReactNode } ) {
41
+ export default function RootLayout ( { children } : PropsWithChildren ) : ReactElement {
41
42
return (
42
43
< html lang = "en" data-theme = "dark" >
43
44
< body className = "pt-20" >
Original file line number Diff line number Diff line change 1
- import { Section } from 'components'
1
+ import type { ReactElement } from 'react'
2
+ import { Section } from 'components/Section'
2
3
3
- const Page = ( ) : JSX . Element => (
4
+ const Page = ( ) : ReactElement => (
4
5
< Section title = "About" >
5
6
< div className = "text-base md:text-xl hyphens-auto" itemScope itemType = "https://schema.org/Person" >
6
7
< span itemProp = "name" > Ole-Martin Bratteng</ span > — Software Engineer. Located in the beautiful municipality
Original file line number Diff line number Diff line change 2
2
3
3
import Link from 'next/link'
4
4
import { usePathname } from 'next/navigation'
5
+ import type { ReactElement } from 'react'
5
6
6
- const PageTitle = ( ) : JSX . Element => {
7
+ const PageTitle = ( ) : ReactElement => {
7
8
const pathName = usePathname ( )
8
9
const subTitle = pathName . substring ( 1 )
9
10
Original file line number Diff line number Diff line change 1
- import type { ReactNode } from 'react'
1
+ import type { PropsWithChildren , ReactElement } from 'react'
2
2
3
- interface Props {
3
+ type Props = {
4
4
title : string
5
- children : ReactNode
6
- }
5
+ } & PropsWithChildren
7
6
8
- const Section = ( { children, title } : Props ) : JSX . Element => (
7
+ const Section = ( { children, title } : Props ) : ReactElement => (
9
8
< section className = "flex flex-wrap px-4 mb-8 first-of-type:pt-0 last-of-type:pb-0 last-of-type:mb-0" >
10
9
{ title && (
11
10
< h2 className = "mb-4 w-full text-2xl md:text-3xl" >
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments