Skip to content

Commit

Permalink
Merge pull request #93 from 2anki/feat/use-new-loading-bar
Browse files Browse the repository at this point in the history
feat: use the new loading page
  • Loading branch information
aalemayhu authored Jun 26, 2022
2 parents ab37884 + 7b01723 commit 8a3ba89
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 30 deletions.
22 changes: 0 additions & 22 deletions src/components/LoadingScreen.tsx

This file was deleted.

4 changes: 2 additions & 2 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Integrations } from '@sentry/tracing';

import App from './App';

import LoadingScreen from './components/LoadingScreen';
import LoadingPage from './pages/Loading';

if (window.location.hostname !== 'localhost') {
Sentry.init({
Expand All @@ -22,7 +22,7 @@ if (window.location.hostname !== 'localhost') {

ReactDOM.render(
<React.StrictMode>
<Suspense fallback={<LoadingScreen />}>
<Suspense fallback={<LoadingPage />}>
<App />
</Suspense>
</React.StrictMode>,
Expand Down
4 changes: 2 additions & 2 deletions src/pages/MyUploads/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import BecomeAPatron from '../../components/BecomeAPatron';
import UploadObjectEntry from './components/UploadObjectEntry';
import LoadingScreen from '../../components/LoadingScreen';
import Backend from '../../lib/Backend';
import ActiveJobs from './components/ActiveJobs';

Expand All @@ -9,6 +8,7 @@ import usePatreon from './hooks/usePatreon';
import useQuota from './hooks/useQuota';
import useActiveJobs from './hooks/useActiveJobs';
import { Container, PageContainer } from '../../components/styled';
import LoadingPage from '../Loading';

const backend = new Backend();

Expand All @@ -29,7 +29,7 @@ function MyUploadsPage({ setError }: MyUploadsPageProps) {
const [quota] = useQuota(uploads);

if (loading) {
return <LoadingScreen />;
return <LoadingPage />;
}

return (
Expand Down
4 changes: 2 additions & 2 deletions src/pages/Search/components/SearchContainer.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import LoadingScreen from '../../../components/LoadingScreen';
import { PageContainer } from '../../../components/styled';
import Backend from '../../../lib/Backend';
import LoadingPage from '../../Loading';

import { NotionData } from '../helpers/useNotionData';
import useSearchQuery from '../helpers/useSearchQuery';
Expand All @@ -22,7 +22,7 @@ export default function SearchContainer(props: SearchContentProps) {
setSearchQuery,
} = useSearchQuery(backend);

if (isLoading) return <LoadingScreen />;
if (isLoading) return <LoadingPage />;

return (
<PageContainer>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/Search/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import NavigationBar from '../../components/NavigationBar/NavigationBar';
import LoadingScreen from '../../components/LoadingScreen';
import SearchContainer from './components/SearchContainer';
import useNotionData from './helpers/useNotionData';
import Backend from '../../lib/Backend';
import ConnectNotion from './components/ConnectNotion';
import LoadingPage from '../Loading';

interface SearchPageProps {
isPatron: boolean;
Expand All @@ -13,7 +13,7 @@ const backend = new Backend();
function SearchPage({ isPatron }: SearchPageProps) {
const notionData = useNotionData(backend);
if (notionData.loading) {
return <LoadingScreen />;
return <LoadingPage />;
}

const { connected, connectionLink } = notionData;
Expand Down

0 comments on commit 8a3ba89

Please sign in to comment.