refactor: sort typescript imports

This commit is contained in:
Sam 2022-12-22 15:49:08 +01:00
parent 7bb179a2dc
commit cd7689d0f5
No known key found for this signature in database
GPG key ID: B4EF20DDE721CAA1
9 changed files with 33 additions and 24 deletions

View file

@ -1,12 +1,13 @@
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import { MoonStars, Sun, List } from "react-bootstrap-icons"; import { List, MoonStars, Sun } from "react-bootstrap-icons";
import Link from "next/link"; import Link from "next/link";
import NavItem from "./NavItem";
import Logo from "./logo";
import { useRecoilState } from "recoil"; import { useRecoilState } from "recoil";
import { APIError, ErrorCode, fetchAPI, MeUser } from "../lib/api-fetch";
import { themeState, userState } from "../lib/state"; import { themeState, userState } from "../lib/state";
import { fetchAPI, APIError, ErrorCode, MeUser } from "../lib/api-fetch"; import Logo from "./logo";
import NavItem from "./NavItem";
export default function Navigation() { export default function Navigation() {
const [user, setUser] = useRecoilState(userState); const [user, setUser] = useRecoilState(userState);

View file

@ -1,8 +1,5 @@
import Head from "next/head"; import Head from "next/head";
import ReactMarkdown from "react-markdown"; import React from "react";
import { userState } from "../lib/state";
import { useRecoilValue } from "recoil";
import FallbackImage from "./FallbackImage";
import { import {
EmojiLaughing, EmojiLaughing,
HandThumbsDown, HandThumbsDown,
@ -10,10 +7,14 @@ import {
HeartFill, HeartFill,
People, People,
} from "react-bootstrap-icons"; } from "react-bootstrap-icons";
import BlueLink from "./BlueLink"; import ReactMarkdown from "react-markdown";
import React from "react"; import { useRecoilValue } from "recoil";
import Card from "./Card";
import { Field, Label, LabelStatus, Person, User } from "../lib/api"; import { Field, Label, LabelStatus, Person, User } from "../lib/api";
import { userState } from "../lib/state";
import BlueLink from "./BlueLink";
import Card from "./Card";
import FallbackImage from "./FallbackImage";
export default function PersonPage({ person }: { person: Person }) { export default function PersonPage({ person }: { person: Person }) {
return ( return (

View file

@ -1,9 +1,11 @@
import "../styles/globals.css"; import "../styles/globals.css";
import type { AppProps } from "next/app"; import type { AppProps } from "next/app";
import Head from "next/head";
import { RecoilRoot } from "recoil";
import Container from "../components/Container"; import Container from "../components/Container";
import Navigation from "../components/Navigation"; import Navigation from "../components/Navigation";
import { RecoilRoot } from "recoil";
import Head from "next/head";
function MyApp({ Component, pageProps }: AppProps) { function MyApp({ Component, pageProps }: AppProps) {
const domain = const domain =

View file

@ -1,14 +1,15 @@
import { useEffect, useState } from "react";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import { useEffect, useState } from "react";
import { useRecoilState } from "recoil"; import { useRecoilState } from "recoil";
import { userState } from "../../lib/state";
import TextInput from "../../components/TextInput";
import Loading from "../../components/Loading";
import Button, { ButtonStyle } from "../../components/Button";
import Notice from "../../components/Notice";
import BlueLink from "../../components/BlueLink"; import BlueLink from "../../components/BlueLink";
import toast from "../../lib/toast"; import Button, { ButtonStyle } from "../../components/Button";
import Loading from "../../components/Loading";
import Notice from "../../components/Notice";
import TextInput from "../../components/TextInput";
import { fetchAPI, MeUser, SignupResponse } from "../../lib/api-fetch"; import { fetchAPI, MeUser, SignupResponse } from "../../lib/api-fetch";
import { userState } from "../../lib/state";
import toast from "../../lib/toast";
interface CallbackResponse { interface CallbackResponse {
has_account: boolean; has_account: boolean;

View file

@ -1,7 +1,8 @@
import { GetServerSideProps } from "next"; import { GetServerSideProps } from "next";
import Head from "next/head";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import { useRecoilValue } from "recoil"; import { useRecoilValue } from "recoil";
import Head from "next/head";
import { fetchAPI } from "../../lib/api-fetch"; import { fetchAPI } from "../../lib/api-fetch";
import { userState } from "../../lib/state"; import { userState } from "../../lib/state";

View file

@ -1,6 +1,7 @@
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import { useEffect } from "react"; import { useEffect } from "react";
import { useRecoilState } from "recoil"; import { useRecoilState } from "recoil";
import Loading from "../components/Loading"; import Loading from "../components/Loading";
import { userState } from "../lib/state"; import { userState } from "../lib/state";

View file

@ -1,9 +1,9 @@
import { GetStaticProps } from "next";
import { readdirSync } from "fs"; import { readdirSync } from "fs";
import ReactMarkdown from "react-markdown";
import { readFile } from "fs/promises"; import { readFile } from "fs/promises";
import { join } from "path"; import { GetStaticProps } from "next";
import Head from "next/head"; import Head from "next/head";
import { join } from "path";
import ReactMarkdown from "react-markdown";
export async function getStaticPaths() { export async function getStaticPaths() {
const names = readdirSync("./static_pages").filter((name) => const names = readdirSync("./static_pages").filter((name) =>

View file

@ -1,4 +1,5 @@
import { GetServerSideProps } from "next"; import { GetServerSideProps } from "next";
import PersonPage from "../../../components/PersonPage"; import PersonPage from "../../../components/PersonPage";
import { Member } from "../../../lib/api"; import { Member } from "../../../lib/api";
import * as API from "../../../lib/api-fetch"; import * as API from "../../../lib/api-fetch";

View file

@ -1,4 +1,5 @@
import { GetServerSideProps } from "next"; import { GetServerSideProps } from "next";
import PersonPage from "../../../components/PersonPage"; import PersonPage from "../../../components/PersonPage";
import { User } from "../../../lib/api"; import { User } from "../../../lib/api";
import * as API from "../../../lib/api-fetch"; import * as API from "../../../lib/api-fetch";