This commit is contained in:
vm-silicons
2025-12-20 11:05:27 -08:00
parent 34de357e7d
commit e858ff5c45
45 changed files with 102 additions and 102 deletions
+8 -8
View File
@@ -127,8 +127,8 @@ import { useBackend } from '../backend';
import { Button, LabeledList, Section } from 'tgui-core/components';
import { Window } from '../layouts';
export const SampleInterface = (props, context) => {
const { act, data } = useBackend(context);
export const SampleInterface = (props) => {
const { act, data } = useBackend<any>();
// Extract `health` and `color` variables from the `data` object.
const {
health,
@@ -158,7 +158,7 @@ export const SampleInterface = (props, context) => {
};
```
Here are the key variables you get from a `useBackend(context)` function:
Here are the key variables you get from a `useBackend<any>()` function:
- `config` is part of core tgui. It contains meta-information about the
interface and who uses it, BYOND refs to various objects, and so forth.
@@ -259,7 +259,7 @@ import { useBackend } from '../backend';
import { Button, LabeledList, Section } from 'tgui-core/components';
import { Window } from '../layouts';
export const SampleInterface = (props, context) => {
export const SampleInterface = (props) => {
return (
<Window resizable>
<Window.Content scrollable>
@@ -269,8 +269,8 @@ export const SampleInterface = (props, context) => {
);
};
const HealthStatus = (props, context) => {
const { act, data } = useBackend(context);
const HealthStatus = (props) => {
const { act, data } = useBackend<any>();
const {
user,
} = props;
@@ -330,8 +330,8 @@ import { useBackend } from '../backend';
import { Button, LabeledList, Section } from 'tgui-core/components';
import { Window } from '../layouts';
export const SampleInterface = (props, context) => {
const { act, data } = useBackend(context);
export const SampleInterface = (props) => {
const { act, data } = useBackend<any>();
// Extract `health` and `color` variables from the `data` object.
const {
health,