Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Studio: Remove connect site button when already exists a Sync connection #754

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 10 additions & 17 deletions src/components/sync-connected-sites.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { getIpcApi } from '../lib/get-ipc-api';
import { ArrowIcon } from './arrow-icon';
import { Badge } from './badge';
import Button from './button';
import { ConnectButton } from './connect-create-buttons';
import { OpenSitesSyncSelector } from './content-tab-sync';
import { CircleRedCrossIcon } from './icons/circle-red-cross';
import offlineIcon from './offline-icon';
Expand Down Expand Up @@ -444,22 +443,16 @@ export function SyncConnectedSites( {
}, [ connectedSites ] );

return (
<div className="flex flex-col h-full overflow-hidden">
<div className="flex flex-col flex-1 pt-8 overflow-y-auto">
{ siteSections.map( ( section ) => (
<SyncConnectedSitesSection
key={ section.id }
section={ section }
selectedSite={ selectedSite }
disconnectSite={ disconnectSite }
openSitesSyncSelector={ openSitesSyncSelector }
/>
) ) }
</div>

<div className="flex mt-auto gap-4 pt-5 pb-4 px-8 border-t border-a8c-gray-5 flex-shrink-0">
<ConnectButton variant="secondary" connectSite={ openSitesSyncSelector } />
</div>
<div className="flex flex-col flex-1 pt-8 overflow-y-auto">
{ siteSections.map( ( section ) => (
<SyncConnectedSitesSection
key={ section.id }
section={ section }
selectedSite={ selectedSite }
disconnectSite={ disconnectSite }
openSitesSyncSelector={ openSitesSyncSelector }
/>
) ) }
</div>
);
}
Loading