File tree Expand file tree Collapse file tree 2 files changed +16
-9
lines changed Expand file tree Collapse file tree 2 files changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import Navbar from './navbar/Navbar'
4
4
type LayoutProps = {
5
5
sidebarContentLeft ?: ReactNode
6
6
children : ReactNode
7
- sidebarContentRight : ReactNode
7
+ sidebarContentRight ? : ReactNode
8
8
}
9
9
10
10
export default function Layout ( {
@@ -15,14 +15,24 @@ export default function Layout({
15
15
return (
16
16
< div className = "mx-auto bg-gray-200 dark:bg-dark-800 min-h-screen" >
17
17
< Navbar />
18
- < div className = "grid grid-cols-9 gap-10 mt-10 px-60 pt-10" >
18
+ < div className = "grid grid-cols-9 gap-10 mt-10 px-4 md:px- 60 md: pt-10 " >
19
19
{ sidebarContentLeft && (
20
- < aside className = "col-span-2" > { sidebarContentLeft } </ aside >
20
+ < aside className = "col-span-2 hidden md:block" >
21
+ { sidebarContentLeft }
22
+ </ aside >
21
23
) }
22
- < main className = { sidebarContentLeft ? 'col-span-5' : 'col-span-7' } >
24
+ < main
25
+ className = {
26
+ sidebarContentLeft ? 'col-span-9 md:col-span-5' : 'md:col-span-7'
27
+ }
28
+ >
23
29
{ children }
24
30
</ main >
25
- < aside className = "col-span-2" > { sidebarContentRight } </ aside >
31
+ { sidebarContentRight && (
32
+ < aside className = "col-span-2 hidden md:block" >
33
+ { sidebarContentRight }
34
+ </ aside >
35
+ ) }
26
36
</ div >
27
37
< div > </ div >
28
38
</ div >
Original file line number Diff line number Diff line change @@ -36,10 +36,7 @@ const Home = ({
36
36
}
37
37
38
38
return (
39
- < Layout
40
- sidebarContentLeft = { leftSidebar }
41
- sidebarContentRight = { < div > Promoted</ div > }
42
- >
39
+ < Layout sidebarContentLeft = { leftSidebar } >
43
40
< >
44
41
< Feed root = { query } />
45
42
</ >
You can’t perform that action at this time.
0 commit comments