Skip to content

Commit

Permalink
Format all source files with Biome
Browse files Browse the repository at this point in the history
  • Loading branch information
jake-low committed Jan 8, 2025
1 parent 1c3c3be commit 8376882
Show file tree
Hide file tree
Showing 939 changed files with 41,720 additions and 39,921 deletions.
277 changes: 153 additions & 124 deletions src/App.jsx

Large diffs are not rendered by default.

6 changes: 2 additions & 4 deletions src/App.test.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import { describe, it, expect } from "vitest";
import { describe, expect, it } from "vitest";
import "@testing-library/jest-dom";
import { App } from "./App";

describe("App", () => {
it("renders MapRoulette landing page and slogan", () => {
const { getByText } = global.withProvider(
<App />
);
const { getByText } = global.withProvider(<App />);
const text = getByText("Be an instant contributor to the world’s maps");
expect(text).toBeInTheDocument();
});
Expand Down
98 changes: 46 additions & 52 deletions src/PersistedStore.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,28 @@
import { combineReducers, createStore, applyMiddleware } from 'redux'
import thunk from 'redux-thunk'
import { visibleLayer } from './services/VisibleLayer/VisibleLayer'
import { visibleOverlays } from './services/VisibleLayer/VisibleOverlays'
import { currentUser, userEntities } from './services/User/User'
import { projectEntities } from './services/Project/Project'
import { adminProjectEntities } from './services/SuperAdmin/SuperAdminProjects'
import { adminUserEntities } from './services/SuperAdmin/SuperAdminUsers'
import { challengeEntities, adminChallengeEntities } from './services/Challenge/Challenge'
import { virtualChallengeEntities }
from './services/VirtualChallenge/VirtualChallenge'
import { taskEntities } from './services/Task/Task'
import { currentClusteredTasks } from './services/Task/ClusteredTask'
import { currentTaskClusters } from './services/Task/TaskClusters'
import { currentBoundedTasks } from './services/Task/BoundedTask'
import { currentReviewTasks } from './services/Task/TaskReview/TaskReview'
import { commentEntities } from './services/Comment/Comment'
import { placeEntities } from './services/Place/Place'
import { currentSearch } from './services/Search/Search'
import { openEditor } from './services/Editor/Editor'
import { currentKeyboardShortcuts }
from './services/KeyboardShortcuts/KeyboardShortcuts'
import { currentStatus } from './services/Status/Status'
import { currentErrors } from './services/Error/Error'
import { adminContext } from './services/AdminContext/AdminContext'
import { currentPreferences } from './services/Preferences/Preferences'
import { rapidEditor } from './services/RapidEditor/RapidEditor'
import { applyMiddleware, combineReducers, createStore } from "redux";
import thunk from "redux-thunk";
import { adminContext } from "./services/AdminContext/AdminContext";
import { adminChallengeEntities, challengeEntities } from "./services/Challenge/Challenge";
import { commentEntities } from "./services/Comment/Comment";
import { openEditor } from "./services/Editor/Editor";
import { currentErrors } from "./services/Error/Error";
import { currentKeyboardShortcuts } from "./services/KeyboardShortcuts/KeyboardShortcuts";
import { placeEntities } from "./services/Place/Place";
import { currentPreferences } from "./services/Preferences/Preferences";
import { projectEntities } from "./services/Project/Project";
import { rapidEditor } from "./services/RapidEditor/RapidEditor";
import { currentSearch } from "./services/Search/Search";
import { currentStatus } from "./services/Status/Status";
import { adminProjectEntities } from "./services/SuperAdmin/SuperAdminProjects";
import { adminUserEntities } from "./services/SuperAdmin/SuperAdminUsers";
import { currentBoundedTasks } from "./services/Task/BoundedTask";
import { currentClusteredTasks } from "./services/Task/ClusteredTask";
import { taskEntities } from "./services/Task/Task";
import { currentTaskClusters } from "./services/Task/TaskClusters";
import { currentReviewTasks } from "./services/Task/TaskReview/TaskReview";
import { currentUser, userEntities } from "./services/User/User";
import { virtualChallengeEntities } from "./services/VirtualChallenge/VirtualChallenge";
import { visibleLayer } from "./services/VisibleLayer/VisibleLayer";
import { visibleOverlays } from "./services/VisibleLayer/VisibleOverlays";

/**
* initializeStore sets up the redux store
Expand All @@ -33,7 +31,7 @@ import { rapidEditor } from './services/RapidEditor/RapidEditor'
*
* @author [Neil Rotstan](https://github.com/nrotstan)
*/
export const initializeStore = function() {
export const initializeStore = function () {
// Create a top-level 'entities' redux reducer that groups together the
// various entities as children.
const entities = combineReducers({
Expand All @@ -47,33 +45,29 @@ export const initializeStore = function() {
adminChallenges: adminChallengeEntities,
adminProjects: adminProjectEntities,
adminUsers: adminUserEntities,
})
});

// redux root reducer defining the top-level reducers in the store
const rootReducer = combineReducers({
visibleLayer,
visibleOverlays,
currentUser,
currentSearch,
openEditor,
currentKeyboardShortcuts,
currentStatus,
currentErrors,
adminContext,
currentPreferences,
currentClusteredTasks,
currentTaskClusters,
currentBoundedTasks,
currentReviewTasks,
entities,
rapidEditor
})
visibleLayer,
visibleOverlays,
currentUser,
currentSearch,
openEditor,
currentKeyboardShortcuts,
currentStatus,
currentErrors,
adminContext,
currentPreferences,
currentClusteredTasks,
currentTaskClusters,
currentBoundedTasks,
currentReviewTasks,
entities,
rapidEditor,
});

// Create the redux store, adding the thunk middleware so we can use
// asynchronous action creators
return createStore(
rootReducer,
undefined,
applyMiddleware(thunk)
)
}
return createStore(rootReducer, undefined, applyMiddleware(thunk));
};
6 changes: 2 additions & 4 deletions src/components/AchievementBadge/AcheivementBadge.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ import AchievementBadge from "./AchievementBadge";
describe("AchievementBadge", () => {
it("renders with achievement 16", async () => {
await act(async () => {
global.withProvider(
<AchievementBadge achievement={16} stackDepth={3} />)
}
)
global.withProvider(<AchievementBadge achievement={16} stackDepth={3} />);
});
});
});
Loading

0 comments on commit 8376882

Please sign in to comment.