MINOR: Fix the reset button on customize landing page (#20158)

* fix the reset button on customize landing page

* fix the reset button on customize landing page
This commit is contained in:
Ashish Gupta 2025-03-10 13:45:25 +05:30 committed by GitHub
parent f8c890ec70
commit ad05f661b0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 28 additions and 1 deletions

View File

@ -11,7 +11,7 @@
* limitations under the License.
*/
import { Button, Col, Space, Typography } from 'antd';
import { Button, Col, Modal, Space, Typography } from 'antd';
import { AxiosError } from 'axios';
import { isEmpty, isNil } from 'lodash';
import React, { useCallback, useEffect, useMemo, useState } from 'react';
@ -276,6 +276,7 @@ function CustomizeMyData({
persona: isNil(personaDetails)
? decodedPersonaFQN
: getEntityName(personaDetails),
pageName: t('label.landing-page'),
}}
/>
</Typography.Title>
@ -339,6 +340,20 @@ function CustomizeMyData({
placeholderWidgetKey={placeholderWidgetKey}
/>
)}
{isResetModalOpen && (
<Modal
centered
cancelText={t('label.no')}
data-testid="reset-layout-modal"
okText={t('label.yes')}
open={isResetModalOpen}
title={t('label.reset-default-layout')}
onCancel={handleCloseResetModal}
onOk={handleReset}>
{t('message.reset-layout-confirmation')}
</Modal>
)}
</>
);
}

View File

@ -1,3 +1,15 @@
/*
* Copyright 2025 Collate.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Create DataProduct API request
*/