mirror of
https://github.com/acid-info/logos-press-engine.git
synced 2025-02-22 22:28:19 +00:00
fix: fix type errors
This commit is contained in:
parent
8db3cfebed
commit
eb09f25f2b
@ -8,11 +8,11 @@ export enum AuthorsDirection {
|
||||
ROW = 'row',
|
||||
}
|
||||
|
||||
export type AuthorsProps = React.ComponentProps<typeof AuthorsContainer> & {
|
||||
export type AuthorsProps = Partial<
|
||||
React.ComponentProps<typeof AuthorsContainer>
|
||||
> & {
|
||||
authors: LPE.Author.Document[]
|
||||
email: boolean
|
||||
gap?: number
|
||||
flexDirection?: AuthorsDirection
|
||||
}
|
||||
|
||||
const Authors: React.FC<AuthorsProps> = ({
|
||||
@ -39,8 +39,8 @@ const Authors: React.FC<AuthorsProps> = ({
|
||||
}
|
||||
|
||||
const AuthorsContainer = styled.div<{
|
||||
gap: number
|
||||
flexDirection: AuthorsDirection
|
||||
gap?: number
|
||||
flexDirection?: AuthorsDirection
|
||||
}>`
|
||||
display: flex;
|
||||
flex-direction: ${({ flexDirection }) => flexDirection};
|
||||
|
@ -1,27 +1,17 @@
|
||||
import { AppBar } from '../../components/NavBar'
|
||||
import { Footer } from '@/components/Footer'
|
||||
import { Main } from '@/components/Main'
|
||||
import { useArticleContext } from '@/context/article.context'
|
||||
import { PropsWithChildren } from 'react'
|
||||
import { useThemeState } from '../../states/themeState'
|
||||
import { AppBar } from '../../components/NavBar'
|
||||
import styles from './Article.layout.module.css'
|
||||
|
||||
type Props = PropsWithChildren<{
|
||||
// onSearch: (query: string, filters: string[]) => void
|
||||
}>
|
||||
export default function ArticleLayout({ children }: Props) {
|
||||
const themeState = useThemeState()
|
||||
const { onSearch, onReset } = useArticleContext()
|
||||
|
||||
return (
|
||||
<>
|
||||
<header className={styles.header}>
|
||||
<AppBar
|
||||
isDark={themeState.mode.get() === 'dark'}
|
||||
toggle={themeState.toggleMode}
|
||||
onSearch={onSearch}
|
||||
onReset={onReset}
|
||||
/>
|
||||
<AppBar />
|
||||
</header>
|
||||
<Main>{children}</Main>
|
||||
<Footer />
|
||||
|
@ -1,27 +1,20 @@
|
||||
import { AppBar } from '../../components/NavBar'
|
||||
import { Footer } from '@/components/Footer'
|
||||
import { Main } from '@/components/Main'
|
||||
import { useEpisodeContext } from '@/context/episode.context'
|
||||
import { PropsWithChildren } from 'react'
|
||||
import { useThemeState } from '../../states/themeState'
|
||||
import { AppBar } from '../../components/NavBar'
|
||||
import styles from './Episode.layout.module.css'
|
||||
|
||||
type Props = PropsWithChildren<{
|
||||
// onSearch: (query: string, filters: string[]) => void
|
||||
}>
|
||||
export default function EpisodeLayout({ children }: Props) {
|
||||
const themeState = useThemeState()
|
||||
const { onSearch, onReset } = useEpisodeContext()
|
||||
|
||||
return (
|
||||
<>
|
||||
<header className={styles.header}>
|
||||
<AppBar
|
||||
isDark={themeState.mode.get() === 'dark'}
|
||||
toggle={themeState.toggleMode}
|
||||
onSearch={onSearch}
|
||||
onReset={onReset}
|
||||
/>
|
||||
<AppBar />
|
||||
</header>
|
||||
<Main>{children}</Main>
|
||||
<Footer />
|
||||
|
@ -1,22 +1,16 @@
|
||||
import { AppBar } from '../../components/NavBar'
|
||||
import { Footer } from '@/components/Footer'
|
||||
import { Main } from '@/components/Main'
|
||||
import { PropsWithChildren } from 'react'
|
||||
import { useThemeState } from '../../states/themeState'
|
||||
import { AppBar } from '../../components/NavBar'
|
||||
import styles from './Podcasts.layout.module.css'
|
||||
|
||||
type Props = PropsWithChildren
|
||||
|
||||
export default function PodcastsLayout({ children }: Props) {
|
||||
const themeState = useThemeState()
|
||||
|
||||
return (
|
||||
<>
|
||||
<header className={styles.header}>
|
||||
<AppBar
|
||||
isDark={themeState.mode.get() === 'dark'}
|
||||
toggle={themeState.toggleMode}
|
||||
/>
|
||||
<AppBar />
|
||||
</header>
|
||||
<Main>{children}</Main>
|
||||
<Footer />
|
||||
|
@ -1,22 +1,16 @@
|
||||
import { AppBar } from '../../components/NavBar'
|
||||
import { Footer } from '@/components/Footer'
|
||||
import { Main } from '@/components/Main'
|
||||
import { uiConfigs } from '@/configs/ui.configs'
|
||||
import styled from '@emotion/styled'
|
||||
import { PropsWithChildren } from 'react'
|
||||
import { useThemeState } from '../../states/themeState'
|
||||
import { AppBar } from '../../components/NavBar'
|
||||
import styles from './Search.layout.module.css'
|
||||
|
||||
export default function SearchLayout(props: PropsWithChildren<any>) {
|
||||
const themeState = useThemeState()
|
||||
|
||||
return (
|
||||
<>
|
||||
<header className={styles.header}>
|
||||
<AppBar
|
||||
isDark={themeState.mode.get() === 'dark'}
|
||||
toggle={themeState.toggleMode}
|
||||
/>
|
||||
<AppBar />
|
||||
</header>
|
||||
<MainContainer className={'search_page'}>{props.children}</MainContainer>
|
||||
<Footer />
|
||||
|
Loading…
x
Reference in New Issue
Block a user