init project
This commit is contained in:
7
src/app/(withAuth)/dashboard/layout.js
Normal file
7
src/app/(withAuth)/dashboard/layout.js
Normal file
@@ -0,0 +1,7 @@
|
||||
const Layout = ({children}) => {
|
||||
return (
|
||||
<>{children}</>
|
||||
)
|
||||
}
|
||||
|
||||
export default Layout
|
||||
7
src/app/(withAuth)/dashboard/page.js
Normal file
7
src/app/(withAuth)/dashboard/page.js
Normal file
@@ -0,0 +1,7 @@
|
||||
const Page = () => {
|
||||
return (
|
||||
<div>dashboard</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default Page
|
||||
11
src/app/(withAuth)/dashboard/template.js
Normal file
11
src/app/(withAuth)/dashboard/template.js
Normal file
@@ -0,0 +1,11 @@
|
||||
const Template = ({children}) => {
|
||||
return (
|
||||
<>
|
||||
header
|
||||
sidebar
|
||||
{children}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default Template
|
||||
11
src/app/layout.js
Normal file
11
src/app/layout.js
Normal file
@@ -0,0 +1,11 @@
|
||||
export const metadata = {
|
||||
title: 'سامانه جامع راهداری',
|
||||
}
|
||||
|
||||
export default function RootLayout({children}) {
|
||||
return (<html lang="fa" dir={'rtl'}>
|
||||
<body>
|
||||
{children}
|
||||
</body>
|
||||
</html>)
|
||||
}
|
||||
5
src/app/page.js
Normal file
5
src/app/page.js
Normal file
@@ -0,0 +1,5 @@
|
||||
const Page = () => {
|
||||
return (<></>)
|
||||
}
|
||||
|
||||
export default Page
|
||||
17
src/app/template.js
Normal file
17
src/app/template.js
Normal file
@@ -0,0 +1,17 @@
|
||||
import cacheProviderRtl from "@/core/utils/cacheRtl";
|
||||
import {CssBaseline, ThemeProvider} from "@mui/material";
|
||||
import theme from "@/core/utils/theme";
|
||||
import {AppRouterCacheProvider} from "@mui/material-nextjs/v14-appRouter";
|
||||
|
||||
const Template = ({children}) => {
|
||||
return (
|
||||
<AppRouterCacheProvider CacheProvider={cacheProviderRtl} options={{enableCssLayer: true}}>
|
||||
<ThemeProvider theme={theme}>
|
||||
<CssBaseline/>
|
||||
{children}
|
||||
</ThemeProvider>
|
||||
</AppRouterCacheProvider>
|
||||
)
|
||||
}
|
||||
|
||||
export default Template
|
||||
16
src/core/utils/cacheRtl.js
Normal file
16
src/core/utils/cacheRtl.js
Normal file
@@ -0,0 +1,16 @@
|
||||
'use client'
|
||||
import createCache from "@emotion/cache";
|
||||
import {prefixer} from "stylis";
|
||||
import stylisRTLPlugin from "stylis-plugin-rtl";
|
||||
import {CacheProvider} from "@emotion/react";
|
||||
|
||||
const cache = createCache({
|
||||
key: 'mui-rtl',
|
||||
stylisPlugins: [prefixer, stylisRTLPlugin],
|
||||
});
|
||||
|
||||
const cacheProviderRtl = (props) => {
|
||||
return <CacheProvider value={cache}>{props.children}</CacheProvider>;
|
||||
}
|
||||
|
||||
export default cacheProviderRtl
|
||||
8
src/core/utils/theme.js
Normal file
8
src/core/utils/theme.js
Normal file
@@ -0,0 +1,8 @@
|
||||
'use client'
|
||||
import {createTheme} from "@mui/material";
|
||||
|
||||
const theme = createTheme({
|
||||
direction: 'rtl'
|
||||
});
|
||||
|
||||
export default theme
|
||||
Reference in New Issue
Block a user