Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import dayjs from "dayjs";
import React, { useContext } from "react";
import styled from "styled-components";
import { useThirdPartyEmotes } from "../hooks/useThirdPartyEmotes";
import { store } from "../store";
import { LogMessage } from "../types/log";
import { Message } from "./Message";
import { User } from "./User";
import utc from "dayjs/plugin/utc";
import timezone from "dayjs/plugin/timezone";
dayjs.extend(utc)
dayjs.extend(timezone)
dayjs.tz.guess()
const LogLineContainer = styled.li`
display: flex;
align-items: flex-start;
margin-bottom: 1px;
.timestamp {
color: var(--text-dark);
user-select: none;
font-family: monospace;
white-space: nowrap;
line-height: 1.1rem;
}
.user {
margin-left: 5px;
dateFormat(date, format, localize = true) {
if (!localize) {
return dayjs.utc(date).tz(dayjs.tz.guess()).format(format);
}
return dayjs.utc(date).local().tz(dayjs.tz.guess()).format(format);
},
import dayjs from "dayjs";
import React, { useContext } from "react";
import styled from "styled-components";
import { useThirdPartyEmotes } from "../hooks/useThirdPartyEmotes";
import { store } from "../store";
import { LogMessage } from "../types/log";
import { Message } from "./Message";
import { User } from "./User";
import utc from "dayjs/plugin/utc";
import timezone from "dayjs/plugin/timezone";
dayjs.extend(utc)
dayjs.extend(timezone)
dayjs.tz.guess()
const TwitchChatLogLineContainer = styled.li`
align-items: flex-start;
margin-bottom: 1px;
padding: 5px 20px;
.timestamp {
color: var(--text-dark);
user-select: none;
font-family: monospace;
white-space: nowrap;
margin-right: 5px;
line-height: 1.1rem;
}
.user {