Skip to content

Commit

Permalink
chore: lintを通す
Browse files Browse the repository at this point in the history
  • Loading branch information
rito528 committed Mar 4, 2024
1 parent cd8f514 commit 2646d88
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/app/admin/forms/edit/[id]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { getForm } from '@/features/form/api/form';
import { getCachedToken } from '@/features/user/api/mcToken';
import { getUser } from '@/features/user/api/user';
import { isRight } from 'fp-ts/lib/Either';
import { redirect } from 'next/navigation';
import { redirectOrDoNothing } from '@/app/error/RedirectByErrorResponse';
import styles from '@/app/page.module.css';
import NavBar from '@/components/NavBar';
import DashboardMenu from '@/components/DashboardMenu';
import NavBar from '@/components/NavBar';
import { getForm } from '@/features/form/api/form';
import { EditFormComponent } from '@/features/form/components/editForm';
import { getCachedToken } from '@/features/user/api/mcToken';
import { getUser } from '@/features/user/api/user';

const Home = async ({ params }: { params: { id: number } }) => {
const token = (await getCachedToken()) ?? '';
Expand Down
12 changes: 7 additions & 5 deletions src/features/form/components/editForm.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
'use client';

import { Option, none, some } from 'fp-ts/lib/Option';
import { UseFormRegister, useForm } from 'react-hook-form';
import { Box, FormGroup, Select } from '@material-ui/core';
import { Stack, TextField } from '@mui/material';
import { Form } from '../types/formSchema';
import { none, some } from 'fp-ts/lib/Option';
import { useForm } from 'react-hook-form';
import type { Form } from '../types/formSchema';
import type { Option } from 'fp-ts/lib/Option';
import type { UseFormRegister } from 'react-hook-form';

interface IForm {
form_id: Option<number>;
Expand Down Expand Up @@ -73,8 +75,8 @@ const FormMetaComponent = ({
);
};

export const EditFormComponent = async ({ form }: { form: Form }) => {
const { register, handleSubmit, control } = useForm<IForm>({
export const EditFormComponent = ({ form }: { form: Form }) => {
const { register } = useForm<IForm>({
defaultValues: {
form_id: some(form.id),
form_title: none,
Expand Down

0 comments on commit 2646d88

Please sign in to comment.