0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-17 23:44:39 -05:00

Moved the Inbox component to views directory in ActivityPub (#22197)

ref AP-744

- according to the new file structure, moved the Inbox component to
views directory as it's a page
- added path aliases to minimize the changes for imports
This commit is contained in:
Sodbileg Gansukh 2025-02-17 12:31:36 +08:00 committed by GitHub
parent ca67c0fd93
commit 95efa15d18
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 34 additions and 14 deletions

View file

@ -1,4 +1,4 @@
import Inbox from './components/Inbox';
import Inbox from '@views/Inbox';
import Notifications from './components/Notifications';
import Profile from './components/Profile';
import Search from './components/Search';

View file

@ -1,25 +1,25 @@
import APAvatar from './global/APAvatar';
import ActivityItem from './activities/ActivityItem';
import ActivityPubWelcomeImage from '../assets/images/ap-welcome.png';
import FeedItem from './feed/FeedItem';
import MainNavigation from './navigation/MainNavigation';
import NewPostModal from './modals/NewPostModal';
import APAvatar from '@components/global/APAvatar';
import ActivityItem from '@components/activities/ActivityItem';
import ActivityPubWelcomeImage from '@assets/images/ap-welcome.png';
import FeedItem from '@components/feed/FeedItem';
import MainNavigation from '@components/navigation/MainNavigation';
import NewPostModal from '@components/modals/NewPostModal';
import NiceModal from '@ebay/nice-modal-react';
import React, {useEffect, useRef} from 'react';
import Separator from './global/Separator';
import getName from '../utils/get-name';
import getUsername from '../utils/get-username';
import Separator from '@components/global/Separator';
import getName from '@utils/get-name';
import getUsername from '@utils/get-username';
import {ActorProperties} from '@tryghost/admin-x-framework/api/activitypub';
import {Button, Skeleton} from '@tryghost/shade';
import {Heading, LoadingIndicator} from '@tryghost/admin-x-design-system';
import {handleProfileClick} from '../utils/handle-profile-click';
import {handleViewContent} from '../utils/content-handlers';
import {handleProfileClick} from '@utils/handle-profile-click';
import {handleViewContent} from '@utils/content-handlers';
import {
useFeedForUser,
useInboxForUser,
useSuggestedProfilesForUser,
useUserDataForUser
} from '../hooks/useActivityPubQueries';
} from '@hooks/useActivityPubQueries';
import {useRouting} from '@tryghost/admin-x-framework/routing';
type Layout = 'inbox' | 'feed';

View file

@ -0,0 +1 @@
export {default} from './Inbox';

View file

@ -18,7 +18,17 @@
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
"noFallthroughCasesInSwitch": true,
/* Path aliases */
"baseUrl": "./src",
"paths": {
"@assets/*": ["assets/*"],
"@components/*": ["components/*"],
"@hooks/*": ["hooks/*"],
"@utils/*": ["utils/*"],
"@views/*": ["views/*"]
}
},
"include": ["src", "test"]
}

View file

@ -12,6 +12,15 @@ export default (function viteConfig() {
'./test/unit/**/*',
'./src/**/*.test.ts'
]
},
resolve: {
alias: {
'@assets': resolve(__dirname, './src/assets'),
'@components': resolve(__dirname, './src/components'),
'@hooks': resolve(__dirname, './src/hooks'),
'@utils': resolve(__dirname, './src/utils'),
'@views': resolve(__dirname, './src/views')
}
}
}
});