-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7370580
commit 71f8bb3
Showing
21 changed files
with
248 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import axiosClient from '@api/axios-client'; | ||
import { pickBy } from 'lodash'; | ||
import { isNotEmpty } from 'utils/data-type'; | ||
import { stringifyParams } from 'utils/search-params'; | ||
|
||
export interface GoalDeleterParams { | ||
id: string; | ||
environmentId: string; | ||
} | ||
|
||
export const goalDeleter = async (_params?: GoalDeleterParams) => { | ||
const params = pickBy(_params, v => isNotEmpty(v)); | ||
|
||
return axiosClient | ||
.delete(`/v1/goal?${stringifyParams(params)}`) | ||
.then(response => response.data); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
export * from './goal-creator'; | ||
export * from './goal-details-fetcher'; | ||
export * from './goals-fetcher'; | ||
export * from './goal-deleter'; | ||
export * from './goal-updater'; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 3 additions & 6 deletions
9
.../goal-details/elements/delete-warning.tsx → ...ard/src/components/info-message/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,15 @@ | ||
import { useTranslation } from 'i18n'; | ||
import { IconInfoFilled } from '@icons'; | ||
import Icon from 'components/icon'; | ||
|
||
const DeleteWarning = () => { | ||
const { t } = useTranslation(['form']); | ||
|
||
const InfoMessage = ({ description }: { description: string }) => { | ||
return ( | ||
<div className="flex items-center w-full p-4 gap-x-2 rounded border-l-4 border-accent-blue-500 bg-accent-blue-50"> | ||
<Icon icon={IconInfoFilled} size={'xxs'} /> | ||
<p className="typo-para-small leading-[14px] text-accent-blue-500"> | ||
{t('goal-details.delete-warning-desc')} | ||
{description} | ||
</p> | ||
</div> | ||
); | ||
}; | ||
|
||
export default DeleteWarning; | ||
export default InfoMessage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.