frontend: remove duplicate imports of React
This commit is contained in:
parent
1e1dc45ffe
commit
617c4b2294
18 changed files with 14 additions and 19 deletions
|
@ -1,4 +1,4 @@
|
||||||
import React, { PropsWithChildren } from "react";
|
import { PropsWithChildren } from "react";
|
||||||
import { ApolloClient, ApolloProvider, InMemoryCache } from "@apollo/client";
|
import { ApolloClient, ApolloProvider, InMemoryCache } from "@apollo/client";
|
||||||
import { ParamContext } from "/Context";
|
import { ParamContext } from "/Context";
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import React from "react";
|
|
||||||
import type { Task } from "/types/schema";
|
import type { Task } from "/types/schema";
|
||||||
import classnames from "classnames";
|
import classnames from "classnames";
|
||||||
import { DateTime } from "luxon";
|
import { DateTime } from "luxon";
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
import React from "react";
|
|
||||||
|
|
||||||
type Props = { name: IconName; onClick: (e: React.MouseEvent) => void };
|
type Props = { name: IconName; onClick: (e: React.MouseEvent) => void };
|
||||||
type IconName = "start-task" | "complete-task" | "destroy-task";
|
type IconName = "start-task" | "complete-task" | "destroy-task";
|
||||||
type IconSet = Record<IconName, (props: Props) => JSX.Element>;
|
type IconSet = Record<IconName, (props: Props) => JSX.Element>;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import React, { useContext } from "react";
|
import { useContext } from "react";
|
||||||
import { ParamContext } from "/Context";
|
import { ParamContext } from "/Context";
|
||||||
import { Maybe } from "/types/schema";
|
import { Maybe } from "/types/schema";
|
||||||
import { ProjectSelect } from "/components/ProjectSelect";
|
import { ProjectSelect } from "/components/ProjectSelect";
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import React from "react";
|
|
||||||
import { useProjects } from "/hooks/queries/useProjects";
|
import { useProjects } from "/hooks/queries/useProjects";
|
||||||
import { Project, Maybe } from "/types/schema";
|
import { Project, Maybe } from "/types/schema";
|
||||||
import { Select, Option } from "/components/Select";
|
import { Select, Option } from "/components/Select";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { useSetRandomProjectColor } from "/hooks/mutations/useSetRandomProjectColor";
|
import { useSetRandomProjectColor } from "/hooks/mutations/useSetRandomProjectColor";
|
||||||
import React, { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
import { NavBar } from "/components/NavBar";
|
import { NavBar } from "/components/NavBar";
|
||||||
import { useProjects } from "/hooks/queries/useProjects";
|
import { useProjects } from "/hooks/queries/useProjects";
|
||||||
import { Project } from "/types/schema";
|
import { Project } from "/types/schema";
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import React, { ReactNode, useState, useEffect } from "react";
|
import { ReactNode, useState, useEffect } from "react";
|
||||||
|
|
||||||
const LI_CLASSNAME = [
|
const LI_CLASSNAME = [
|
||||||
"flex",
|
"flex",
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import React, { useState, useEffect } from "react";
|
import { useState, useEffect } from "react";
|
||||||
import classnames from "classnames";
|
import classnames from "classnames";
|
||||||
|
|
||||||
export type Tab = {
|
export type Tab = {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import React, { useEffect, useState, useContext } from "react";
|
import { useEffect, useState, useContext } from "react";
|
||||||
import { ParamContext } from "/Context";
|
import { ParamContext } from "/Context";
|
||||||
import { useForm } from "react-hook-form";
|
import { useForm } from "react-hook-form";
|
||||||
import { useCreateTask } from "/hooks/mutations/useCreateTask";
|
import { useCreateTask } from "/hooks/mutations/useCreateTask";
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import React from "react";
|
|
||||||
import { Task, TaskStatus } from "/types/schema";
|
import { Task, TaskStatus } from "/types/schema";
|
||||||
import { useUpdateTask } from "hooks/mutations/useUpdateTask";
|
import { useUpdateTask } from "hooks/mutations/useUpdateTask";
|
||||||
import { GET_TASKS } from "/hooks/queries/useTasks";
|
import { GET_TASKS } from "/hooks/queries/useTasks";
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import React, { useEffect, useContext } from "react";
|
import { useEffect, useContext } from "react";
|
||||||
import { ParamContext } from "/Context";
|
import { ParamContext } from "/Context";
|
||||||
import { NavBar } from "/components/NavBar";
|
import { NavBar } from "/components/NavBar";
|
||||||
import { Group } from "/components/Group";
|
import { Group } from "/components/Group";
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
import React from "react";
|
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
children: JSX.Element[];
|
children: JSX.Element[];
|
||||||
className?: string;
|
className?: string;
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import React from "react";
|
|
||||||
import ReactDOM from "react-dom/client";
|
import ReactDOM from "react-dom/client";
|
||||||
import { App } from "/components/App";
|
import { App } from "/components/App";
|
||||||
import { Projects } from "/components/Projects";
|
import { Projects } from "/components/Projects";
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import React from "react";
|
|
||||||
import ReactDOM from "react-dom/client";
|
import ReactDOM from "react-dom/client";
|
||||||
import { App } from "/components/App";
|
import { App } from "/components/App";
|
||||||
import { Task } from "/components/Task";
|
import { Task } from "/components/Task";
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import React from "react";
|
|
||||||
import ReactDOM from "react-dom/client";
|
import ReactDOM from "react-dom/client";
|
||||||
import { App } from "/components/App";
|
import { App } from "/components/App";
|
||||||
import { Task } from "/components/Task";
|
import { Task } from "/components/Task";
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import React from "react";
|
|
||||||
import ReactDOM from "react-dom/client";
|
import ReactDOM from "react-dom/client";
|
||||||
import { App } from "/components/App";
|
import { App } from "/components/App";
|
||||||
import { Tasks } from "/components/Tasks";
|
import { Tasks } from "/components/Tasks";
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
"jsx": "react",
|
"jsx": "react",
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"lib": [ "ES2022", "DOM" ],
|
"lib": [ "ES2022", "DOM" ],
|
||||||
|
"allowUmdGlobalAccess": true,
|
||||||
"baseUrl": "src/",
|
"baseUrl": "src/",
|
||||||
"paths": { "*": ["js/*"] },
|
"paths": { "*": ["js/*"] },
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
const webpack = require('webpack');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const process = require('process');
|
const process = require('process');
|
||||||
|
|
||||||
|
@ -17,4 +18,9 @@ module.exports = {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
plugins: [
|
||||||
|
new webpack.ProvidePlugin({
|
||||||
|
React: 'react',
|
||||||
|
}),
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue