Skip to content

Commit 4ea5021

Browse files
committed
Fix all the typescript errors
1 parent a04864a commit 4ea5021

File tree

388 files changed

+726
-526
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

388 files changed

+726
-526
lines changed

app/javascript/AppRoot.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { initErrorReporting } from 'ErrorReporting';
1717

1818
export function buildAppRootContextValue(
1919
data: AppRootQueryData,
20-
navigationBarRef: RefObject<HTMLElement>,
20+
navigationBarRef: RefObject<HTMLElement | null>,
2121
): AppRootContextValue {
2222
return {
2323
assumedIdentityFromProfile: data.assumedIdentityFromProfile,
@@ -51,7 +51,7 @@ export function buildAppRootContextValue(
5151
};
5252
}
5353

54-
function AppRoot(): JSX.Element {
54+
function AppRoot(): React.JSX.Element {
5555
const location = useLocation();
5656
const navigate = useNavigate();
5757
const data = useLoaderData() as AppRootQueryData;

app/javascript/AppRootContext.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export type AppRootContextValue = {
1919
hasOAuthApplications: boolean;
2020
language: string;
2121
myProfile?: NonNullable<AppRootQueryData['convention']>['my_profile'];
22-
navigationBarRef: RefObject<HTMLElement>;
22+
navigationBarRef: RefObject<HTMLElement | null>;
2323
rootSiteName?: string | null;
2424
signupMode?: SignupMode;
2525
signupAutomationMode?: SignupAutomationMode;

app/javascript/AppWrapper.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ export type AppWrapperProps = {
123123
stripePublishableKey: string;
124124
};
125125

126-
function AppWrapper<P extends JSX.IntrinsicAttributes>(
126+
function AppWrapper<P extends React.JSX.IntrinsicAttributes>(
127127
WrappedComponent: React.ComponentType<P>,
128128
): React.ComponentType<P> {
129129
function Wrapper(props: P & AppWrapperProps) {

app/javascript/Authentication/AccountFormContent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { AccountFormContentQueryDocument } from './queries.generated';
33
import BlockPartial from 'UIComponents/BlockPartial';
44
import { CmsPartialBlockName } from 'graphqlTypes.generated';
55

6-
function AccountFormContent(): JSX.Element {
6+
function AccountFormContent(): React.JSX.Element {
77
const { data, loading, error } = useQuery(AccountFormContentQueryDocument);
88

99
if (error || loading || !data) {

app/javascript/Authentication/AuthenticationModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const ForgotPasswordForm = lazyWithAppEntrypointHeadersCheck(() => import('./For
88
const SignInForm = lazyWithAppEntrypointHeadersCheck(() => import('./SignInForm'));
99
const SignUpForm = lazyWithAppEntrypointHeadersCheck(() => import('./SignUpForm'));
1010

11-
function AuthenticationModal(): JSX.Element {
11+
function AuthenticationModal(): React.JSX.Element {
1212
const { visible, currentView } = useContext(AuthenticationModalContext);
1313

1414
const renderView = () => {

app/javascript/Authentication/ForgotPasswordForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ async function resetPassword(authenticityToken: string, email: string) {
4141
return responseJson;
4242
}
4343

44-
function ForgotPasswordForm(): JSX.Element {
44+
function ForgotPasswordForm(): React.JSX.Element {
4545
const { t } = useTranslation();
4646
const { close: closeModal, setCurrentView } = useContext(AuthenticationModalContext);
4747
const authenticityToken = AuthenticityTokensManager.instance.tokens.resetPassword;

app/javascript/Authentication/PasswordConfirmationInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export type PasswordConfirmationInputProps = {
1010
password: string;
1111
};
1212

13-
function PasswordConfirmationInput({ value, onChange, password }: PasswordConfirmationInputProps): JSX.Element {
13+
function PasswordConfirmationInput({ value, onChange, password }: PasswordConfirmationInputProps): React.JSX.Element {
1414
const { t } = useTranslation();
1515
const [interactedWithConfirmation, setInteractedWithConfirmation] = useState(false);
1616

app/javascript/Authentication/PasswordInputWithStrengthCheck.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,11 @@ export type PasswordInputWithStrengthCheckProps = {
6060
onChange: React.Dispatch<string>;
6161
};
6262

63-
function PasswordInputWithStrengthCheck({ id, value, onChange }: PasswordInputWithStrengthCheckProps): JSX.Element {
63+
function PasswordInputWithStrengthCheck({
64+
id,
65+
value,
66+
onChange,
67+
}: PasswordInputWithStrengthCheckProps): React.JSX.Element {
6468
const { t } = useTranslation();
6569
const passwordStrengthResult = useMemo(() => zxcvbn(value), [value]);
6670
const hasFeedback = useMemo(

app/javascript/Authentication/ResetPassword.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ async function changePassword(
3535
}
3636
}
3737

38-
function ResetPassword(): JSX.Element {
38+
function ResetPassword(): React.JSX.Element {
3939
const { t } = useTranslation();
4040
const location = useLocation();
4141
const resetPasswordToken = useMemo(

app/javascript/Authentication/SignInButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export type SignInButtonProps = {
1010
afterSignInPath?: string;
1111
};
1212

13-
function SignInButton({ className, caption, initiallyOpen, afterSignInPath }: SignInButtonProps): JSX.Element {
13+
function SignInButton({ className, caption, initiallyOpen, afterSignInPath }: SignInButtonProps): React.JSX.Element {
1414
const { open, setAfterSignInPath } = useContext(AuthenticationModalContext);
1515
const openModal = useCallback(() => {
1616
open({ currentView: 'signIn' });

0 commit comments

Comments
 (0)