mirror of
https://github.com/billsonnn/nitro-react.git
synced 2025-02-17 01:12:37 +01:00
Change widgets from functions to consts
This commit is contained in:
parent
a64c01b2db
commit
c5424b2303
@ -38,15 +38,15 @@ export class FurnitureItem implements IFurnitureItem
|
||||
this._recyclable = parser.isRecycleable;
|
||||
this._sellable = parser.sellable;
|
||||
this._stuffData = parser.stuffData;
|
||||
this._extra = parser._Str_2794;
|
||||
this._extra = parser.extra;
|
||||
this._secondsToExpiration = parser.secondsToExpiration;
|
||||
this._expirationTimeStamp = parser._Str_10616;
|
||||
this._expirationTimeStamp = parser.expirationTimeStamp;
|
||||
this._hasRentPeriodStarted = parser.hasRentPeriodStarted;
|
||||
this._creationDay = parser._Str_8932;
|
||||
this._creationMonth = parser._Str_9050;
|
||||
this._creationYear = parser._Str_9408;
|
||||
this._creationDay = parser.creationDay;
|
||||
this._creationMonth = parser.creationMonth;
|
||||
this._creationYear = parser.creationYear;
|
||||
this._slotId = parser.slotId;
|
||||
this._songId = parser._Str_3951;
|
||||
this._songId = parser.songId;
|
||||
this._flatId = parser.flatId;
|
||||
this._isRented = parser.rentable;
|
||||
this._isWallItem = parser.isWallItem;
|
||||
@ -197,15 +197,15 @@ export class FurnitureItem implements IFurnitureItem
|
||||
this._recyclable = parser.isRecycleable;
|
||||
this._sellable = parser.sellable;
|
||||
this._stuffData = parser.stuffData;
|
||||
this._extra = parser._Str_2794;
|
||||
this._extra = parser.extra;
|
||||
this._secondsToExpiration = parser.secondsToExpiration;
|
||||
this._expirationTimeStamp = parser._Str_10616;
|
||||
this._expirationTimeStamp = parser.expirationTimeStamp;
|
||||
this._hasRentPeriodStarted = parser.hasRentPeriodStarted;
|
||||
this._creationDay = parser._Str_8932;
|
||||
this._creationMonth = parser._Str_9050;
|
||||
this._creationYear = parser._Str_9408;
|
||||
this._creationDay = parser.creationDay;
|
||||
this._creationMonth = parser.creationMonth;
|
||||
this._creationYear = parser.creationYear;
|
||||
this._slotId = parser.slotId;
|
||||
this._songId = parser._Str_3951;
|
||||
this._songId = parser.songId;
|
||||
this._flatId = parser.flatId;
|
||||
this._isRented = parser.rentable;
|
||||
this._isWallItem = parser.isWallItem;
|
||||
|
@ -1,8 +1,9 @@
|
||||
import { RoomEngineObjectEvent, RoomEngineTriggerWidgetEvent } from 'nitro-renderer';
|
||||
import { FC } from 'react';
|
||||
import { useRoomEngineEvent } from '../../../../../hooks/events/nitro/room/room-engine-event';
|
||||
import { FurnitureHighScoreViewProps } from './FurnitureHighScoreView.types';
|
||||
|
||||
export function FurnitureHighScoreView(props: FurnitureHighScoreViewProps): JSX.Element
|
||||
export const FurnitureHighScoreView: FC<FurnitureHighScoreViewProps> = props =>
|
||||
{
|
||||
const onRoomEngineObjectEvent = (event: RoomEngineObjectEvent) =>
|
||||
{
|
||||
|
@ -1,8 +1,9 @@
|
||||
import { RoomEngineObjectEvent, RoomEngineTriggerWidgetEvent } from 'nitro-renderer';
|
||||
import { FC } from 'react';
|
||||
import { useRoomEngineEvent } from '../../../../../hooks/events/nitro/room/room-engine-event';
|
||||
import { FurnitureMannequinViewProps } from './FurnitureMannequinView.types';
|
||||
|
||||
export function FurnitureMannequinView(props: FurnitureMannequinViewProps): JSX.Element
|
||||
export const FurnitureMannequinView: FC<FurnitureMannequinViewProps> = props =>
|
||||
{
|
||||
const onRoomEngineObjectEvent = (event: RoomEngineObjectEvent) =>
|
||||
{
|
||||
|
@ -1,8 +1,9 @@
|
||||
import { RoomEngineObjectEvent, RoomEngineTriggerWidgetEvent } from 'nitro-renderer';
|
||||
import { FC } from 'react';
|
||||
import { useRoomEngineEvent } from '../../../../../hooks/events/nitro/room/room-engine-event';
|
||||
import { FurniturePresentViewProps } from './FurniturePresentView.types';
|
||||
|
||||
export function FurniturePresentView(props: FurniturePresentViewProps): JSX.Element
|
||||
export const FurniturePresentView: FC<FurniturePresentViewProps> = props =>
|
||||
{
|
||||
const onRoomEngineObjectEvent = (event: RoomEngineObjectEvent) =>
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { NitroEvent, RoomEngineTriggerWidgetEvent, RoomObjectVariable } from 'nitro-renderer';
|
||||
import { useCallback, useState } from 'react';
|
||||
import { FC, useCallback, useState } from 'react';
|
||||
import { GetRoomEngine, GetRoomSession, GetSessionDataManager } from '../../../../../api';
|
||||
import { DraggableWindow } from '../../../../../hooks/draggable-window/DraggableWindow';
|
||||
import { CreateEventDispatcherHook } from '../../../../../hooks/events/event-dispatcher.base';
|
||||
@ -10,10 +10,8 @@ import { FurnitureStickieData } from './FurnitureStickieData';
|
||||
import { getStickieColorName, STICKIE_COLORS } from './FurnitureStickieUtils';
|
||||
import { FurnitureStickieViewProps } from './FurnitureStickieView.types';
|
||||
|
||||
export function FurnitureStickieView(props: FurnitureStickieViewProps): JSX.Element
|
||||
export const FurnitureStickieView: FC<FurnitureStickieViewProps> = props =>
|
||||
{
|
||||
const { events = null } = props;
|
||||
|
||||
const [ stickieData, setStickieData ] = useState<FurnitureStickieData>(null);
|
||||
|
||||
const onNitroEvent = useCallback((event: NitroEvent) =>
|
||||
@ -62,7 +60,7 @@ export function FurnitureStickieView(props: FurnitureStickieViewProps): JSX.Elem
|
||||
}, []);
|
||||
|
||||
useRoomEngineEvent(RoomEngineTriggerWidgetEvent.REQUEST_STICKIE, onNitroEvent);
|
||||
CreateEventDispatcherHook(RoomWidgetRoomObjectUpdateEvent.FURNI_REMOVED, events, onNitroEvent);
|
||||
CreateEventDispatcherHook(RoomWidgetRoomObjectUpdateEvent.FURNI_REMOVED, props.events, onNitroEvent);
|
||||
|
||||
const processAction = useCallback((type: string, value: string = null) =>
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user