Skip to content

Commit c0ea409

Browse files
committed
style: run prettier
1 parent dab2a0d commit c0ea409

File tree

34 files changed

+480
-279
lines changed

34 files changed

+480
-279
lines changed

.github/dependabot.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
version: 2
33
updates:
44
- package-ecosystem: npm
5-
directory: "/"
5+
directory: '/'
66
schedule:
7-
interval: "daily"
8-
timezone: "Asia/Tokyo"
9-
time: "05:00"
7+
interval: 'daily'
8+
timezone: 'Asia/Tokyo'
9+
time: '05:00'
1010
labels:
1111
- build

src/components/Board/index.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,15 @@ import { Box } from '@chakra-ui/react'
22

33
const Board = ({ children }: { children: JSX.Element | JSX.Element[] }) => {
44
return (
5-
<Box border="2px" bg="board.bg" p="16" minW="480px" w="80%" minH="320px" fontSize="md">
5+
<Box
6+
border="2px"
7+
bg="board.bg"
8+
p="16"
9+
minW="480px"
10+
w="80%"
11+
minH="320px"
12+
fontSize="md"
13+
>
614
{children}
715
</Box>
816
)

src/components/News/index.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ import { useState, useEffect, FormEvent } from 'react'
22
import { Box, Stack, Heading, Input, Button } from '@chakra-ui/react'
33
import { format } from 'date-fns'
44

5-
import type { NewsEntity } from '@/domain/news/entity';
6-
import { NewsRepository } from '@/domain/news/repository';
5+
import type { NewsEntity } from '@/domain/news/entity'
6+
import { NewsRepository } from '@/domain/news/repository'
77
import { useUser } from '@/hooks/useUser'
88

99
const CreateNewsForm = ({ onCreated }) => {
10-
const [topic, setTopic] = useState("")
10+
const [topic, setTopic] = useState('')
1111

1212
const handleSubmit = async (e: FormEvent) => {
1313
e.preventDefault()
14-
if (topic !== "") {
14+
if (topic !== '') {
1515
const repo = new NewsRepository()
1616
await repo.create({ topic, date: new Date() })
1717
onCreated()
@@ -44,7 +44,7 @@ const NewsRecord = ({ date, topic }: { date: string; topic: string }) => (
4444

4545
const News = () => {
4646
const [news, setNews] = useState<NewsEntity[]>([])
47-
const { user } = useUser();
47+
const { user } = useUser()
4848

4949
const handleOnCreated = async () => {
5050
const repo = new NewsRepository()
@@ -53,7 +53,7 @@ const News = () => {
5353
}
5454

5555
useEffect(() => {
56-
(async () => {
56+
;(async () => {
5757
const repo = new NewsRepository()
5858
const data = await repo.getLatest()
5959
setNews(data)
@@ -64,7 +64,7 @@ const News = () => {
6464
<Box>
6565
<Heading>NEWS</Heading>
6666
<Box mt={2}>
67-
{user?.isAdmin && (<CreateNewsForm onCreated={handleOnCreated} />)}
67+
{user?.isAdmin && <CreateNewsForm onCreated={handleOnCreated} />}
6868
{news.map((r) => (
6969
<NewsRecord
7070
key={r.date.getTime()}

src/components/SubMenu/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { useState, useEffect } from 'react'
22
import { Box } from '@chakra-ui/react'
33

4-
import type { SubMenuEntity } from '@/domain/site-menu/entity';
5-
import { SubMenuRepository } from '@/domain/site-menu/repository';
4+
import type { SubMenuEntity } from '@/domain/site-menu/entity'
5+
import { SubMenuRepository } from '@/domain/site-menu/repository'
66

77
import { Topic } from './Topic'
88
import { MenuList } from './MenuList'
Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
1-
import type { ImageProps } from 'next/image';
1+
import type { ImageProps } from 'next/image'
22

33
type PostWithoutBodyEntity = {
4-
id: string;
5-
project: string;
6-
title: string;
7-
date: Date;
8-
};
4+
id: string
5+
project: string
6+
title: string
7+
date: Date
8+
}
99

1010
type PostEntity = PostWithoutBodyEntity & {
11-
body: PostElement[];
12-
};
11+
body: PostElement[]
12+
}
1313

14-
type PostElement = {
15-
type: 'text' | 'h2';
16-
body?: string;
17-
attributes?: { [key: string]: string };
18-
} | {
19-
type: 'image';
20-
attributes: ImageProps;
21-
};
14+
type PostElement =
15+
| {
16+
type: 'text' | 'h2'
17+
body?: string
18+
attributes?: { [key: string]: string }
19+
}
20+
| {
21+
type: 'image'
22+
attributes: ImageProps
23+
}
2224

23-
export type { PostEntity, PostWithoutBodyEntity, PostElement };
25+
export type { PostEntity, PostWithoutBodyEntity, PostElement }
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
export type { PostEntity, PostWithoutBodyEntity, PostElement } from './PostEntity';
1+
export type {
2+
PostEntity,
3+
PostWithoutBodyEntity,
4+
PostElement,
5+
} from './PostEntity'

0 commit comments

Comments
 (0)