* added config to support code split * splitting config * moved the window declaration in EE file as its dependency will be updated in EE * CE: Splitting ApiConstants and SocialLogin constants * CE: split login page * CE: moved getSocialLoginButtonProps func to EE file as it's dependencies will be updated in EE * added key icon * CE: created a factory class to share social auths list * Minor style fix for social btns * Updated the third party auth styles * updated jest config * updated third party login registry class
31 lines
828 B
TypeScript
31 lines
828 B
TypeScript
import React from "react";
|
|
|
|
import { ERROR_CODES } from "@appsmith/constants/ApiConstants";
|
|
import PageNotFound from "pages/common/PageNotFound";
|
|
import ServerTimeout from "pages/common/ServerTimeout";
|
|
import ServerUnavailable from "pages/common/ServerUnavailable";
|
|
import ClientError from "pages/common/ClientError";
|
|
|
|
interface ErrorPageProps {
|
|
code: ERROR_CODES;
|
|
}
|
|
|
|
function ErrorPage(props: ErrorPageProps) {
|
|
const { code } = props;
|
|
|
|
switch (code) {
|
|
case ERROR_CODES.PAGE_NOT_FOUND:
|
|
return <PageNotFound />;
|
|
case ERROR_CODES.SERVER_ERROR:
|
|
return <ServerUnavailable />;
|
|
case ERROR_CODES.REQUEST_TIMEOUT:
|
|
return <ServerTimeout />;
|
|
case ERROR_CODES.FAILED_TO_CORRECT_BINDING:
|
|
return <ClientError />;
|
|
default:
|
|
return <ServerUnavailable />;
|
|
}
|
|
}
|
|
|
|
export default ErrorPage;
|