Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
yomybaby committed Oct 2, 2024
1 parent 6f5b60d commit a3a9a7a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 20 deletions.
28 changes: 14 additions & 14 deletions react/relay.config.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
// relay.config.js
// const fs = require('fs');
// const path = require('path');
const fs = require('fs');
const path = require('path');

// // function to merge schema.graphql and client-directives.graphql and write to merged_schema.graphql
// const schemaFiles = [
// path.join(__dirname, './data/schema.graphql'),
// path.join(__dirname, './data/client-directives.graphql'),
// ];
// const mergedSchema = schemaFiles
// .map((file) => fs.readFileSync(file, 'utf8'))
// .join('\n');
// fs.writeFileSync(
// path.join(__dirname, './data/merged_schema.graphql'),
// mergedSchema,
// );
// function to merge schema.graphql and client-directives.graphql and write to merged_schema.graphql
const schemaFiles = [
path.join(__dirname, './data/schema.graphql'),
path.join(__dirname, './data/client-directives.graphql'),
];
const mergedSchema = schemaFiles
.map((file) => fs.readFileSync(file, 'utf8'))
.join('\n');
fs.writeFileSync(
path.join(__dirname, './data/merged_schema.graphql'),
mergedSchema,
);

module.exports = {
// ...
Expand Down
1 change: 0 additions & 1 deletion react/src/components/AvailableResourcesCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { useCurrentProjectValue } from '../hooks/useCurrentProject';
import { useResourceLimitAndRemaining } from '../hooks/useResourceLimitAndRemaining';
import BAIProgressWithLabel from './BAIProgressWithLabel';
import Flex from './Flex';
import ResourceGroupSelect from './ResourceGroupSelect';
import ResourceGroupSelectForCurrentProject from './ResourceGroupSelectForCurrentProject';
import { QuestionCircleOutlined, ReloadOutlined } from '@ant-design/icons';
import { Button, Card, Tooltip } from 'antd';
Expand Down
8 changes: 3 additions & 5 deletions react/src/components/ResourceGroupSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ import { useBaiSignedRequestWithPromise } from '../helper';
import { useUpdatableState } from '../hooks';
import { useSuspenseTanQuery } from '../hooks/reactQueryAlias';
import useControllableState from '../hooks/useControllableState';
import { useCurrentProjectValue } from '../hooks/useCurrentProject';
import TextHighlighter from './TextHighlighter';
import { Select, SelectProps } from 'antd';
import _ from 'lodash';
import React, { useEffect, useTransition } from 'react';
import React, { useEffect } from 'react';

interface ResourceGroupSelectProps extends SelectProps {
projectName: string;
Expand All @@ -24,7 +23,7 @@ const ResourceGroupSelect: React.FC<ResourceGroupSelectProps> = ({
...selectProps
}) => {
const baiRequestWithPromise = useBaiSignedRequestWithPromise();
const [fetchKey, updateFetchKey] = useUpdatableState('first');
const [fetchKey] = useUpdatableState('first');
const [controllableSearchValue, setControllableSearchValue] =
useControllableState<string>({
value: searchValue,
Expand All @@ -34,7 +33,6 @@ const ResourceGroupSelect: React.FC<ResourceGroupSelectProps> = ({
const [controllableValue, setControllableValue] =
useControllableState(selectProps);

const [isPendingLoading, startLoadingTransition] = useTransition();
const { data: resourceGroupSelectQueryResult } = useSuspenseTanQuery<
[
{
Expand Down Expand Up @@ -147,7 +145,7 @@ const ResourceGroupSelect: React.FC<ResourceGroupSelectProps> = ({
// });
// }
}}
loading={isPendingLoading || loading}
loading={loading}
options={_.map(resourceGroups, (resourceGroup) => {
return { value: resourceGroup.name, label: resourceGroup.name };
})}
Expand Down

0 comments on commit a3a9a7a

Please sign in to comment.