This commit is contained in:
Curry Yang
2024-11-12 17:15:53 +08:00
parent 0a39eb4bd9
commit 6cdc73abbd

View File

@@ -2,8 +2,8 @@ import type { IconProp } from '@fortawesome/fontawesome-svg-core';
import React, { type FC, Fragment, useEffect, useState } from 'react';
import { Button, Collection, Menu, MenuItem, MenuTrigger, Popover, Section, Tooltip, TooltipTrigger } from 'react-aria-components';
import { useFetcher, useParams } from 'react-router-dom';
import { useInterval } from 'react-use';
// import { useInterval } from 'react-use';
import * as session from '../../../account/session';
import { getAppWebsiteBaseURL } from '../../../common/constants';
import { isOwnerOfOrganization } from '../../../models/organization';
@@ -27,7 +27,7 @@ interface Props {
gitSyncEnabled: boolean;
}
const ONE_MINUTE_IN_MS = 1000 * 60;
// const ONE_MINUTE_IN_MS = 1000 * 60;
export const SyncDropdown: FC<Props> = ({ gitSyncEnabled }) => {
const { organizationId, projectId, workspaceId } = useParams<{ organizationId: string; projectId: string; workspaceId: string }>();
@@ -44,7 +44,7 @@ export const SyncDropdown: FC<Props> = ({ gitSyncEnabled }) => {
const rollbackFetcher = useFetcher();
const checkoutFetcher = useFetcher();
const syncDataLoaderFetcher = useFetcher<SyncDataLoaderData>();
const syncDataActionFetcher = useFetcher();
// const syncDataActionFetcher = useFetcher();
useEffect(() => {
if (syncDataLoaderFetcher.state === 'idle' && !syncDataLoaderFetcher.data) {