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 { ParamContext } from "/Context";
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import React from "react";
|
||||
import type { Task } from "/types/schema";
|
||||
import classnames from "classnames";
|
||||
import { DateTime } from "luxon";
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from "react";
|
||||
|
||||
type Props = { name: IconName; onClick: (e: React.MouseEvent) => void };
|
||||
type IconName = "start-task" | "complete-task" | "destroy-task";
|
||||
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 { Maybe } from "/types/schema";
|
||||
import { ProjectSelect } from "/components/ProjectSelect";
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import React from "react";
|
||||
import { useProjects } from "/hooks/queries/useProjects";
|
||||
import { Project, Maybe } from "/types/schema";
|
||||
import { Select, Option } from "/components/Select";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { useSetRandomProjectColor } from "/hooks/mutations/useSetRandomProjectColor";
|
||||
import React, { useEffect } from "react";
|
||||
import { useEffect } from "react";
|
||||
import { NavBar } from "/components/NavBar";
|
||||
import { useProjects } from "/hooks/queries/useProjects";
|
||||
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 = [
|
||||
"flex",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { useState, useEffect } from "react";
|
||||
import { useState, useEffect } from "react";
|
||||
import classnames from "classnames";
|
||||
|
||||
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 { useForm } from "react-hook-form";
|
||||
import { useCreateTask } from "/hooks/mutations/useCreateTask";
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import React from "react";
|
||||
import { Task, TaskStatus } from "/types/schema";
|
||||
import { useUpdateTask } from "hooks/mutations/useUpdateTask";
|
||||
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 { NavBar } from "/components/NavBar";
|
||||
import { Group } from "/components/Group";
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React from "react";
|
||||
|
||||
type Props = {
|
||||
children: JSX.Element[];
|
||||
className?: string;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import React from "react";
|
||||
import ReactDOM from "react-dom/client";
|
||||
import { App } from "/components/App";
|
||||
import { Projects } from "/components/Projects";
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import React from "react";
|
||||
import ReactDOM from "react-dom/client";
|
||||
import { App } from "/components/App";
|
||||
import { Task } from "/components/Task";
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import React from "react";
|
||||
import ReactDOM from "react-dom/client";
|
||||
import { App } from "/components/App";
|
||||
import { Task } from "/components/Task";
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import React from "react";
|
||||
import ReactDOM from "react-dom/client";
|
||||
import { App } from "/components/App";
|
||||
import { Tasks } from "/components/Tasks";
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
"jsx": "react",
|
||||
"allowJs": true,
|
||||
"lib": [ "ES2022", "DOM" ],
|
||||
|
||||
"allowUmdGlobalAccess": true,
|
||||
"baseUrl": "src/",
|
||||
"paths": { "*": ["js/*"] },
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
const webpack = require('webpack');
|
||||
const path = require('path');
|
||||
const process = require('process');
|
||||
|
||||
|
@ -17,4 +18,9 @@ module.exports = {
|
|||
},
|
||||
],
|
||||
},
|
||||
plugins: [
|
||||
new webpack.ProvidePlugin({
|
||||
React: 'react',
|
||||
}),
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue