Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

♻️ refactor: move responsive to server utils folder #4447

Merged
merged 1 commit into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app/(main)/(mobile)/me/(home)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Center } from 'react-layout-kit';
import BrandWatermark from '@/components/BrandWatermark';
import { metadataModule } from '@/server/metadata';
import { translation } from '@/server/translation';
import { isMobileDevice } from '@/utils/responsive';
import { isMobileDevice } from '@/utils/server/responsive';

import Category from './features/Category';
import UserBanner from './features/UserBanner';
Expand Down
2 changes: 1 addition & 1 deletion src/app/(main)/(mobile)/me/data/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { redirect } from 'next/navigation';

import { metadataModule } from '@/server/metadata';
import { translation } from '@/server/translation';
import { isMobileDevice } from '@/utils/responsive';
import { isMobileDevice } from '@/utils/server/responsive';

import Category from './features/Category';

Expand Down
2 changes: 1 addition & 1 deletion src/app/(main)/(mobile)/me/profile/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { redirect } from 'next/navigation';

import { metadataModule } from '@/server/metadata';
import { translation } from '@/server/translation';
import { isMobileDevice } from '@/utils/responsive';
import { isMobileDevice } from '@/utils/server/responsive';

import Category from './features/Category';

Expand Down
2 changes: 1 addition & 1 deletion src/app/(main)/(mobile)/me/settings/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { redirect } from 'next/navigation';

import { metadataModule } from '@/server/metadata';
import { translation } from '@/server/translation';
import { isMobileDevice } from '@/utils/responsive';
import { isMobileDevice } from '@/utils/server/responsive';

import Category from './features/Category';

Expand Down
2 changes: 1 addition & 1 deletion src/app/(main)/chat/(workspace)/@conversation/default.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Conversation from '@/features/Conversation';
import { isMobileDevice } from '@/utils/responsive';
import { isMobileDevice } from '@/utils/server/responsive';

import ChatHydration from './features/ChatHydration';
import DesktopChatInput from './features/ChatInput/Desktop';
Expand Down
2 changes: 1 addition & 1 deletion src/app/(main)/chat/(workspace)/@portal/default.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Suspense, lazy } from 'react';

import Loading from '@/components/CircleLoading';
import { isMobileDevice } from '@/utils/responsive';
import { isMobileDevice } from '@/utils/server/responsive';

import Desktop from './_layout/Desktop';
import Mobile from './_layout/Mobile';
Expand Down
2 changes: 1 addition & 1 deletion src/app/(main)/chat/(workspace)/@topic/default.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// import TopicListContent from './features/TopicListContent';
import React, { Suspense, lazy } from 'react';

import { isMobileDevice } from '@/utils/responsive';
import { isMobileDevice } from '@/utils/server/responsive';

import Desktop from './_layout/Desktop';
import Mobile from './_layout/Mobile';
Expand Down
2 changes: 1 addition & 1 deletion src/app/(main)/chat/(workspace)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { BRANDING_NAME } from '@/const/branding';
import { ldModule } from '@/server/ld';
import { metadataModule } from '@/server/metadata';
import { translation } from '@/server/translation';
import { isMobileDevice } from '@/utils/responsive';
import { isMobileDevice } from '@/utils/server/responsive';

import PageTitle from '../features/PageTitle';
import TelemetryNotification from './features/TelemetryNotification';
Expand Down
2 changes: 1 addition & 1 deletion src/app/(main)/discover/(detail)/assistant/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { metadataModule } from '@/server/metadata';
import { DiscoverService } from '@/server/services/discover';
import { translation } from '@/server/translation';
import { DiscoverPlugintem } from '@/types/discover';
import { isMobileDevice } from '@/utils/responsive';
import { isMobileDevice } from '@/utils/server/responsive';

import DetailLayout from '../../features/DetailLayout';
import Actions from './features/Actions';
Expand Down
2 changes: 1 addition & 1 deletion src/app/(main)/discover/(detail)/model/[...slugs]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { metadataModule } from '@/server/metadata';
import { DiscoverService } from '@/server/services/discover';
import { translation } from '@/server/translation';
import { DiscoverProviderItem } from '@/types/discover';
import { isMobileDevice } from '@/utils/responsive';
import { isMobileDevice } from '@/utils/server/responsive';

