fix: default layout's broken spacing

This commit is contained in:
Hossein Mehrabi 2023-08-28 03:08:05 +03:30
parent c8a50e3c48
commit 7c436b2748
No known key found for this signature in database
GPG Key ID: 45C04964191AFAA1
3 changed files with 11 additions and 11 deletions

View File

@ -16,11 +16,11 @@ export const Main = ({
}
const Container = styled.main<{
spacing: 'default' | false
spacing: 'default' | boolean
}>`
--main-margin-top: ${(props) =>
props.spacing
? uiConfigs.postSectionMargin
? uiConfigs.postSectionMargin + uiConfigs.navbarRenderedHeight
: uiConfigs.navbarRenderedHeight}px;
--main-content-padding: 16px;

View File

@ -352,7 +352,7 @@ const Container = styled.div`
flex-direction: column;
gap: 12px;
border-bottom: 1px solid rgba(var(--lsd-text-primary), 1);
padding: 0 0 14px 14px;
padding: 8px 0 14px 14px;
position: sticky;
z-index: 1;

View File

@ -1,16 +1,12 @@
import { SearchBox } from '@/components/SearchBox'
import {
extractQueryFromQuery,
extractTopicsFromQuery,
} from '@/utils/search.utils'
import { useRouter } from 'next/router'
import { SearchResultsExploreView } from '@/containers/Search/ExploreView'
import { SearchResultsListView } from '@/containers/Search/ListView'
import { LPE } from '@/types/lpe.types'
import { useEffect, useState } from 'react'
import SEO from '../components/SEO/SEO'
import { DefaultLayout } from '../layouts/DefaultLayout'
import { api } from '../services/api.service'
import unbodyApi from '../services/unbody/unbody.service'
import { LPE } from '@/types/lpe.types'
import { SearchResultsListView } from '@/containers/Search/ListView'
import { SearchResultsExploreView } from '@/containers/Search/ExploreView'
interface SearchPageProps {
topics: string[]
@ -82,6 +78,10 @@ export default function SearchPage({ topics, shows }: SearchPageProps) {
)
}
SearchPage.getLayout = function getLayout(page: React.ReactNode) {
return <DefaultLayout mainProps={{ spacing: false }}>{page}</DefaultLayout>
}
export async function getStaticProps() {
// const { data: articles = [] } = await unbodyApi.searchArticles()
// const { data: blocks = [] } = await unbodyApi.searchBlocks()