Skip to content

Commit ef309ca

Browse files
committed
Move dashboard to subroute
1 parent f3b088d commit ef309ca

File tree

7 files changed

+40
-15
lines changed

7 files changed

+40
-15
lines changed

config/routes.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
export const Routes = {
2-
projects: "/",
3-
issues: "/issues",
4-
alerts: "/alerts",
5-
users: "/users",
6-
settings: "/settings",
2+
home: "/",
3+
projects: "/dashboard/",
4+
issues: "/dashboard/issues",
5+
alerts: "/dashboard/alerts",
6+
users: "/dashboard/users",
7+
settings: "/dashboard/settings",
78
};
File renamed without changes.

pages/dashboard/index.tsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import type { NextPage } from "next";
2+
import { PageContainer } from "@features/ui";
3+
import { ProjectList } from "@features/projects";
4+
5+
const Home: NextPage = () => {
6+
return (
7+
<PageContainer
8+
title="Projects"
9+
info="Overview of your projects sorted by alert level."
10+
>
11+
<ProjectList />
12+
</PageContainer>
13+
);
14+
};
15+
16+
export default Home;
File renamed without changes.
File renamed without changes.
File renamed without changes.

pages/index.tsx

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,24 @@
1+
import { Routes } from "@config/routes";
2+
import styled from "styled-components";
13
import type { NextPage } from "next";
2-
import { PageContainer } from "@features/ui";
3-
import { ProjectList } from "@features/projects";
44

5-
const Home: NextPage = () => {
5+
const Header = styled.header`
6+
width: 100%;
7+
height: 80px;
8+
padding: 0 2rem;
9+
display: flex;
10+
align-items: center;
11+
background: white;
12+
`;
13+
14+
const IssuesPage: NextPage = () => {
615
return (
7-
<PageContainer
8-
title="Projects"
9-
info="Overview of your projects sorted by alert level."
10-
>
11-
<ProjectList />
12-
</PageContainer>
16+
<div>
17+
<Header>
18+
<a href={Routes.projects}>Open Dashboard</a>
19+
</Header>
20+
</div>
1321
);
1422
};
1523

16-
export default Home;
24+
export default IssuesPage;

0 commit comments

Comments
 (0)