Skip to content

Commit dc823ac

Browse files
committed
Fix: initialize type checker
1 parent 2bb6747 commit dc823ac

File tree

7 files changed

+16
-17
lines changed

7 files changed

+16
-17
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@
248248
"@loadable/babel-plugin"
249249
]
250250
},
251-
"proxy": "https://v2cdn.velog.io/",
251+
"proxy": "http://localhost:5001",
252252
"devDependencies": {
253253
"@loadable/webpack-plugin": "^5.15.1"
254254
}

src/components/auth/AuthForm.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ const AuthFormBlock = styled.div`
5656
}
5757
`;
5858

59-
const Warning = styled.div`
60-
margin-top: 1rem;
61-
margin-bottom: 1rem;
62-
font-size: 0.875rem;
63-
color: ${themedPalette.text3};
64-
`;
59+
// const Warning = styled.div`
60+
// margin-top: 1rem;
61+
// margin-bottom: 1rem;
62+
// font-size: 0.875rem;
63+
// color: ${themedPalette.text3};
64+
// `;
6565

6666
export interface AuthFormProps {
6767
mode: AuthMode;

src/components/common/AdFeed.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useEffect, useRef, useState } from 'react';
1+
import React, { useEffect, useRef } from 'react';
22
import styled from 'styled-components';
33
import { mediaQuery } from '../../lib/styles/media';
44
import gtag from '../../lib/gtag';

src/components/common/MarkdownRender.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import media from '../../lib/styles/media';
1313
import parse from 'html-react-parser';
1414
import { throttle } from 'throttle-debounce';
1515
import sanitize from 'sanitize-html';
16-
import palette from '../../lib/styles/palette';
1716
import math from 'remark-math';
1817
import remark2rehype from 'remark-rehype';
1918
import katex from 'rehype-katex';

src/components/common/PostCardGrid.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ function PostCardGrid({ posts, loading, forHome, forPost }: PostCardGridProps) {
2828
}, []);
2929

3030
const postsWithAds = useMemo(() => {
31+
// eslint-disable-next-line
3132
if (1 === 1) return posts; // disable adsense
3233
if (user) return posts; // hide ads to users
3334
if (adBlocked) return posts;

src/components/user-integrate/UserIntegrateTemplate.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function UserIntegrateTemplate() {
2222
const location = useLocation();
2323
const query = qs.parse(location.search, { ignoreQueryPrefix: true });
2424
const integrateState = query.state ?? '';
25-
const [_sendAuthEmail, loading, data, , resetSendAuthEmail] =
25+
const [_sendAuthEmail, loading, data] =
2626
useRequest<SendAuthEmailResponse>(sendAuthEmail);
2727

2828
const [acceptIntegration] =

src/lib/hooks/useInputs.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
import { useReducer, useCallback } from 'react';
22

3-
type DefaultValues = {
4-
[key: string]: string;
5-
};
6-
73
type UseInputsAction = {
84
name: string;
95
value: string;
106
};
11-
function reducer<T>(state: T, action: UseInputsAction | null) {
7+
function reducer<T extends Record<string, string>>(
8+
state: T,
9+
action: UseInputsAction | null,
10+
) {
1211
if (!action) {
1312
const initialState: any = {};
14-
Object.keys(state).forEach(key => {
13+
Object.keys(state).forEach((key) => {
1514
initialState[key] = '';
1615
});
1716
return initialState;
@@ -36,6 +35,6 @@ export default function useInputs<T>(defaultValues: T) {
3635
T,
3736
typeof onChange,
3837
typeof onReset,
39-
typeof dispatch
38+
typeof dispatch,
4039
];
4140
}

0 commit comments

Comments
 (0)