1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-20 00:08:02 +01:00

refresh change request, add conflict margin, set time ago (#2700)

This commit is contained in:
Mateusz Kwasniewski 2022-12-15 10:49:16 +01:00 committed by GitHub
parent 23094b016e
commit 2e615cdd35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 3 deletions

View File

@ -46,7 +46,8 @@ export const FeatureToggleChanges: FC<IFeatureToggleChanges> = ({
<Alert
severity="warning"
sx={{
mx: 1,
px: 3,
mb: 2,
'&.MuiAlert-standardWarning': {
borderStyle: 'none',
},

View File

@ -27,7 +27,11 @@ export const ChangeRequestHeader: FC<{ changeRequest: IChangeRequest }> = ({
</StyledContainer>
<StyledInnerContainer>
<Typography variant="body2" sx={{ margin: 'auto 0' }}>
Created <TimeAgo date={new Date(changeRequest.createdAt)} />{' '}
Created{' '}
<TimeAgo
minPeriod={60}
date={new Date(changeRequest.createdAt)}
/>{' '}
by
</Typography>
<Box

View File

@ -6,7 +6,8 @@ import { IChangeRequest } from 'component/changeRequest/changeRequest.types';
export const useChangeRequest = (projectId: string, id: string) => {
const { data, error, mutate } = useSWR<IChangeRequest>(
formatApiPath(`api/admin/projects/${projectId}/change-requests/${id}`),
fetcher
fetcher,
{ refreshInterval: 15000 }
);
return {