Skip to content

Commit

Permalink
[fix] lintのエラー修正
Browse files Browse the repository at this point in the history
  • Loading branch information
imaimai17468 committed Apr 18, 2023
1 parent a77d9d5 commit 65f03e3
Show file tree
Hide file tree
Showing 43 changed files with 125 additions and 159 deletions.
2 changes: 1 addition & 1 deletion view/next-project/src/components/auth/SignInView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { useState } from 'react';
import { useForm } from 'react-hook-form';
import { useRecoilState } from 'recoil';

import { PrimaryButton } from '../common';
import { authAtom, userAtom } from '@/store/atoms';
import { get_with_token } from '@api/api_methods';
import { signIn } from '@api/signIn';
import LoadingButton from '@components/common/LoadingButton';
import { SignIn } from '@type/common';

import { PrimaryButton } from '../common';

export default function SignInView() {
// ログイン中フラグ
Expand Down
2 changes: 1 addition & 1 deletion view/next-project/src/components/auth/SignUpView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import React, { useState } from 'react';
import { useForm } from 'react-hook-form';
import { useRecoilState } from 'recoil';

import { PrimaryButton } from '../common';
import { BUREAUS } from '@/constants/bureaus';
import { authAtom, userAtom } from '@/store/atoms';
import { get } from '@api/api_methods';
Expand All @@ -11,7 +12,6 @@ import { post } from '@api/user';
import LoadingButton from '@components/common/LoadingButton';
import { SignUp, User } from '@type/common';

import { PrimaryButton } from '../common';

export default function SignUpView() {
const [, setAuth] = useRecoilState(authAtom);
Expand Down
2 changes: 1 addition & 1 deletion view/next-project/src/components/budgets/DetailModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const DetailModal: FC<ModalProps> = (props) => {
<tbody className='border border-x-white-0 border-b-primary-1'>
{props.expenseView.purchaseDetails ? (props.expenseView.purchaseDetails.map((purchaseDetail) => (
purchaseDetail.purchaseItems.map((purchaseItem) => (
<tr>
<tr key={purchaseItem.id}>
<td className='py-3'>
<div className='text-center text-sm text-black-600'>
{purchaseItem.item}
Expand Down
2 changes: 1 addition & 1 deletion view/next-project/src/components/budgets/EditModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import { Dispatch, FC, SetStateAction, useEffect, useState } from 'react';
import { RiCloseCircleLine } from 'react-icons/ri';

import { SOURCES } from '@/constants/sources';
import { put } from '@api/budget';
import { get } from '@api/api_methods';
import { put } from '@api/budget';
import theme from '@assets/theme';
import RegistButton from '@components/common/RegistButton';
import { Budget, Source, Year } from '@type/common';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React, { useMemo } from 'react';

import Label from '../Label';
import { BureauLabelProps } from './BureauLabel.type';
import { BUREAUS_WITH_EN } from '@constants/bureaus';

import { BureauLabelProps } from './BureauLabel.type';
import Label from '../Label';

const BureauLabel: React.FC<BureauLabelProps> = (props) => {
const { bureauName } = props;
Expand Down
2 changes: 1 addition & 1 deletion view/next-project/src/components/common/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import { AiOutlineMenu } from 'react-icons/ai';
import { RiAccountCircleFill } from 'react-icons/ri';
import { useRecoilState } from 'recoil';

import { HeaderProps } from './Header.type';
import { authAtom, userAtom } from '@/store/atoms';
import { del } from '@api/signOut';
import { ChakraUIDropdown } from '@components/common';
import { User } from '@type/common';

import { HeaderProps } from './Header.type';

const Header = (props: HeaderProps) => {
const { onSideNavOpen } = props;
Expand Down
2 changes: 1 addition & 1 deletion view/next-project/src/components/common/Label/Label.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Box, ChakraProvider } from '@chakra-ui/react';
import React, { useMemo } from 'react';

import { LabelProps } from './Label.type';
import theme from '@/assets/theme';

import { LabelProps } from './Label.type';

const Label: React.FC<LabelProps> = (props) => {
const {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { ChakraProvider, Button } from '@chakra-ui/react';
import * as React from 'react';
import { useState } from 'react';

import RegistModal from './RegistModal';
import theme from '@assets/theme';

import RegistModal from './RegistModal';

interface Props {
width?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import { useRouter } from 'next/router';
import React, { Dispatch, FC, SetStateAction, useEffect, useState } from 'react';
import { useRecoilState } from 'recoil';

import { Modal, CloseButton, Input, Select, PrimaryButton } from '../common';
import { userAtom } from '@/store/atoms';
import { post } from '@api/fundInformations';
import { Department, FundInformation, Teacher, User } from '@type/common';

import { Modal, CloseButton, Input, Select, PrimaryButton } from '../common';

interface ModalProps {
setShowModal: Dispatch<SetStateAction<boolean>>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { useRouter } from 'next/router';
import { Dispatch, SetStateAction, useEffect, useState } from 'react';

import { Modal, Input, Select, CloseButton, PrimaryButton } from '../common';
import { put } from '@api/fundInformations';
import { FundInformation, Teacher, User, Department } from '@type/common';

import { Modal, Input, Select, CloseButton, PrimaryButton } from '../common';

interface ModalProps {
setShowModal: Dispatch<SetStateAction<boolean>>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React, { useState } from 'react';

import OpenAddModal from './AddModal';
import { AddButton } from '@components/common';
import { Teacher, Department, User } from '@type/common';

import OpenAddModal from './AddModal';

interface Props {
children?: React.ReactNode;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { useState } from 'react';

import DeleteModal from './DeleteModal';
import { DeleteButton } from '@components/common';

import DeleteModal from './DeleteModal';

interface Props {
children?: React.ReactNode;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React, { useState } from 'react';

import EditModal from './EditModal';
import { EditButton } from '@components/common';
import { Teacher, Department, User, FundInformation } from '@type/common';

import EditModal from './EditModal';

interface Props {
teachers: Teacher[];
Expand Down
2 changes: 1 addition & 1 deletion view/next-project/src/components/layout/Layout/Layout.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React, { ReactNode } from 'react';

import s from './Layout.module.css';
import SponsorActivitiesAddModal from '@/components/sponsoractivities/SponsorActivitiesAddModal';
import SponsorAddModal from '@/components/sponsors/SponsorAddModal';
import PurchaseReportAddModal from '@components/purchasereports/AddModal';
import PurchaseOrderListModal from '@components/purchasereports/PurchaseOrderListModal';
import PurchaseReportItemNumModal from '@components/purchasereports/PurchaseReportItemNumModal';
import { useUI } from '@components/ui/context';

import s from './Layout.module.css';

const ModalView: React.FC<{ modalView: string }> = ({ modalView }) => {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@ import Head from 'next/head';
import { useRouter } from 'next/router';
import React, { useEffect, useState } from 'react';
import { useRecoilState } from 'recoil';
import s from './MainLayout.module.css';

import { authAtom } from '@/store/atoms';
import 'tailwindcss/tailwind.css';
import { Header, SideNav } from '@components/common';

import s from './MainLayout.module.css';

interface LayoutProps {
children?: React.ReactNode;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { useRouter } from 'next/router';
import React, { Dispatch, FC, SetStateAction } from 'react';

import { CloseButton, Modal, OutlinePrimaryButton, PrimaryButton } from '../common';
import { del } from '@api/api_methods';

import { CloseButton, Modal, OutlinePrimaryButton, PrimaryButton } from '../common';

interface ModalProps {
setShowModal: Dispatch<SetStateAction<boolean>>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useRouter } from 'next/router';
import React, { useState } from 'react';
import { RiArrowDropRightLine } from 'react-icons/ri';

import { RiExternalLinkLine, RiFileCopyLine } from 'react-icons/ri'
import { put } from '@api/purchaseItem';
import {
PrimaryButton,
Expand All @@ -13,7 +14,6 @@ import {
Tooltip
} from '@components/common';
import { PurchaseItem } from '@type/common';
import { RiExternalLinkLine, RiFileCopyLine } from 'react-icons/ri'

interface ModalProps {
purchaseOrderId: number;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React, { useState } from 'react';

import PurchaseItemNumModal from './PurchaseItemNumModal';
import { AddButton } from '@components/common';
import { Expense } from '@type/common';

import PurchaseItemNumModal from './PurchaseItemNumModal';

interface Props {
children?: React.ReactNode;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import React from 'react';
import { useState } from 'react';

import { DeleteButton } from '@components/common';

import DeleteModal from './DeleteModal';
import { DeleteButton } from '@components/common';

interface Props {
id: number;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { useRouter } from 'next/router';
import React, { Dispatch, FC, SetStateAction } from 'react';

import { del } from '@api/api_methods';

import { CloseButton, Modal, OutlinePrimaryButton, PrimaryButton } from '../common';
import { del } from '@api/api_methods';

interface ModalProps {
setShowModal: Dispatch<SetStateAction<boolean>>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ import clsx from 'clsx';
import { useRouter } from 'next/router';
import { useEffect, useState } from 'react';

import PurchaseReportAddModal from './PurchaseReportAddModal';
import { get } from '@api/api_methods';
import { CloseButton, Modal, OutlinePrimaryButton, PrimaryButton, Radio } from '@components/common';
import { useUI } from '@components/ui/context';
import { PurchaseOrder, User, PurchaseItem, Expense } from '@type/common';

import PurchaseReportAddModal from './PurchaseReportAddModal';

interface PurchaseOrderView {
purchaseOrder: PurchaseOrder;
user: User;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import React, { useState } from 'react';

import { DeleteButton } from '@components/common';

import DeleteModal from '../sponsoractivities/DeleteModal';
import { DeleteButton } from '@components/common';

interface Props {
children?: React.ReactNode;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import * as React from 'react';
import { useState } from 'react';

import { SponsorActivity, SponsorStyle, Sponsor, User } from '@/type/common';

import EditModal from './EditModal';
import { EditButton } from '../common';
import EditModal from './EditModal';
import { SponsorActivity, SponsorStyle, Sponsor, User } from '@/type/common';

interface Props {
children?: React.ReactNode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useRouter } from 'next/router';
import React, { useState, useEffect } from 'react';
import { RiArrowDropRightLine } from 'react-icons/ri';

import { useUI } from '../ui/context';
import { post } from '@/utils/api/sponsorActivities';
import {
CloseButton,
Expand All @@ -12,8 +13,6 @@ import {
} from '@components/common';
import { SponsorActivity, Sponsor, SponsorStyle, User } from '@type/common';

import { useUI } from '../ui/context';

const TABLE_COLUMNS = ['企業名', '協賛スタイル', '担当者名', '回収状況'];

export default function SponsorActivitiesAddModal() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import React, { useState } from 'react';

import { DeleteButton } from '@components/common';

import DeleteModal from './DeleteModal';
import { DeleteButton } from '@components/common';

interface Props {
children?: React.ReactNode;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import * as React from 'react';
import { useState } from 'react';

import SponsorEditModal from './SponsorEditModal';
import { EditButton } from '@components/common';
import { Sponsor } from '@type/common';

import SponsorEditModal from './SponsorEditModal';

interface Props {
children?: React.ReactNode;
sponsor: Sponsor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import React, { useState } from 'react';

import { AddButton } from '@components/common';

import SponsorStyleAddModal from './SponsorStyleAddModal';
import { AddButton } from '@components/common';

interface Props {
children?: React.ReactNode;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import React, { useState } from 'react';

import { DeleteButton } from '@components/common';

import DeleteModal from './DeleteModal';
import { DeleteButton } from '@components/common';

interface Props {
children?: React.ReactNode;
Expand Down
6 changes: 3 additions & 3 deletions view/next-project/src/components/teacher/AddModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { RiCloseCircleLine } from 'react-icons/ri';

import { post } from '@api/teachers';
import { PrimaryButton, Modal, Select, Input } from '@components/common';
import { DEPARTMENTS } from '@constants/departments';
import { Teacher } from '@type/common';
import { DEPARTMENTS } from '@/constants/departments';

interface ModalProps {
setShowModal: Dispatch<SetStateAction<boolean>>;
Expand Down Expand Up @@ -81,7 +81,7 @@ const OpenAddModal: FC<ModalProps> = (props) => {
</div>
<p>ブラックリスト</p>
<div className='col-span-4 flex justify-center gap-10'>
<div key='black' className='flex gap-3 items-center'>
<div key='black' className='flex items-center gap-3'>
<input
id='black'
type='radio'
Expand All @@ -92,7 +92,7 @@ const OpenAddModal: FC<ModalProps> = (props) => {
/>
<label htmlFor='black'>はい</label>
</div>
<div key='notBlack' className='flex gap-3 items-center'>
<div key='notBlack' className='flex items-center gap-3'>
<input
id='notBlack'
type='radio'
Expand Down
Loading

0 comments on commit 65f03e3

Please sign in to comment.