fix: Fix bugs
This commit is contained in:
@ -44,7 +44,7 @@ export const LanguageSwitcher = observer(() => {
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="fixed bottom-0 left-1/2 -translate-x-1/2 flex gap-2 p-4 z-10 ">
|
||||
<div className="fixed bottom-0 left-1/2 -translate-x-1/2 flex gap-2 p-4 z-100000000">
|
||||
{/* Added some styling for better visualization */}
|
||||
{LANGUAGES.map((lang) => (
|
||||
<Button
|
||||
|
@ -31,7 +31,7 @@ import { toast } from "react-toastify";
|
||||
|
||||
export const CreateInformationTab = observer(
|
||||
({ value, index }: { value: number; index: number }) => {
|
||||
const { cities } = cityStore;
|
||||
const { ruCities } = cityStore;
|
||||
const [mediaId, setMediaId] = useState<string>("");
|
||||
const [isPreviewMediaOpen, setIsPreviewMediaOpen] = useState(false);
|
||||
const [isUploadMediaOpen, setIsUploadMediaOpen] = useState(false);
|
||||
@ -120,7 +120,10 @@ export const CreateInformationTab = observer(
|
||||
paddingBottom: "70px" /* Space for save button */,
|
||||
}}
|
||||
>
|
||||
<BackButton />
|
||||
<div className="flex gap-10 items-center mb-5 max-w-[80%]">
|
||||
<BackButton />
|
||||
<h1 className="text-3xl break-words">{sight[language].name}</h1>
|
||||
</div>
|
||||
|
||||
<Box
|
||||
sx={{
|
||||
@ -172,9 +175,9 @@ export const CreateInformationTab = observer(
|
||||
/>
|
||||
|
||||
<Autocomplete
|
||||
options={cities ?? []}
|
||||
options={ruCities ?? []}
|
||||
value={
|
||||
cities.find((city) => city.id === sight.city_id) ?? null
|
||||
ruCities.find((city) => city.id === sight.city_id) ?? null
|
||||
}
|
||||
getOptionLabel={(option) => option.name}
|
||||
onChange={(_, value) => {
|
||||
@ -271,7 +274,7 @@ export const CreateInformationTab = observer(
|
||||
/>
|
||||
|
||||
<ImageUploadCard
|
||||
title="Водяной знак (леввый верхний)"
|
||||
title="Водяной знак (левый верхний)"
|
||||
imageKey="watermark_lu"
|
||||
imageUrl={sight.watermark_lu}
|
||||
onImageClick={() => {
|
||||
|
@ -109,7 +109,10 @@ export const CreateLeftTab = observer(
|
||||
position: "relative",
|
||||
}}
|
||||
>
|
||||
<BackButton />
|
||||
<div className="flex gap-10 items-center mb-5 max-w-[80%]">
|
||||
<BackButton />
|
||||
<h1 className="text-3xl break-words">{sight[language].name}</h1>
|
||||
</div>
|
||||
<Paper
|
||||
elevation={2}
|
||||
sx={{
|
||||
@ -210,7 +213,7 @@ export const CreateLeftTab = observer(
|
||||
|
||||
<ReactMarkdownEditor
|
||||
value={sight[language].left.body}
|
||||
onChange={(value) =>
|
||||
onChange={(value: any) =>
|
||||
updateSightInfo(
|
||||
{
|
||||
left: {
|
||||
|
@ -256,7 +256,10 @@ export const CreateRightTab = observer(
|
||||
position: "relative",
|
||||
}}
|
||||
>
|
||||
<BackButton />
|
||||
<div className="flex gap-10 items-center mb-5 max-w-[80%]">
|
||||
<BackButton />
|
||||
<h1 className="text-3xl break-words">{sight[language].name}</h1>
|
||||
</div>
|
||||
|
||||
<Box sx={{ display: "flex", flexGrow: 1, gap: 2.5 }}>
|
||||
{/* Left Column: Navigation & Article List */}
|
||||
|
@ -32,7 +32,7 @@ import { toast } from "react-toastify";
|
||||
|
||||
export const InformationTab = observer(
|
||||
({ value, index }: { value: number; index: number }) => {
|
||||
const { cities } = cityStore;
|
||||
const { ruCities } = cityStore;
|
||||
|
||||
const [mediaId, setMediaId] = useState<string>("");
|
||||
const [isPreviewMediaOpen, setIsPreviewMediaOpen] = useState(false);
|
||||
@ -113,7 +113,11 @@ export const InformationTab = observer(
|
||||
paddingBottom: "70px" /* Space for save button */,
|
||||
}}
|
||||
>
|
||||
<BackButton />
|
||||
<div className="flex gap-10 items-center mb-5 max-w-[80%]">
|
||||
<BackButton />
|
||||
<h1 className="text-3xl break-words">{sight[language].name}</h1>
|
||||
</div>
|
||||
<LanguageSwitcher />
|
||||
|
||||
<Box
|
||||
sx={{
|
||||
@ -159,9 +163,9 @@ export const InformationTab = observer(
|
||||
/>
|
||||
|
||||
<Autocomplete
|
||||
options={cities ?? []}
|
||||
options={ruCities ?? []}
|
||||
value={
|
||||
cities.find((city) => city.id === sight.common.city_id) ??
|
||||
ruCities.find((city) => city.id === sight.common.city_id) ??
|
||||
null
|
||||
}
|
||||
getOptionLabel={(option) => option.name}
|
||||
|
@ -121,7 +121,10 @@ export const LeftWidgetTab = observer(
|
||||
position: "relative",
|
||||
}}
|
||||
>
|
||||
<BackButton />
|
||||
<div className="flex gap-10 items-center mb-5 max-w-[80%]">
|
||||
<BackButton />
|
||||
<h1 className="text-3xl break-words">{sight[language].name}</h1>
|
||||
</div>
|
||||
|
||||
<Paper
|
||||
elevation={2}
|
||||
@ -223,7 +226,7 @@ export const LeftWidgetTab = observer(
|
||||
|
||||
<ReactMarkdownEditor
|
||||
value={data?.left?.body}
|
||||
onChange={(value) =>
|
||||
onChange={(value: any) =>
|
||||
updateSightInfo(languageStore.language, {
|
||||
left: {
|
||||
heading: sight[languageStore.language].left.heading,
|
||||
|
@ -199,7 +199,10 @@ export const RightWidgetTab = observer(
|
||||
position: "relative",
|
||||
}}
|
||||
>
|
||||
<BackButton />
|
||||
<div className="flex gap-10 items-center mb-5 max-w-[80%]">
|
||||
<BackButton />
|
||||
<h1 className="text-3xl break-words">{sight[language].name}</h1>
|
||||
</div>
|
||||
|
||||
<Box sx={{ display: "flex", flexGrow: 1, gap: 2.5 }}>
|
||||
<Box className="flex flex-col w-[75%] gap-2">
|
||||
|
Reference in New Issue
Block a user