feat: Refactor old code with delete
modal and icons
for buttons
This commit is contained in:
@ -18,8 +18,10 @@ import {
|
||||
SightLanguageInfo,
|
||||
SightCommonInfo,
|
||||
UploadMediaDialog,
|
||||
MEDIA_TYPE_VALUES,
|
||||
} from "@shared";
|
||||
import { ImageUploadCard, LanguageSwitcher } from "@widgets";
|
||||
import { Save } from "lucide-react";
|
||||
|
||||
import { observer } from "mobx-react-lite";
|
||||
import { useEffect, useState } from "react";
|
||||
@ -335,6 +337,7 @@ export const InformationTab = observer(
|
||||
<Button
|
||||
variant="contained"
|
||||
color="success"
|
||||
startIcon={<Save color="white" size={18} />}
|
||||
onClick={async () => {
|
||||
await updateSight();
|
||||
toast.success("Достопримечательность сохранена");
|
||||
@ -371,6 +374,13 @@ export const InformationTab = observer(
|
||||
setActiveMenuType(null);
|
||||
}}
|
||||
onSelectMedia={handleMediaSelect}
|
||||
mediaType={
|
||||
activeMenuType
|
||||
? MEDIA_TYPE_VALUES[
|
||||
activeMenuType as keyof typeof MEDIA_TYPE_VALUES
|
||||
]
|
||||
: undefined
|
||||
}
|
||||
/>
|
||||
|
||||
<UploadMediaDialog
|
||||
|
Reference in New Issue
Block a user