React 18 and Vite (#4510)
This commit is contained in:
parent
1bb1b13f6d
commit
21613fa602
244 changed files with 4547 additions and 8933 deletions
|
@ -1,4 +1,5 @@
|
|||
import React, { useEffect, useState } from 'react';
|
||||
import { useEffect, useState } from 'react';
|
||||
import * as React from 'react';
|
||||
import { Button } from '@/components/elements/button/index';
|
||||
import Can from '@/components/elements/Can';
|
||||
import { ServerContext } from '@/state/server';
|
||||
|
@ -11,13 +12,13 @@ interface PowerButtonProps {
|
|||
|
||||
export default ({ className }: PowerButtonProps) => {
|
||||
const [open, setOpen] = useState(false);
|
||||
const status = ServerContext.useStoreState((state) => state.status.value);
|
||||
const instance = ServerContext.useStoreState((state) => state.socket.instance);
|
||||
const status = ServerContext.useStoreState(state => state.status.value);
|
||||
const instance = ServerContext.useStoreState(state => state.socket.instance);
|
||||
|
||||
const killable = status === 'stopping';
|
||||
const onButtonClick = (
|
||||
action: PowerAction | 'kill-confirmed',
|
||||
e: React.MouseEvent<HTMLButtonElement, MouseEvent>
|
||||
e: React.MouseEvent<HTMLButtonElement, MouseEvent>,
|
||||
): void => {
|
||||
e.preventDefault();
|
||||
if (action === 'kill') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue