Skip to content

Commit

Permalink
Adjust code to useContentTranslationService rename
Browse files Browse the repository at this point in the history
  • Loading branch information
VP-DS committed Jan 3, 2024
1 parent 74cd1be commit f4b2683
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { useContentTranslationServiceProvider } from "@comet/admin";
import { useContentTranslationService } from "@comet/admin";
import { ButtonGroup } from "@mui/material";
import * as React from "react";

import TranslationToolbarButton from "../translation/ToolbarButton";
import { IControlProps } from "../types";

function TranslationControls(props: IControlProps) {
const translationContext = useContentTranslationServiceProvider();
const translationContext = useContentTranslationService();

return <ButtonGroup>{translationContext && <TranslationToolbarButton {...props} />}</ButtonGroup>;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useContentTranslationServiceProvider } from "@comet/admin";
import { useContentTranslationService } from "@comet/admin";
import TranslateIcon from "@mui/icons-material/Translate";
import Tooltip from "@mui/material/Tooltip";
import { convertToRaw } from "draft-js";
Expand All @@ -11,7 +11,7 @@ import { transformStateToXml } from "./xml/transformStateToXml";
import { translateAndTransformXmlToState } from "./xml/translateAndTransformToState";

function ToolbarButton({ editorState, setEditorState }: IControlProps): React.ReactElement {
const translationContext = useContentTranslationServiceProvider();
const translationContext = useContentTranslationService();

async function handleClick(event: React.MouseEvent) {
if (translationContext) {
Expand Down

0 comments on commit f4b2683

Please sign in to comment.