Bridge events
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import React, {useLayoutEffect, useState} from 'react';
|
||||
import React, {useLayoutEffect, useMemo} from 'react';
|
||||
// @ts-ignore
|
||||
import iro from "@jaames/iro";
|
||||
|
||||
@@ -11,7 +11,7 @@ interface ColorPickerProps {
|
||||
const randomId = () => Math.floor(Math.random() * 100000);
|
||||
|
||||
export const HSColorPicker: React.FC<ColorPickerProps> = ({h, s, onChange}) => {
|
||||
const [random] = useState(() => `color-picker-${randomId()}`);
|
||||
const random = useMemo(() => `color-picker-${randomId()}`, []);
|
||||
|
||||
useLayoutEffect(() => {
|
||||
// @ts-ignore
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
const proxy = require("http-proxy-middleware");
|
||||
|
||||
let config = {url: "http://127.0.0.1:9000/"};
|
||||
|
||||
module.exports = function(app) {
|
||||
app.use(proxy('/api/ws', { target: config.url, ws: true }));
|
||||
app.use(proxy('/api', { target: config.url, ws: false }));
|
||||
};
|
||||
Reference in New Issue
Block a user