mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-08-16 11:14:44 +08:00
chore: eslint plugins to sort import and remove unused import automatically
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import React from "react";
|
||||
|
||||
import { Container } from "./Container";
|
||||
|
||||
describe("<Container />", () => {
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import Link from "next/link";
|
||||
|
||||
import { Container } from "./Container";
|
||||
|
||||
const faqs = [
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
|
||||
import { Container } from "./Container";
|
||||
|
||||
export function Footer() {
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
import { Button } from "@chakra-ui/react";
|
||||
import { Popover } from "@headlessui/react";
|
||||
import clsx from "clsx";
|
||||
import { AnimatePresence, motion } from "framer-motion";
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
|
||||
import { signOut, useSession } from "next-auth/react";
|
||||
import { FaUser, FaSignOutAlt } from "react-icons/fa";
|
||||
import clsx from "clsx";
|
||||
|
||||
import { useSession } from "next-auth/react";
|
||||
import { FaUser } from "react-icons/fa";
|
||||
import { Container } from "src/components/Container";
|
||||
|
||||
import { NavLinks } from "./NavLinks";
|
||||
import { UserMenu } from "./UserMenu";
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useState } from "react";
|
||||
import Link from "next/link";
|
||||
import { AnimatePresence, motion } from "framer-motion";
|
||||
import Link from "next/link";
|
||||
import { useState } from "react";
|
||||
|
||||
export function NavLinks(): JSX.Element {
|
||||
const [hoveredIndex, setHoveredIndex] = useState(null);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React from "react";
|
||||
import { signOut, useSession } from "next-auth/react";
|
||||
import Image from "next/image";
|
||||
import { Popover } from "@headlessui/react";
|
||||
import { AnimatePresence, motion } from "framer-motion";
|
||||
import Image from "next/image";
|
||||
import { signOut, useSession } from "next-auth/react";
|
||||
import React from "react";
|
||||
import { FaCog, FaSignOutAlt } from "react-icons/fa";
|
||||
|
||||
export function UserMenu() {
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
export { Header } from "./Header";
|
||||
export { UserMenu } from "./UserMenu";
|
||||
export { NavLinks } from "./NavLinks";
|
||||
export { UserMenu } from "./UserMenu";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useId } from "react";
|
||||
import Image from "next/image";
|
||||
import { useId } from "react";
|
||||
|
||||
import { Container } from "./Container";
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// https://nextjs.org/docs/basic-features/layouts
|
||||
|
||||
import type { NextPage } from "next";
|
||||
import { Header } from "src/components/Header";
|
||||
|
||||
import { Footer } from "./Footer";
|
||||
import { Header } from "src/components/Header";
|
||||
|
||||
export type NextPageWithLayout<P = unknown, IP = P> = NextPage<P, IP> & {
|
||||
getLayout?: (page: React.ReactElement) => React.ReactNode;
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { DndContext, PointerSensor, TouchSensor, closestCenter, useSensor, useSensors } from "@dnd-kit/core";
|
||||
import { ReactNode, useEffect, useState } from "react";
|
||||
import { SortableContext, arrayMove, verticalListSortingStrategy } from "@dnd-kit/sortable";
|
||||
import type { DragEndEvent } from "@dnd-kit/core/dist/types/events";
|
||||
import { Flex } from "@chakra-ui/react";
|
||||
import { closestCenter, DndContext, PointerSensor, TouchSensor, useSensor, useSensors } from "@dnd-kit/core";
|
||||
import type { DragEndEvent } from "@dnd-kit/core/dist/types/events";
|
||||
import { arrayMove, SortableContext, verticalListSortingStrategy } from "@dnd-kit/sortable";
|
||||
import { ReactNode, useEffect, useState } from "react";
|
||||
|
||||
import { SortableItem } from "./SortableItem";
|
||||
|
||||
export interface SortableProps {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useSortable } from "@dnd-kit/sortable";
|
||||
import { CSS } from "@dnd-kit/utilities";
|
||||
import { PropsWithChildren } from "react";
|
||||
import { useSortable } from "@dnd-kit/sortable";
|
||||
|
||||
export const SortableItem = ({ children, id }: PropsWithChildren<{ id: number }>) => {
|
||||
const { attributes, listeners, setNodeRef, transform, transition } = useSortable({ id });
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import React from "react";
|
||||
import { TaskOptions } from "./TaskOptions";
|
||||
import { Flex } from "@chakra-ui/react";
|
||||
import React from "react";
|
||||
|
||||
import { TaskOption } from "./TaskOption";
|
||||
import { TaskOptions } from "./TaskOptions";
|
||||
|
||||
export const TaskSelection = () => {
|
||||
return (
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
export { TaskSelection } from "./TaskSelection";
|
||||
export { TaskOptions } from "./TaskOptions";
|
||||
export { TaskOption } from "./TaskOption";
|
||||
export { TaskOptions } from "./TaskOptions";
|
||||
export { TaskSelection } from "./TaskSelection";
|
||||
|
||||
Reference in New Issue
Block a user