senchabot-opensource / monorepo

Open source Discord bot and Twitch bot monorepo. Senchabot apps and packages.
https://senchabot.app
GNU General Public License v3.0
85 stars 23 forks source link

feat(apps/web): fix loading checks on data retrievals #369

Closed rasitds closed 5 months ago

rasitds commented 11 months ago

Is your feature request related to a problem? Please describe.

  1. There is no joint loading state in <SystemMessage /> component.
  2. There is a need to update the if statement related to loading check in <TwitchBotForm /> component.

Describe the solution you'd like

  1. <SystemMessage />: if statement can be updated for fix
    {!discordServerCount.isLoading ||
          !twitchChannelCount.isLoading ||
          !discordServers.isLoading ||
          !twitchChannels.isLoading ? (
  2. <TwitchBotForm />: maybe it can be updated like this
    cfgData.isLoading || isTwitchAccAvailable.isLoading ? (
        <LoadingBox />
      ) : !isTwitchAccAvailable.data?.data ? (
        <Typography>Twitch account not found</Typography>
      ) : (
        ...