Skip to content

Commit

Permalink
Move connection delete notice out of banner (#14882)
Browse files Browse the repository at this point in the history
* Move connection delete notice out of banner

* Add empty NL
  • Loading branch information
timroes authored and mfsiega-airbyte committed Jul 21, 2022
1 parent ea8af12 commit fabb029
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
flex-direction: column;
}

.headerError {
padding-top: 25px;
}

.content {
overflow-y: auto;
padding-top: 17px;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import classnames from "classnames";
import React from "react";

import styles from "./MainPageWithScroll.module.scss";
Expand All @@ -8,17 +7,15 @@ import styles from "./MainPageWithScroll.module.scss";
* @param pageTitle the title shown on the page
*/
interface MainPageWithScrollProps {
error?: React.ReactNode;
headTitle?: React.ReactNode;
pageTitle?: React.ReactNode;
children?: React.ReactNode;
}

const MainPageWithScroll: React.FC<MainPageWithScrollProps> = ({ error, headTitle, pageTitle, children }) => {
const MainPageWithScroll: React.FC<MainPageWithScrollProps> = ({ headTitle, pageTitle, children }) => {
return (
<div className={styles.page}>
{error}
<div className={classnames({ [styles.headerError]: !!error })}>
<div>
{headTitle}
{pageTitle}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React, { Suspense, useState } from "react";
import { Navigate, Route, Routes, useParams } from "react-router-dom";

import { LoadingPage, MainPageWithScroll } from "components";
import { AlertBanner } from "components/base/Banner/AlertBanner";
import HeadTitle from "components/HeadTitle";

import { getFrequencyConfig } from "config/utils";
Expand Down Expand Up @@ -70,9 +69,6 @@ const ConnectionItemPage: React.FC = () => {
onStatusUpdating={setStatusUpdating}
/>
}
error={
isConnectionDeleted ? <AlertBanner alertType="connectionDeleted" id="connection.connectionDeletedView" /> : null
}
>
<Suspense fallback={<LoadingPage />}>
<Routes>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@use "../../../../../scss/variables" as vars;

.connectionDeleted {
max-width: vars.$width-modal-md;
margin: vars.$spacing-lg auto;
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
import { faTrash } from "@fortawesome/free-solid-svg-icons";
import React from "react";
import { FormattedMessage } from "react-intl";
import styled from "styled-components";

import { H6 } from "components";
import { InfoBox } from "components/InfoBox";
import StepsMenu from "components/StepsMenu";

import { ConnectionStatus, DestinationRead, SourceRead, WebBackendConnectionRead } from "core/request/AirbyteClient";
import useRouter from "hooks/useRouter";

import { ConnectionSettingsRoutes } from "../ConnectionSettingsRoutes";
import ConnectionName from "./ConnectionName";
import styles from "./ConnectionPageTitle.module.scss";
import { StatusMainInfo } from "./StatusMainInfo";

interface ConnectionPageTitleProps {
Expand Down Expand Up @@ -74,6 +77,11 @@ const ConnectionPageTitle: React.FC<ConnectionPageTitleProps> = ({

return (
<Title>
{connection.status === ConnectionStatus.deprecated && (
<InfoBox className={styles.connectionDeleted} icon={faTrash}>
<FormattedMessage id="connection.connectionDeletedView" />
</InfoBox>
)}
<H6 center bold highlighted>
<FormattedMessage id="connection.title" />
</H6>
Expand Down

0 comments on commit fabb029

Please sign in to comment.