Skip to content

Commit

Permalink
wip plugin admin
Browse files Browse the repository at this point in the history
  • Loading branch information
Datayama38 committed Apr 10, 2024
1 parent 0ec6e9a commit efafd89
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 24 deletions.
1 change: 0 additions & 1 deletion cms/src/plugins/betagouv/admin/src/components/FlowCard.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import { Box, Typography, Button } from '@strapi/design-system';
import getTrad from '../utils/getTrad';
import { useIntl } from "react-intl"
Expand Down
37 changes: 14 additions & 23 deletions cms/src/plugins/betagouv/admin/src/pages/HomePage/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';
import { Box, Flex, GridLayout, Typography, Button } from '@strapi/design-system';
import { Box, BaseHeaderLayout, GridLayout, Typography, Button } from '@strapi/design-system';
import getTrad from '../../utils/getTrad';
import { useIntl } from "react-intl"
import { useFlowList } from '../../hooks/useFlowList';
Expand All @@ -10,27 +9,19 @@ const HomePage = () => {
const [flows, isLoading] = useFlowList();

return (
<Box
as="aside"
aria-labelledby="betagouv"
background="neutral0"
borderColor="neutral150"
hasRadius
paddingBottom={4}
paddingLeft={4}
paddingRight={4}
paddingTop={6}
shadow="tableShadow"
>
<Flex direction='column' wrap='nowrap'>
<Typography variant="sigma" textColor="neutral600" id="betagouv">
{formatMessage({ id: getTrad('name') })}
</Typography>
<GridLayout style={{width: '100%'}}>
{ !isLoading && flows.map(f => <FlowCard id={f} key={f}></FlowCard>)}
</GridLayout>
</Flex>
</Box>
<>
<Box background="neutral100">
<BaseHeaderLayout
title={formatMessage({ id: getTrad(`name`)})}
as="h2"
/>
</Box>
<GridLayout>
<FlowCard id={'flush_cache'} />
<FlowCard id={'deploy'} />
{ !isLoading && flows.map((f,i) => <FlowCard id={f} key={i} />)}
</GridLayout>
</>
);
};

Expand Down

0 comments on commit efafd89

Please sign in to comment.