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:
parent
23094b016e
commit
2e615cdd35
@ -46,7 +46,8 @@ export const FeatureToggleChanges: FC<IFeatureToggleChanges> = ({
|
||||
<Alert
|
||||
severity="warning"
|
||||
sx={{
|
||||
mx: 1,
|
||||
px: 3,
|
||||
mb: 2,
|
||||
'&.MuiAlert-standardWarning': {
|
||||
borderStyle: 'none',
|
||||
},
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user