mirror of
				https://github.com/r-freeman/portfolio.git
				synced 2025-11-04 01:11:11 +00:00 
			
		
		
		
	Added types
This commit is contained in:
		
							parent
							
								
									28fbd0f6c2
								
							
						
					
					
						commit
						8e61c2d0e1
					
				@ -5,6 +5,15 @@ import {formatDate} from '@/lib/formatDate'
 | 
			
		||||
import {Prose} from './Prose'
 | 
			
		||||
import {ReactNode} from 'react'
 | 
			
		||||
 | 
			
		||||
type ArticleLayout = {
 | 
			
		||||
    children?: ReactNode
 | 
			
		||||
    isRssFeed: boolean
 | 
			
		||||
    title: string
 | 
			
		||||
    description: string
 | 
			
		||||
    ogImage: string
 | 
			
		||||
    date: string
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function ArticleLayout({
 | 
			
		||||
                                  children,
 | 
			
		||||
                                  isRssFeed = false,
 | 
			
		||||
@ -12,15 +21,7 @@ export function ArticleLayout({
 | 
			
		||||
                                  description,
 | 
			
		||||
                                  ogImage,
 | 
			
		||||
                                  date
 | 
			
		||||
                              }:
 | 
			
		||||
                                  {
 | 
			
		||||
                                      children?: ReactNode,
 | 
			
		||||
                                      isRssFeed: boolean,
 | 
			
		||||
                                      title: string,
 | 
			
		||||
                                      description: string,
 | 
			
		||||
                                      ogImage: string,
 | 
			
		||||
                                      date: string
 | 
			
		||||
                                  }) {
 | 
			
		||||
                              }: ArticleLayout) {
 | 
			
		||||
    const pathname = usePathname()
 | 
			
		||||
 | 
			
		||||
    if (isRssFeed) {
 | 
			
		||||
 | 
			
		||||
@ -2,18 +2,19 @@ import {ReactNode} from 'react'
 | 
			
		||||
import clsx from 'clsx'
 | 
			
		||||
import {Container} from './Container'
 | 
			
		||||
 | 
			
		||||
type SimpleLayout = {
 | 
			
		||||
    title: string
 | 
			
		||||
    intro: string
 | 
			
		||||
    children: ReactNode
 | 
			
		||||
    gradient: string
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function SimpleLayout({
 | 
			
		||||
                                 title,
 | 
			
		||||
                                 intro,
 | 
			
		||||
                                 children,
 | 
			
		||||
                                 gradient
 | 
			
		||||
                             }:
 | 
			
		||||
                                 {
 | 
			
		||||
                                     title: string,
 | 
			
		||||
                                     intro: string,
 | 
			
		||||
                                     children: ReactNode,
 | 
			
		||||
                                     gradient: string
 | 
			
		||||
                                 }) {
 | 
			
		||||
                             }: SimpleLayout) {
 | 
			
		||||
    return (
 | 
			
		||||
        <Container className="mt-16 sm:mt-32">
 | 
			
		||||
            <header className="max-w-2xl">
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user