Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Remove dashboard #180

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ After that, every time you want to run it you may execute the run script: with t
- Spinner
- Suspense

###### Screens
- Dashboard

## Bootstrap libraries

|||
Expand Down
4 changes: 2 additions & 2 deletions generators/app/templates/src/components/Routes/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { User } from 'contexts/UserContext/reducer';

import PATHS from './paths';

const Home = lazy(() => import('../../screens/Dashboard/screens/Home'));
const Login = lazy(() => import('../../screens/Dashboard/screens/Login'));
const Home = lazy(() => import('../../screens/Home'));
const Login = lazy(() => import('../../screens/Login'));
// Add imports for screens above (FOR GENERATORS, DO NOT REMOVE)

const MAIN_PUBLIC_PATH = PATHS.login;
Expand Down
19 changes: 8 additions & 11 deletions generators/app/templates/src/components/Routes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import Suspense from '../Suspense';

import { ROUTES } from './constants';
import styles from './styles.module.scss';
import Dashboard from "screens/Dashboard";

function Routes() {
const user = useSelector((state) => state.user);
Expand All @@ -16,16 +15,14 @@ function Routes() {
<div className={styles.container}>
<Suspense>
<RoutesSwitch>
<Route path="/" element={<Dashboard />}>
{ROUTES.map(({ redirectTo, path, element, ...config }) => (
<Route
key={path}
path={path}
element={redirectTo?.(user) ? <Navigate to={redirectTo?.(user) as string} /> : element}
{...config}
/>
))}
</Route>
{ROUTES.map(({ redirectTo, path, element, ...config }) => (
<Route
key={path}
path={path}
element={redirectTo?.(user) ? <Navigate to={redirectTo?.(user) as string} /> : element}
{...config}
/>
))}
</RoutesSwitch>
</Suspense>
</div>
Expand Down
12 changes: 0 additions & 12 deletions generators/app/templates/src/screens/Dashboard/index.tsx

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
function Login() {

return (
<div>
<span>login</span>
</div>
<h1>login</h1>
);
}

Expand Down