Skip to content

Commit

Permalink
🐛 fix: fix changelog modal (#5894)
Browse files Browse the repository at this point in the history
* fix changelog modal

* improve
  • Loading branch information
arvinxx authored Feb 8, 2025
1 parent 5aa4bec commit 2a3840b
Show file tree
Hide file tree
Showing 15 changed files with 23 additions and 41 deletions.
4 changes: 1 addition & 3 deletions src/app/[variants]/(main)/changelog/error.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use client';

import dynamic from 'next/dynamic';

export default dynamic(() => import('@/components/Error'));
export { default } from '@/components/Error';
3 changes: 1 addition & 2 deletions src/app/[variants]/(main)/changelog/modal/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import { useLayoutEffect } from 'react';

import { withSuspense } from '@/components/withSuspense';
import { useQueryRoute } from '@/hooks/useQueryRoute';

/**
Expand All @@ -21,4 +20,4 @@ const ChangelogModal = () => {
return null;
};

export default withSuspense(ChangelogModal);
export default ChangelogModal;
4 changes: 1 addition & 3 deletions src/app/[variants]/(main)/chat/(workspace)/@portal/error.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use client';

import dynamic from 'next/dynamic';

export default dynamic(() => import('@/components/Error'));
export { default } from '@/components/Error';
4 changes: 1 addition & 3 deletions src/app/[variants]/(main)/chat/error.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use client';

import dynamic from 'next/dynamic';

export default dynamic(() => import('@/components/Error'));
export { default } from '@/components/Error';
4 changes: 1 addition & 3 deletions src/app/[variants]/(main)/chat/settings/error.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use client';

import dynamic from 'next/dynamic';

export default dynamic(() => import('@/components/Error'));
export { default } from '@/components/Error';
4 changes: 1 addition & 3 deletions src/app/[variants]/(main)/discover/(detail)/error.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use client';

import dynamic from 'next/dynamic';

export default dynamic(() => import('@/components/Error'));
export { default } from '@/components/Error';
4 changes: 1 addition & 3 deletions src/app/[variants]/(main)/discover/(list)/error.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use client';

import dynamic from 'next/dynamic';

export default dynamic(() => import('@/components/Error'));
export { default } from '@/components/Error';
4 changes: 1 addition & 3 deletions src/app/[variants]/(main)/discover/error.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use client';

import dynamic from 'next/dynamic';

export default dynamic(() => import('@/components/Error'));
export { default } from '@/components/Error';
4 changes: 1 addition & 3 deletions src/app/[variants]/(main)/error.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use client';

import dynamic from 'next/dynamic';

export default dynamic(() => import('@/components/Error'));
export { default } from '@/components/Error';
4 changes: 1 addition & 3 deletions src/app/[variants]/(main)/profile/error.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use client';

import dynamic from 'next/dynamic';

export default dynamic(() => import('@/components/Error'));
export { default } from '@/components/Error';
3 changes: 1 addition & 2 deletions src/app/[variants]/(main)/profile/features/ClerkProfile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { ElementsConfig } from '@clerk/types';
import { createStyles } from 'antd-style';
import { memo } from 'react';

import { withSuspense } from '@/components/withSuspense';

export const useStyles = createStyles(
({ css, responsive, token }) =>
Expand Down Expand Up @@ -71,4 +70,4 @@ const Client = memo<{ mobile?: boolean }>(({ mobile }) => {
);
});

export default withSuspense(Client);
export default Client;
4 changes: 1 addition & 3 deletions src/app/[variants]/(main)/settings/error.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use client';

import dynamic from 'next/dynamic';

export default dynamic(() => import('@/components/Error'));
export { default } from '@/components/Error';
4 changes: 1 addition & 3 deletions src/app/[variants]/@modal/error.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use client';

import dynamic from 'next/dynamic';

export default dynamic(() => import('@/components/Error'));
export { default } from '@/components/Error';
4 changes: 1 addition & 3 deletions src/app/[variants]/error.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use client';

import dynamic from 'next/dynamic';

export default dynamic(() => import('@/components/Error'));
export { default } from '@/components/Error';
10 changes: 9 additions & 1 deletion src/features/DevPanel/features/Table/TooltipContent.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Highlighter } from '@lobehub/ui';
import Image from 'next/image';
import Link from 'next/link';
import { ReactNode, memo } from 'react';
import { Flexbox } from 'react-layout-kit';
Expand All @@ -7,7 +8,14 @@ const TooltipContent = memo<{ children: ReactNode }>(({ children }) => {
if (typeof children !== 'string') return children;

if (children.startsWith('data:image')) {
return <img src={children} style={{ height: 'auto', maxWidth: '100%' }} />;
return (
<Image
alt={'tooltip-image'}
src={children}
style={{ height: 'auto', maxWidth: '100%' }}
unoptimized
/>
);
}

if (children.startsWith('http'))
Expand Down

0 comments on commit 2a3840b

Please sign in to comment.