Skip to content

Commit

Permalink
fix: Warning: Functions are not valid as a React child
Browse files Browse the repository at this point in the history
  • Loading branch information
felixmosh committed Jul 17, 2023
1 parent b4994eb commit 0141a99
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
5 changes: 3 additions & 2 deletions packages/ui/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { ToastContainer } from 'react-toastify';
import { ConfirmModal } from './components/ConfirmModal/ConfirmModal';
import { Header } from './components/Header/Header';
import { HeaderActions } from './components/HeaderActions/HeaderActions';
import { Loader } from './components/Loader/Loader';
import { Menu } from './components/Menu/Menu';
import { Title } from './components/Title/Title';
import { useActiveQueue } from './hooks/useActiveQueue';
Expand Down Expand Up @@ -34,10 +35,10 @@ export const App = () => {
<main>
<div>
{state.loading ? (
'Loading...'
<Loader />
) : (
<>
<Suspense fallback={() => 'Loading...'}>
<Suspense fallback={<Loader />}>
<Switch>
<Route
path="/queue/:name"
Expand Down
3 changes: 3 additions & 0 deletions packages/ui/src/components/Loader/Loader.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import React from 'react';

export const Loader = () => <div>Loading...</div>;
2 changes: 1 addition & 1 deletion packages/ui/src/hooks/useSettings.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import create from 'zustand';
import { create } from 'zustand';
import { persist } from 'zustand/middleware';

interface SettingsState {
Expand Down

0 comments on commit 0141a99

Please sign in to comment.