import DetailLayout from '../../features/DetailLayout';
import Actions from './features/Actions';
Expand Down
2 changes: 1 addition & 1 deletion src/app/(main)/discover/(detail)/plugin/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ldModule } from '@/server/ld';
import { metadataModule } from '@/server/metadata';
import { DiscoverService } from '@/server/services/discover';
import { translation } from '@/server/translation';
import { isMobileDevice } from '@/utils/responsive';
import { isMobileDevice } from '@/utils/server/responsive';

import DetailLayout from '../../features/DetailLayout';
import Actions from './features/Actions';
Expand Down
2 changes: 1 addition & 1 deletion src/app/(main)/discover/(detail)/provider/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { DiscoverService } from '@/server/services/discover';
import { DocService } from '@/server/services/doc';
import { translation } from '@/server/translation';
import { DiscoverModelItem } from '@/types/discover';
import { isMobileDevice } from '@/utils/responsive';
import { isMobileDevice } from '@/utils/server/responsive';

import DetailLayout from '../../features/DetailLayout';
import Actions from './features/Actions';
Expand Down
2 changes: 1 addition & 1 deletion src/app/(main)/discover/(list)/assistants/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { metadataModule } from '@/server/metadata';
import { DiscoverService } from '@/server/services/discover';
import { translation } from '@/server/translation';
import { AssistantCategory } from '@/types/discover';
import { isMobileDevice } from '@/utils/responsive';
import { isMobileDevice } from '@/utils/server/responsive';

import List from '../features/List';

Expand Down
2 changes: 1 addition & 1 deletion src/app/(main)/discover/(list)/assistants/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ldModule } from '@/server/ld';
import { metadataModule } from '@/server/metadata';
import { DiscoverService } from '@/server/services/discover';
import { translation } from '@/server/translation';
import { isMobileDevice } from '@/utils/responsive';
import { isMobileDevice } from '@/utils/server/responsive';

import List from './features/List';

Expand Down
2 changes: 1 addition & 1 deletion src/app/(main)/discover/(list)/models/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { metadataModule } from '@/server/metadata';
import { DiscoverService } from '@/server/services/discover';
import { translation } from '@/server/translation';
import { AssistantCategory } from '@/types/discover';
import { isMobileDevice } from '@/utils/responsive';
import { isMobileDevice } from '@/utils/server/responsive';

import List from '../features/List';

Expand Down
2 changes: 1 addition & 1 deletion src/app/(main)/discover/(list)/models/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ldModule } from '@/server/ld';
import { metadataModule } from '@/server/metadata';
import { DiscoverService } from '@/server/services/discover';
import { translation } from '@/server/translation';
import { isMobileDevice } from '@/utils/responsive';
import { isMobileDevice } from '@/utils/server/responsive';

import List from './features/List';

Expand Down
2 changes: 1 addition & 1 deletion src/app/(main)/discover/(list)/plugins/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { metadataModule } from '@/server/metadata';
import { DiscoverService } from '@/server/services/discover';
import { translation } from '@/server/translation';
import { PluginCategory } from '@/types/discover';
import { isMobileDevice } from '@/utils/responsive';
import { isMobileDevice } from '@/utils/server/responsive';

import List from '../features/List';

Expand Down
2 changes: 1 addition & 1 deletion src/app/(main)/discover/(list)/plugins/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ldModule } from '@/server/ld';
import { metadataModule } from '@/server/metadata';
import { DiscoverService } from '@/server/services/discover';
import { translation } from '@/server/translation';
import { isMobileDevice } from '@/utils/responsive';
import { isMobileDevice } from '@/utils/server/responsive';

import List from './features/List';

Expand Down
2 changes: 1 addition & 1 deletion src/app/(main)/discover/(list)/providers/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ldModule } from '@/server/ld';
import { metadataModule } from '@/server/metadata';
import { DiscoverService } from '@/server/services/discover';
import { translation } from '@/server/translation';
import { isMobileDevice } from '@/utils/responsive';
import { isMobileDevice } from '@/utils/server/responsive';

import List from './features/List';

