Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
kgtkr committed Jan 25, 2024
1 parent 949e309 commit 2050dd0
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions packages/client/src/components/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ export function App(): JSX.Element {
}
setInitUserData(
await createUserData(
res.data.token as GA.TokenMasterFragment // TODO: ここのキャストおかしい
)
res.data.token as GA.TokenMasterFragment, // TODO: ここのキャストおかしい
),
);
} catch {
setInitUserData(null);
Expand Down
14 changes: 7 additions & 7 deletions packages/client/src/components/res.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function textMatcher(matcher: TextMatcher, text: string): boolean {
try {
return new RegExp(
matcher.text,
[matcher.ignoreCase ? "i" : ""].join("")
[matcher.ignoreCase ? "i" : ""].join(""),
).test(text);
} catch {
return false;
Expand Down Expand Up @@ -130,7 +130,7 @@ export const Res = React.memo(function Res(props: ResProps) {
const [addNG] = useSetStorage(NGs);
const ng = React.useMemo(
() => props.ngs.some((ng) => isNG(ng, props.res)),
[props.ngs, props.res]
[props.ngs, props.res],
);

return user.value !== null && !props.res.self && !disableNG && ng ? (
Expand Down Expand Up @@ -244,7 +244,7 @@ export const Res = React.memo(function Res(props: ResProps) {
state: {
background,
},
}
},
)}
>
@{props.res.profile.sn}
Expand All @@ -254,7 +254,7 @@ export const Res = React.memo(function Res(props: ResProps) {
<Link
to={routes.res.to(
{ id: props.res.id, topic: props.res.topic.id },
{ state: { background } }
{ state: { background } },
)}
>
{dateFormat.format(props.res.date)}
Expand All @@ -267,7 +267,7 @@ export const Res = React.memo(function Res(props: ResProps) {
state: {
background,
},
}
},
)}
>
#{props.res.hash.substr(0, 6)}
Expand Down Expand Up @@ -355,7 +355,7 @@ export const Res = React.memo(function Res(props: ResProps) {
component={Link}
to={routes.res.to(
{ id: props.res.reply.id, topic: props.res.topic.id },
{ state: { background } }
{ state: { background } },
)}
style={small}
size="small"
Expand All @@ -369,7 +369,7 @@ export const Res = React.memo(function Res(props: ResProps) {
component={Link}
to={routes.resReply.to(
{ id: props.res.id, topic: props.res.topic.id },
{ state: { background } }
{ state: { background } },
)}
style={small}
size="small"
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/pages/notifications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,5 +178,5 @@ export const NotificationsPage = userSwitch(
</div>
</Page>
);
}
},
);
12 changes: 6 additions & 6 deletions packages/client/src/pages/topic/view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const TopicPage = (_props: {}) => {
{
topicId: params.id,
},
null
null,
);
const [setTopicRead] = useSetStorage(TopicReads);
const user = useUserContext();
Expand All @@ -62,7 +62,7 @@ export const TopicPage = (_props: {}) => {
apolloClient: apolloClient,
setTopicRead,
initTopicDate: topicRead?.resCreatedAt,
}
},
);
const ngs = usePrefixedStorageCollection(NGs);

Expand All @@ -84,7 +84,7 @@ export const TopicPage = (_props: {}) => {

const reversedReses = React.useMemo(
() => (state.reses !== null ? RA.reverse(state.reses) : null),
[state.reses]
[state.reses],
);

const handleUpdateRes = React.useCallback((res: GA.ResFragment) => {
Expand Down Expand Up @@ -207,7 +207,7 @@ export const TopicPage = (_props: {}) => {
{
id: state.topicId,
},
{ state: { background } }
{ state: { background } },
)}
>
詳細データ
Expand All @@ -221,7 +221,7 @@ export const TopicPage = (_props: {}) => {
{
id: state.topicId,
},
{ state: { background } }
{ state: { background } },
)}
>
トピック編集
Expand All @@ -235,7 +235,7 @@ export const TopicPage = (_props: {}) => {
{
id: state.topicId,
},
{ state: { background } }
{ state: { background } },
)}
>
派生トピック
Expand Down
4 changes: 2 additions & 2 deletions packages/client/src/utils/with-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import { CircularProgress } from "@mui/material";

export const withModal = <P extends {}>(
Page: React.ComponentType<P>,
title: string
title: string,
) => {
return (props: P): JSX.Element => {
const history = useHistory();
const goBack = React.useMemo(
() => () => {
history.goBack();
},
[history]
[history],
);

return (
Expand Down

0 comments on commit 2050dd0

Please sign in to comment.