Initial Strapi plugin project
This commit is contained in:
15
admin/src/pages/App.tsx
Normal file
15
admin/src/pages/App.tsx
Normal file
@@ -0,0 +1,15 @@
|
||||
import { Page } from '@strapi/strapi/admin';
|
||||
import { Routes, Route } from 'react-router-dom';
|
||||
|
||||
import { HomePage } from './HomePage';
|
||||
|
||||
const App = () => {
|
||||
return (
|
||||
<Routes>
|
||||
<Route index element={<HomePage />} />
|
||||
<Route path="*" element={<Page.Error />} />
|
||||
</Routes>
|
||||
);
|
||||
};
|
||||
|
||||
export { App };
|
||||
16
admin/src/pages/HomePage.tsx
Normal file
16
admin/src/pages/HomePage.tsx
Normal file
@@ -0,0 +1,16 @@
|
||||
import { Main } from '@strapi/design-system';
|
||||
import { useIntl } from 'react-intl';
|
||||
|
||||
import { getTranslation } from '../utils/getTranslation';
|
||||
|
||||
const HomePage = () => {
|
||||
const { formatMessage } = useIntl();
|
||||
|
||||
return (
|
||||
<Main>
|
||||
<h1>Welcome to {formatMessage({ id: getTranslation('plugin.name') })}</h1>
|
||||
</Main>
|
||||
);
|
||||
};
|
||||
|
||||
export { HomePage };
|
||||
Reference in New Issue
Block a user