Expand Down
2 changes: 1 addition & 1 deletion src/app/(main)/discover/search/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Locales } from '@/locales/resources';
import { ldModule } from '@/server/ld';
import { metadataModule } from '@/server/metadata';
import { translation } from '@/server/translation';
import { isMobileDevice } from '@/utils/responsive';
import { isMobileDevice } from '@/utils/server/responsive';

import { ListLoadingWithoutBanner } from '../components/ListLoading';

Expand Down
2 changes: 1 addition & 1 deletion src/app/(main)/profile/[[...slugs]]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { metadataModule } from '@/server/metadata';
import { translation } from '@/server/translation';
import { isMobileDevice } from '@/utils/responsive';
import { isMobileDevice } from '@/utils/server/responsive';

import Client from './Client';

Expand Down
2 changes: 1 addition & 1 deletion src/app/(main)/profile/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { notFound } from 'next/navigation';
import { PropsWithChildren } from 'react';

import { enableClerk } from '@/const/auth';
import { isMobileDevice } from '@/utils/responsive';
import { isMobileDevice } from '@/utils/server/responsive';

import MobileLayout from './_layout/Mobile';

Expand Down
2 changes: 1 addition & 1 deletion src/app/(main)/profile/loading.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Flexbox } from 'react-layout-kit';

import SkeletonLoading from '@/components/SkeletonLoading';
import { isMobileDevice } from '@/utils/responsive';
import { isMobileDevice } from '@/utils/server/responsive';

const Loading = () => {
const mobile = isMobileDevice();
Expand Down
2 changes: 1 addition & 1 deletion src/app/(main)/settings/about/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { metadataModule } from '@/server/metadata';
import { translation } from '@/server/translation';
import { isMobileDevice } from '@/utils/responsive';
import { isMobileDevice } from '@/utils/server/responsive';

import Page from './index';

Expand Down
2 changes: 1 addition & 1 deletion src/app/(main)/settings/sync/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { notFound } from 'next/navigation';
import { serverFeatureFlags } from '@/config/featureFlags';
import { metadataModule } from '@/server/metadata';
import { translation } from '@/server/translation';
import { gerServerDeviceInfo, isMobileDevice } from '@/utils/responsive';
import { gerServerDeviceInfo, isMobileDevice } from '@/utils/server/responsive';

import Page from './index';

Expand Down
2 changes: 1 addition & 1 deletion src/app/(main)/welcome/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { BRANDING_NAME } from '@/const/branding';
import { ldModule } from '@/server/ld';
import { metadataModule } from '@/server/metadata';
import { translation } from '@/server/translation';
import { isMobileDevice } from '@/utils/responsive';
import { isMobileDevice } from '@/utils/server/responsive';

import Actions from './features/Actions';
import Hero from './features/Hero';
Expand Down
2 changes: 1 addition & 1 deletion src/app/@modal/(.)settings/modal/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { gerServerDeviceInfo, isMobileDevice } from '@/utils/responsive';
import { gerServerDeviceInfo, isMobileDevice } from '@/utils/server/responsive';

import SettingsModal from './index';

Expand Down
2 changes: 1 addition & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { DEFAULT_LANG, LOBE_LOCALE_COOKIE } from '@/const/locale';
import PWAInstall from '@/features/PWAInstall';
import AuthProvider from '@/layout/AuthProvider';
import GlobalProvider from '@/layout/GlobalProvider';
import { isMobileDevice } from '@/utils/responsive';
import { isMobileDevice } from '@/utils/server/responsive';

const inVercel = process.env.VERCEL === '1';

Expand Down
2 changes: 1 addition & 1 deletion src/components/server/ServerLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { FC, PropsWithChildren } from 'react';

import { isMobileDevice } from '@/utils/responsive';
import { isMobileDevice } from '@/utils/server/responsive';

interface ServerLayoutProps<T> {
Desktop: FC<T>;
Expand Down
2 changes: 1 addition & 1 deletion src/layout/GlobalProvider/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { locales } from '@/locales/resources';
import { getServerGlobalConfig } from '@/server/globalConfig';
import { ServerConfigStoreProvider } from '@/store/serverConfig';
import { getAntdLocale } from '@/utils/locale';
import { isMobileDevice } from '@/utils/responsive';
import { isMobileDevice } from '@/utils/server/responsive';

import AppTheme from './AppTheme';
import Locale from './Locale';
Expand Down
File renamed without changes.
Loading