Skip to content

Instantly share code, notes, and snippets.

import React from "react"
import { translate } from "react-i18next"
import { Button, Container, Divider, Grid, Icon, Menu, Segment, Input, Responsive } from "semantic-ui-react"
import Link from "next/link"
import MetaTags from "./HeadTags"
const menuItem = [ "workflow", "plugins", "events", "training", "contact" ]
export default class topMenu extends React.Component {
constructor(props) {
super(props)
import express from "express"
import next from "next"
import bodyParser from "body-parser"
import cookieParser from "cookie-parser"
import dotenv from "dotenv"
import jwt from "jsonwebtoken"
import lusca from "lusca"
import moment from "moment"
import helmet from "helmet"
import Auth from "./tools/Auth"
$(document).ready(function () {
// socket.io
let socket = io.connect(window.location.href,{'forceNew':true });
// notification
socket.on('notification', function(data){
notification(data)
});
// end socket io
});
global.io.on('connection', (socket) => {
socket.setMaxListeners(20);
console.log('index connected')
socket.emit('notification', {
unread: 2,
list: [{
requestor: {
name: 'hello',
id: 'word',
avatar:'https://semantic-ui.com/images/avatar2/small/rachel.png'