Skip to content

Commit

Permalink
context begone!
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbertNanotracen committed Jun 22, 2024
1 parent 89a1bc5 commit 2356e46
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
22 changes: 11 additions & 11 deletions tgui/packages/tgui/interfaces/ChemMaster.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ type Container = {
volume: number;
};

export const ChemMaster = (props, context) => {
const { data } = useBackend<Data>(context);
export const ChemMaster = (props) => {
const { data } = useBackend<Data>();
const { reagentAnalysisMode } = data;
return (
<Window width={400} height={620}>
Expand All @@ -68,8 +68,8 @@ export const ChemMaster = (props, context) => {
);
};

const ChemMasterContent = (props, context) => {
const { act, data } = useBackend<Data>(context);
const ChemMasterContent = (props) => {
const { act, data } = useBackend<Data>();
const {
isPrinting,
printingProgress,
Expand All @@ -89,7 +89,7 @@ const ChemMasterContent = (props, context) => {
suggestedContainer,
} = data;

const [itemCount, setItemCount] = useLocalState(context, 'itemCount', 1);
const [itemCount, setItemCount] = useLocalState('itemCount', 1);

return (
<Box>
Expand Down Expand Up @@ -260,8 +260,8 @@ const ChemMasterContent = (props, context) => {
);
};

const ReagentEntry = (props, context) => {
const { data, act } = useBackend<Data>(context);
const ReagentEntry = (props) => {
const { data, act } = useBackend<Data>();
const { chemical, transferTo } = props;
const { isPrinting } = data;
return (
Expand Down Expand Up @@ -342,8 +342,8 @@ const ReagentEntry = (props, context) => {
);
};

const ContainerButton = ({ container, category }, context) => {
const { act, data } = useBackend<Data>(context);
const ContainerButton = ({ container, category }) => {
const { act, data } = useBackend<Data>();
const { isPrinting, selectedContainerRef } = data;
const isPillPatch = ['pills', 'patches'].includes(category.name);
return (
Expand Down Expand Up @@ -375,8 +375,8 @@ const ContainerButton = ({ container, category }, context) => {
) as any;
};

const AnalysisResults = (props, context) => {
const { act, data } = useBackend<Data>(context);
const AnalysisResults = (props) => {
const { act, data } = useBackend<Data>();
const {
name,
state,
Expand Down
5 changes: 2 additions & 3 deletions tgui/packages/tgui/interfaces/ChemPress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ type Data = {
packaging_type: string;
};

export const ChemPress = (props, context) => {
const { act, data } = useBackend<Data>(context);
export const ChemPress = (props) => {
const { act, data } = useBackend<Data>();
const {
current_volume,
product_name,
Expand All @@ -35,7 +35,6 @@ export const ChemPress = (props, context) => {
packaging_type,
} = data;
const [categoryName, setCategoryName] = useLocalState(
context,
'categoryName',
packaging_category
);
Expand Down

0 comments on commit 2356e46

Please sign in to comment.