Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
mehdi-torabiv committed Jul 10, 2024
1 parent d51792f commit e6eac87
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function TcDiscordIntegrationSettingsDialog({

const { retrievePlatformProperties, patchPlatformById, deletePlatform } =
useAppStore();
const [isFetchingIntialData, setIsFetchingIntialData] =
const [isFetchingInitialData, setIsFetchingInitialData] =
useState<boolean>(true);
const [open, setOpen] = useState<boolean>(false);
const [loading, setLoading] = useState<boolean>(false);
Expand All @@ -63,16 +63,16 @@ function TcDiscordIntegrationSettingsDialog({
}, []);

useEffect(() => {
const discordPlatformIsFetchingIntialData = community?.platforms
const discordPlatformIsFetchingInitialData = community?.platforms
.filter(
(platform) =>
platform.disconnectedAt === null && platform.name === 'discord'
)
.map((platform) => platform.metadata?.isFetchingIntialData)[0];
.map((platform) => platform.metadata?.isFetchingInitialData)[0];

setIsFetchingIntialData(
discordPlatformIsFetchingIntialData
? discordPlatformIsFetchingIntialData
setIsFetchingInitialData(
discordPlatformIsFetchingInitialData
? discordPlatformIsFetchingInitialData
: false
);
}, [community]);
Expand Down Expand Up @@ -269,7 +269,7 @@ function TcDiscordIntegrationSettingsDialog({
onClick={() => setOpen(false)}
/>
</div>
{isFetchingIntialData ? (
{isFetchingInitialData ? (
<div className='flex justify-center items-center h-96'>
<div className='text-center space-y-4'>
<CircularProgress size={54} />
Expand Down Expand Up @@ -455,7 +455,7 @@ function TcDiscordIntegrationSettingsDialog({
<TcButton
className='w-1/3'
text='Confirm'
disabled={selectedChannels?.length === 0 || !selectedDate || isFetchingIntialData}
disabled={selectedChannels?.length === 0 || !selectedDate || isFetchingInitialData}
variant='contained'
onClick={() => handlePatchDiscordIntegrationSettings()}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/utils/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export interface ICommunityDiscordPlatfromProps {
permissions: Permissions;
analyzerStartedAt?: string;
isInProgress?: boolean;
isFetchingIntialData?: boolean;
isFetchingInitialData?: boolean;
};
disconnectedAt: string | null;
}
Expand Down

0 comments on commit e6eac87

Please sign in to comment.