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
|
<Alert
|
||||||
severity="warning"
|
severity="warning"
|
||||||
sx={{
|
sx={{
|
||||||
mx: 1,
|
px: 3,
|
||||||
|
mb: 2,
|
||||||
'&.MuiAlert-standardWarning': {
|
'&.MuiAlert-standardWarning': {
|
||||||
borderStyle: 'none',
|
borderStyle: 'none',
|
||||||
},
|
},
|
||||||
|
@ -27,7 +27,11 @@ export const ChangeRequestHeader: FC<{ changeRequest: IChangeRequest }> = ({
|
|||||||
</StyledContainer>
|
</StyledContainer>
|
||||||
<StyledInnerContainer>
|
<StyledInnerContainer>
|
||||||
<Typography variant="body2" sx={{ margin: 'auto 0' }}>
|
<Typography variant="body2" sx={{ margin: 'auto 0' }}>
|
||||||
Created <TimeAgo date={new Date(changeRequest.createdAt)} />{' '}
|
Created{' '}
|
||||||
|
<TimeAgo
|
||||||
|
minPeriod={60}
|
||||||
|
date={new Date(changeRequest.createdAt)}
|
||||||
|
/>{' '}
|
||||||
by
|
by
|
||||||
</Typography>
|
</Typography>
|
||||||
<Box
|
<Box
|
||||||
|
@ -6,7 +6,8 @@ import { IChangeRequest } from 'component/changeRequest/changeRequest.types';
|
|||||||
export const useChangeRequest = (projectId: string, id: string) => {
|
export const useChangeRequest = (projectId: string, id: string) => {
|
||||||
const { data, error, mutate } = useSWR<IChangeRequest>(
|
const { data, error, mutate } = useSWR<IChangeRequest>(
|
||||||
formatApiPath(`api/admin/projects/${projectId}/change-requests/${id}`),
|
formatApiPath(`api/admin/projects/${projectId}/change-requests/${id}`),
|
||||||
fetcher
|
fetcher,
|
||||||
|
{ refreshInterval: 15000 }
|
||||||
);
|
);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
Loading…
Reference in New Issue
Block a user