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

Bump react-scripts from 4.0.3 to 5.0.0 #318

Open
wants to merge 2 commits into
base: master
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"react-redux-firebase": "^3.10.0",
"react-router": "^5.2.0",
"react-router-dom": "^5.2.0",
"react-scripts": "^4.0.3",
"react-scripts": "^5.0.0",
"redux": "^4.1.0",
"redux-firestore": "^0.15.0"
},
Expand Down
40 changes: 21 additions & 19 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,24 @@ import { Login } from "./pages/Login";
import { Application } from "./pages/Application";
import theme from "./theme";

export const App = () => (
<>
<ColorModeScript initialColorMode="light" />
<ChakraProvider theme={theme}>
<Provider store={store}>
<ReactReduxFirebaseProvider {...reduxFirebaseProps}>
<BrowserRouter>
<Switch>
<Route path="/login">
<Login />
</Route>
<Application />
</Switch>
</BrowserRouter>
</ReactReduxFirebaseProvider>
</Provider>
</ChakraProvider>
</>
);
export var App = function () {
return (
<>
<ColorModeScript initialColorMode="light" />
<ChakraProvider theme={theme}>
<Provider store={store}>
<ReactReduxFirebaseProvider {...reduxFirebaseProps}>
<BrowserRouter>
<Switch>
<Route path="/login">
<Login />
</Route>
<Application />
</Switch>
</BrowserRouter>
</ReactReduxFirebaseProvider>
</Provider>
</ChakraProvider>
</>
);
};
4 changes: 2 additions & 2 deletions src/__tests__/App.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jest.mock("../firebase", () => ({
),
})),
where: jest.fn(() => ({
onSnapshot: jest.fn(() => () =>
Promise.resolve("Never mock firebase")
onSnapshot: jest.fn(
() => () => Promise.resolve("Never mock firebase")
),
})),
})),
Expand Down
3 changes: 1 addition & 2 deletions src/__tests__/Tasks.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ jest.mock("../hooks", () => ({
archived: false,
date: "21/07/2019",
projectId: "1",
task:
"Would I rather be feared or loved? Easy. Both. I want people to be afraid of how much they love me.",
task: "Would I rather be feared or loved? Easy. Both. I want people to be afraid of how much they love me.",
userId: "jlIFXIwyAL3tzHMtzRbw",
},
],
Expand Down
2 changes: 1 addition & 1 deletion src/components/AddProject.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useSelector } from "react-redux";
import { SmallAddIcon } from "@chakra-ui/icons";
import { useFirestore } from "react-redux-firebase";

