Add NextTopLoader and fix Footer position

This commit is contained in:
2023-07-22 23:38:08 +04:00
parent c7223ce6ad
commit c63943c6fe
5 changed files with 25 additions and 9 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
import Footer from '../components/footer'
import NextTopLoader from 'nextjs-toploader'
import Navigasyon from '../components/navigasyon'
import AuthProvider from './auth-provider'
import ThemeRegistry from './theme-registy'
@@ -55,11 +55,11 @@ export default async function RootLayout({children, Session}) {
return (
<html lang='fr'>
<body>
<NextTopLoader />
<AuthProvider session={Session}>
<ThemeRegistry>
<Navigasyon />
{children}
<Footer />
</ThemeRegistry>
</AuthProvider>
<section>
+4 -3
View File
@@ -5,10 +5,10 @@ import {jwennTeksEpiSlug} from '../../../lib/oki-api'
import AnTeks from '../../../components/teks/an-teks'
import {getAlias} from '../../../lib/utils/format'
import {formatKuveti} from '../../../lib/kuveti'
import Footer from '../../../components/footer'
const apiUrl = process.env.NEXT_PUBLIC_API_URL_ROOT || 'http://localhost:1337'
const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || 'http://localhost:3000'
const drawerWidth = 340
async function jwennAnTeks(slug) {
const teks = await jwennTeksEpiSlug(slug)
@@ -85,13 +85,14 @@ export default async function AnPawolPaj({params}) {
return (
<>
<Box sx={{display: 'flex'}}>
<Box sx={{display: 'flex', flexDirection: 'column', minHeight: '100vh'}}>
<Box
component='main'
sx={{flexGrow: 1, p: 2, mt: 2, width: {sm: `calc(100% - ${drawerWidth}px)`}}}
sx={{flexGrow: 1, p: 2, mt: 2}}
>
<AnTeks parole={anTeks.attributes} paroleId={anTeks.id} />
</Box>
<Footer />
</Box>
<section>
+4 -4
View File
@@ -3,8 +3,7 @@ import {notFound} from 'next/navigation'
import {jwennDenyeTeks} from '../../lib/oki-api'
import DenyeTeks from '../../components/teks/denye-teks'
const drawerWidth = 240
import Footer from '../../components/footer'
async function jwennDone() {
const denyeTeks = await jwennDenyeTeks()
@@ -20,13 +19,14 @@ export default async function PawolPaj() {
const denyeTeks = await jwennDone()
return (
<Box sx={{display: 'flex'}}>
<Box sx={{display: 'flex', flexDirection: 'column', minHeight: '100vh'}}>
<Box
component='main'
sx={{flexGrow: 1, p: 2, mt: 2, width: {sm: `calc(100% - ${drawerWidth}px)`}}}
sx={{flexGrow: 1, p: 2, mt: 2}}
>
<DenyeTeks denyeTeks={denyeTeks} />
</Box>
<Footer />
</Box>
)
}