# This PR - Fix #5675 - Fix #6118 Similarly to #5673 I have improved the field creation time by re-fetching data on page redirection to the object page <img width="1511" alt="Screenshot 2024-07-10 at 16 06 37" src="https://github.com/twentyhq/twenty/assets/61581306/8ef8f4cb-4334-4f4c-b5d9-fea11fd5d99a"> @FellipeMTX @Bonapara --------- Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
32 lines
730 B
TypeScript
32 lines
730 B
TypeScript
import styled from '@emotion/styled';
|
|
|
|
import { CancelButton } from './CancelButton';
|
|
import { SaveButton } from './SaveButton';
|
|
|
|
const StyledContainer = styled.div`
|
|
align-items: center;
|
|
display: flex;
|
|
gap: ${({ theme }) => theme.spacing(1)};
|
|
`;
|
|
|
|
type SaveAndCancelButtonsProps = {
|
|
onSave?: () => void;
|
|
onCancel?: () => void;
|
|
isSaveDisabled?: boolean;
|
|
isCancelDisabled?: boolean;
|
|
};
|
|
|
|
export const SaveAndCancelButtons = ({
|
|
onSave,
|
|
onCancel,
|
|
isSaveDisabled,
|
|
isCancelDisabled,
|
|
}: SaveAndCancelButtonsProps) => {
|
|
return (
|
|
<StyledContainer>
|
|
<CancelButton onCancel={onCancel} disabled={isCancelDisabled} />
|
|
<SaveButton onSave={onSave} disabled={isSaveDisabled} />
|
|
</StyledContainer>
|
|
);
|
|
};
|