export const AddProject = () => {
export var AddProject = function () {
const [show, setShow] = useState(false);
const [projectName, setProjectName] = useState("");

Expand Down
2 changes: 1 addition & 1 deletion src/components/AddTask.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Box, Flex, Input, Button } from "@chakra-ui/react";
import { SmallAddIcon } from "@chakra-ui/icons";
import { useSelectedProjectValue } from "../context";

export const AddTask = () => {
export var AddTask = function () {
const [taskName, setTaskName] = useState("");
const [showMain, setShowMain] = useState(false);

Expand Down
2 changes: 1 addition & 1 deletion src/components/Project.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { useSelectedProjectValue } from "../context";
import { CircleIcon } from "./icons";
import { getRandomColor } from "../helpers";

export const Project = ({ project }) => {
export var Project = function ({ project }) {
const [showIcon, setShowIcon] = useState(false);
const { selectedProject, setSelectedProject } = useSelectedProjectValue();
const { colorMode } = useColorMode();
Expand Down
2 changes: 1 addition & 1 deletion src/components/Projects.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useFirestoreConnect } from "react-redux-firebase";
import { Text } from "@chakra-ui/react";
import { Project } from "./Project";

export const Projects = () => {
export var Projects = function () {
const auth = useSelector((state) => state.firebase.auth);

useFirestoreConnect([
Expand Down
2 changes: 1 addition & 1 deletion src/components/Tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { AddTask } from "./AddTask";
import { useSelectedProjectValue } from "../context";
import { staticProjects } from "../constants";

export const Tasks = () => {
export var Tasks = function () {
const { selectedProject } = useSelectedProjectValue();
const firestore = useFirestore();
const auth = useSelector((state) => state.firebase.auth);
Expand Down
2 changes: 1 addition & 1 deletion src/components/hocs/PrivateRoute.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useSelector } from "react-redux";
import { isLoaded, isEmpty } from "react-redux-firebase";
import PropTypes from "prop-types";

export const PrivateRoute = ({ children, path }) => {
export var PrivateRoute = function ({ children, path }) {
const auth = useSelector((state) => state.firebase.auth);

return (
Expand Down
18 changes: 10 additions & 8 deletions src/components/icons/CircleIcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@ import React from "react";
import PropTypes from "prop-types";
import { Icon } from "@chakra-ui/react";

export const CircleIcon = ({ boxSize, color }) => (
<Icon viewBox="0 0 200 200" boxSize={boxSize} color={color}>
<path
fill="currentColor"
d="M 100, 100 m -75, 0 a 75,75 0 1,0 150,0 a 75,75 0 1,0 -150,0"
/>
</Icon>
);
export var CircleIcon = function ({ boxSize, color }) {
return (
<Icon viewBox="0 0 200 200" boxSize={boxSize} color={color}>
<path
fill="currentColor"
d="M 100, 100 m -75, 0 a 75,75 0 1,0 150,0 a 75,75 0 1,0 -150,0"
/>
</Icon>
);
};

CircleIcon.propTypes = {
boxSize: PropTypes.number.isRequired,
Expand Down
22 changes: 12 additions & 10 deletions src/components/layout/Content.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ import { Grid, GridItem } from "@chakra-ui/react";
import { Sidebar } from "./Sidebar";
import { Tasks } from "../Tasks";

export const Content = () => (
<Grid templateColumns="repeat(5, 1fr)" w={1000} m="auto">
<GridItem colSpan={4}>
<Sidebar />
</GridItem>
<GridItem>
<Tasks />
</GridItem>
</Grid>
);
export var Content = function () {
return (
<Grid templateColumns="repeat(5, 1fr)" w={1000} m="auto">
<GridItem colSpan={4}>
<Sidebar />
</GridItem>
<GridItem>
<Tasks />
</GridItem>
</Grid>
);
};
2 changes: 1 addition & 1 deletion src/components/layout/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
import { AddIcon, MoonIcon, SunIcon } from "@chakra-ui/icons";
import AddQuickTask from "../AddQuickTask";

export const Header = () => {
export var Header = function () {
const { onOpen, onClose, isOpen } = useDisclosure();
const { colorMode, toggleColorMode } = useColorMode();

Expand Down
2 changes: 1 addition & 1 deletion src/components/layout/Sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { useSelectedProjectValue } from "../../context";
import { AddProject } from "../AddProject";
import { staticProjects } from "../../constants";

export const Sidebar = () => {
export var Sidebar = function () {
const { selectedProject, setSelectedProject } = useSelectedProjectValue();

return (
Expand Down
2 changes: 1 addition & 1 deletion src/context/selected-project-context.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import PropTypes from "prop-types";

export const SelectedProjectContext = createContext();

export const SelectedProjectProvider = ({ children }) => {
export var SelectedProjectProvider = function ({ children }) {
const [selectedProject, setSelectedProject] = useState("inbox");

return (
Expand Down
22 changes: 12 additions & 10 deletions src/pages/Application.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ import { Header } from "../components/layout/Header";
import { Content } from "../components/layout/Content";
import { SelectedProjectProvider } from "../context";

export const Application = () => (
<PrivateRoute path="/">
<SelectedProjectProvider>
<main data-testid="application">
<Header />
<Content />
</main>
</SelectedProjectProvider>
</PrivateRoute>
);
export var Application = function () {
return (
<PrivateRoute path="/">
<SelectedProjectProvider>
<main data-testid="application">
<Header />
<Content />
</main>
</SelectedProjectProvider>
</PrivateRoute>
);
};
2 changes: 1 addition & 1 deletion src/pages/Login.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useFirebase } from "react-redux-firebase";
import { useHistory } from "react-router-dom";
import StyledFirebaseAuth from "react-firebaseui/StyledFirebaseAuth";

export const Login = () => {
export var Login = function () {
const firebase = useFirebase();
const history = useHistory();

Expand Down
Loading