diff --git a/frontend/src/reducer.ts b/frontend/src/reducer.ts index 8dd291fa..cc3d97c0 100644 --- a/frontend/src/reducer.ts +++ b/frontend/src/reducer.ts @@ -14,7 +14,7 @@ import campaignsReducer from './views/StartView/campaignsSlice'; import startViewReducer from './views/StartView/startViewSlice'; /** - * Reducer for reducer from all slices used in project + * Combined reducer containing reducers from all slices used in project */ export const appReducer = combineReducers({ theme: themeReducer, diff --git a/frontend/src/views/ErrorView/ErrorView.tsx b/frontend/src/views/ErrorView/ErrorView.tsx index c4b5b52a..79ddaf9c 100644 --- a/frontend/src/views/ErrorView/ErrorView.tsx +++ b/frontend/src/views/ErrorView/ErrorView.tsx @@ -6,7 +6,7 @@ import { ViewWithSidebarWrapper } from '../components/ViewWithSidebarWrapper/Vie import { clearError } from './errorSlice'; /** - * Component shown in error boundary + * Component shown as error boundary * @returns */ export const ErrorView: React.FC = () => { diff --git a/frontend/src/views/ExplorerView/components/OtherEventsPanel/OtherEventsPanel.tsx b/frontend/src/views/ExplorerView/components/OtherEventsPanel/OtherEventsPanel.tsx index 4c30c280..140f7352 100644 --- a/frontend/src/views/ExplorerView/components/OtherEventsPanel/OtherEventsPanel.tsx +++ b/frontend/src/views/ExplorerView/components/OtherEventsPanel/OtherEventsPanel.tsx @@ -20,9 +20,9 @@ type OtherEventsPanelProps = { * Components used to navigate between event currently displayed in MapView * and its children/parents by displaying two set of buttons: * - first allows to open OtherEventsDialog with detailed display - * of event's parents/children, - * which in turn allows to open them in ExplorerView by clicking - * - second displays names of children (selecting them on click) + * of event's parents/children, which in turn allows to open them + * in ExplorerView by clicking + * - second displays names of children (opening them in ExplorerView on click) * and button for creating new children (opens ExplorerDialog * with currentEvent already filled in as child) * @param props diff --git a/frontend/src/views/ExplorerView/explorerViewSlice.ts b/frontend/src/views/ExplorerView/explorerViewSlice.ts index 45e25b27..a146d596 100644 --- a/frontend/src/views/ExplorerView/explorerViewSlice.ts +++ b/frontend/src/views/ExplorerView/explorerViewSlice.ts @@ -12,8 +12,8 @@ const initialState: ExplorerViewSlice = { }; /** - * Redux slice used to store data about session and event currently displayed/selected - * in CodexView + * Redux slice used to store data about session and event + * currently displayed/selected in CodexView */ const explorerViewSlice = createSlice({ name: 'explorerView', diff --git a/frontend/src/views/LandingView/forms/RegisterForm.tsx b/frontend/src/views/LandingView/forms/RegisterForm.tsx index 94444829..fbb38047 100644 --- a/frontend/src/views/LandingView/forms/RegisterForm.tsx +++ b/frontend/src/views/LandingView/forms/RegisterForm.tsx @@ -33,7 +33,7 @@ export const AUTH_URL = '/api/auth'; /** * Component responsible for displaying register form, registering user - * and login them in if registration is successful + * and logging them in if registration is successful * @param props * @returns */ diff --git a/frontend/src/views/LandingView/userDetailsSlice.ts b/frontend/src/views/LandingView/userDetailsSlice.ts index 577a52dd..ddca344c 100644 --- a/frontend/src/views/LandingView/userDetailsSlice.ts +++ b/frontend/src/views/LandingView/userDetailsSlice.ts @@ -19,6 +19,9 @@ export const fetchUserDetails = createAsyncThunk('userDetails/fetchDetails', asy return response; }); +/** + * Redux slice used to store user data (username, email, avatar) + */ const userDetailsSlice = createSlice({ name: 'userDetails', initialState, diff --git a/frontend/src/views/LoadingView/LoadingView.tsx b/frontend/src/views/LoadingView/LoadingView.tsx index e012ddb8..b3ff2d0e 100644 --- a/frontend/src/views/LoadingView/LoadingView.tsx +++ b/frontend/src/views/LoadingView/LoadingView.tsx @@ -1,5 +1,10 @@ import { CircularProgress, Paper, Stack } from '@mui/material'; +/** + * Component shown when an operation is being performed + * and application waits for data to display proper view + * @returns + */ export const LoadingView: React.FC = () => ( = props => { diff --git a/frontend/src/views/components/CustomSnackbar/useSnackbar.tsx b/frontend/src/views/components/CustomSnackbar/useSnackbar.tsx index 5a76383c..a5d7f415 100644 --- a/frontend/src/views/components/CustomSnackbar/useSnackbar.tsx +++ b/frontend/src/views/components/CustomSnackbar/useSnackbar.tsx @@ -11,7 +11,7 @@ type useSnackbarArgs = { /** * Custom React hook used to simplify control of CustomSnackbar - * in its parent componentand sometimes allow children components + * in its parent component and allow children components * to control it as well (by passing control functions as props) * @returns */ diff --git a/frontend/src/views/components/EditMenu/EditMenu.tsx b/frontend/src/views/components/EditMenu/EditMenu.tsx index 26020cca..3ee88239 100644 --- a/frontend/src/views/components/EditMenu/EditMenu.tsx +++ b/frontend/src/views/components/EditMenu/EditMenu.tsx @@ -7,7 +7,7 @@ type EditMenuProps = { }; /** - * Context menu used to start process of edit of element it was open on + * Context menu used to start process of edition of element it was open on * (e.g. by opening dialog which allows to change element properties) * - process execution depends on function passed from parent (handleEdit) * @param props diff --git a/frontend/src/views/components/EmptyPlaceholder/EmptyPlaceholder.tsx b/frontend/src/views/components/EmptyPlaceholder/EmptyPlaceholder.tsx index 2c971946..64f77033 100644 --- a/frontend/src/views/components/EmptyPlaceholder/EmptyPlaceholder.tsx +++ b/frontend/src/views/components/EmptyPlaceholder/EmptyPlaceholder.tsx @@ -6,7 +6,7 @@ type EmptyPlaceholderProps = { /** * Generic component shown when there is no content to be shown - * (e.g. user opened CampaignView and hasn't as of yet created any campaigns), + * (e.g. user opened CampaignView and hasn't created any campaigns as of yet), * displays text message passed from parent * NOTE: in the future it would be nice to add custom graphics * to every usage of this component (e.g. a planet forming out of empty space in CampaignView) diff --git a/frontend/src/views/components/ViewWithNavBarWrapper/ViewWithNavBarWrapper.tsx b/frontend/src/views/components/ViewWithNavBarWrapper/ViewWithNavBarWrapper.tsx index 00fbc83f..cedf76fa 100644 --- a/frontend/src/views/components/ViewWithNavBarWrapper/ViewWithNavBarWrapper.tsx +++ b/frontend/src/views/components/ViewWithNavBarWrapper/ViewWithNavBarWrapper.tsx @@ -21,7 +21,7 @@ type ViewWithNavBarWrapperProps = { /** * Component serving as wrapper for all views using NavBar (that is: all views * shown to logged user). It provides it's children (views) with wrapper - * for primary (various form which crete/edit object, e.g. sessions and event) + * for primary (various form which create/edit object, e.g. sessions and event) * and secondary dialog (mostly confirmation of e.g. deleting Codex entry), * Floating Action Button wrapper (used to open primary dialog in all views) * and Snackbar for displaying feedback and tools to use it diff --git a/frontend/src/views/viewsRoutes.ts b/frontend/src/views/viewsRoutes.ts index e7f69b1c..d2be358a 100644 --- a/frontend/src/views/viewsRoutes.ts +++ b/frontend/src/views/viewsRoutes.ts @@ -13,5 +13,3 @@ const CODEX = '/codex'; const ERROR = '/error'; export default { LANDING, START, CAMPAIGN, MAP, EXPLORER, CODEX, ERROR }; - -export const viewsRoutesArray = [LANDING, START, CAMPAIGN, MAP, EXPLORER, CODEX, ERROR];