Skip to content

Commit

Permalink
chore: rm verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
HomyeeKing committed Apr 9, 2024
1 parent 3b2c099 commit 1c47e84
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions packages/runtime/src/dynamic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import type { ReactNode } from 'react';
import React, { Suspense, lazy } from 'react';
import useMounted from './useMounted.js';

const isServer = import.meta.renderer === 'server';

type ComponentModule<P = {}> = { default: React.ComponentType<P> };

export type LoaderComponent<P = {}> = Promise<React.ComponentType<P> | ComponentModule<P>>;
Expand Down Expand Up @@ -36,10 +34,6 @@ export function dynamic<P = {}>(loader: Loader<P>, option?: DynamicOptions) {
if (!realLoader) return DefaultFallback;
const Fallback = fallback;

if (!ssr && isServer) {
return () => <Fallback />;
}

const LazyComp = lazy(() => realLoader().then(convertModule));
return (props) => {
const hasMounted = useMounted();
Expand Down

0 comments on commit 1c47e84

Please sign in to comment.