Skip to content

Commit 08690f2

Browse files
WIP. add nextjs template
use redirects for /pages/home
1 parent 2923bfc commit 08690f2

File tree

3 files changed

+14
-34
lines changed

3 files changed

+14
-34
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/** @type {import('next').NextConfig} */
2+
const nextConfig = {
3+
async redirects() {
4+
return [
5+
{
6+
source: '/',
7+
destination: '/pages/home',
8+
permanent: true,
9+
},
10+
]
11+
},
12+
}
13+
14+
export default nextConfig;

packages/devextreme-cli/src/templates/nextjs/application/src/app-routes.tsx

Lines changed: 0 additions & 24 deletions
This file was deleted.

packages/devextreme-cli/src/templates/nextjs/application/src/app/layout.tsx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ function Page({ children }) {
2020

2121
if (loading) {
2222
return <LoadPanel visible={true} />;
23-
} else if (user) {
24-
return children;
2523
}
2624

2725
return children;
@@ -30,15 +28,7 @@ function Page({ children }) {
3028
export default function RootLayout({ children }) {
3129
const screenSizeClass = useScreenSizeClass();
3230
const themeContext = useThemeContext();
33-
3431
const pathname = usePathname ();
35-
const router = useRouter();
36-
37-
useEffect(() => {
38-
if(pathname === '/') {
39-
router.push('/pages/home')
40-
}
41-
}, [pathname]);
4232

4333
return (
4434
<html lang="en">

0 commit comments

Comments
 (0)