mirror of
https://github.com/Citadel-Station-13/Citadel-Station-13.git
synced 2026-08-27 20:47:07 +01:00
update
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user