Skip to content

Commit

Permalink
Remove @ based path
Browse files Browse the repository at this point in the history
  • Loading branch information
hackerwins committed Jun 24, 2024
1 parent cc05e1a commit b3df0e7
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 29 deletions.
36 changes: 17 additions & 19 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ import {
ProjectSettingsPage,
CommunityPage,
NotFoundPage,
} from '@/pages';
import { useAppSelector } from '@/app/hooks';
import { DocumentDetail } from '@/features/documents';
import { selectPreferences } from '@/features/users/usersSlice';
import { TestPage, ButtonView, PopoverView, DropdownView, InputView, BreadcrumbView, ModalView } from '@/test';
} from 'pages';
import { useAppSelector } from 'app/hooks';
import { DocumentDetail } from 'features/documents';
import { selectPreferences } from 'features/users/usersSlice';
import { TestPage, ButtonView, PopoverView, DropdownView, InputView, BreadcrumbView, ModalView } from 'test';

function App() {
const { theme } = useAppSelector(selectPreferences);
Expand All @@ -47,7 +47,7 @@ function App() {
<Router basename={import.meta.env.PUBLIC_URL}>
<Routes>
<Route path="/" element={<Navigate to="/login" replace />} />
<Route element={<PublicRoute />} >
<Route element={<PublicRoute />}>
<Route path="/login" element={<LoginPage />} />
<Route path="/signup" element={<SignupPage />} />
</Route>
Expand All @@ -63,19 +63,17 @@ function App() {
<Route path="/settings" element={<SettingsPage />} />
</Route>
<Route path="/community" element={<CommunityPage />} />
{
import.meta.env.NODE_ENV === 'development' && (
<Route path="/test" element={<TestPage />}>
<Route path="/test" element={<Navigate to="./button" />} />
<Route path="/test/button" element={<ButtonView />} />
<Route path="/test/popover" element={<PopoverView />} />
<Route path="/test/dropdown" element={<DropdownView />} />
<Route path="/test/input" element={<InputView />} />
<Route path="/test/breadcrumb" element={<BreadcrumbView />} />
<Route path="/test/modal" element={<ModalView />} />
</Route>
)
}
{import.meta.env.NODE_ENV === 'development' && (
<Route path="/test" element={<TestPage />}>
<Route path="/test" element={<Navigate to="./button" />} />
<Route path="/test/button" element={<ButtonView />} />
<Route path="/test/popover" element={<PopoverView />} />
<Route path="/test/dropdown" element={<DropdownView />} />
<Route path="/test/input" element={<InputView />} />
<Route path="/test/breadcrumb" element={<BreadcrumbView />} />
<Route path="/test/modal" element={<ModalView />} />
</Route>
)}
<Route path="*" element={<NotFoundPage />} />
</Routes>
</Router>
Expand Down
4 changes: 2 additions & 2 deletions src/app/appThunk.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { createAsyncThunk } from '@reduxjs/toolkit';
import type { AsyncThunkPayloadCreator, AsyncThunk, Dispatch } from '@reduxjs/toolkit';
import { ConnectError } from '@connectrpc/connect';
import { fromErrorDetails } from '@/api/converter';
import { RPCError } from '@/api/types';
import { fromErrorDetails } from 'api/converter';
import { RPCError } from 'api/types';

type AsyncThunkConfig = {
state?: unknown;
Expand Down
6 changes: 3 additions & 3 deletions src/app/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

import type { MiddlewareAPI, Middleware } from '@reduxjs/toolkit';
import { isRejectedWithValue } from '@reduxjs/toolkit';
import { RPCStatusCode } from '@/api/types';
import { setGlobalError } from '@/features/globalError/globalErrorSlice';
import { setIsValidToken } from '@/features/users/usersSlice';
import { RPCStatusCode } from 'api/types';
import { setGlobalError } from 'features/globalError/globalErrorSlice';
import { setIsValidToken } from 'features/users/usersSlice';

export const globalErrorHandler: Middleware = (store: MiddlewareAPI) => (next) => (action) => {
const result = next(action);
Expand Down
2 changes: 1 addition & 1 deletion src/app/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import { configureStore, ThunkAction, Action } from '@reduxjs/toolkit';
import { usersReducer, projectsReducer, documentsReducer, globalErrorReducer } from '@/features';
import { usersReducer, projectsReducer, documentsReducer, globalErrorReducer } from 'features';
import { globalErrorHandler } from './middleware';

export const store = configureStore({
Expand Down
4 changes: 0 additions & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@

/* Paths */
"baseUrl": "./src",
"paths": {
"@/*": ["./*"]
},

"types": ["vite/client", "node", "vite-plugin-svgr/client"]
},
"include": ["src", "vite.config.ts"]
Expand Down

0 comments on commit b3df0e7

Please sign in to comment.