Padding to quoted link

master
Outrun Colors 2022-09-25 15:33:13 -05:00
parent 54fa43038c
commit bb0598cfda
No known key found for this signature in database
GPG Key ID: 0426976DCEFE6073
4 changed files with 11 additions and 15 deletions

View File

@ -1,6 +1,6 @@
{
"name": "chat",
"version": "0.1.1",
"version": "0.1.2",
"main": "./src/index.tsx",
"license": "MIT",
"dependencies": {

View File

@ -48,6 +48,10 @@
color: red !important;
}
.ChatMessage-quoted-link {
padding-left: 2rem;
}
.ChatMessage-actions-button {
position: absolute;
top: 0;
@ -107,4 +111,4 @@
.ChatMessageList-group:nth-child(even) {
background: rgba(255, 255, 255, 0.025);
}
}

View File

@ -125,7 +125,11 @@ export function ChatMessage({
<div className="ChatMessage-timestamp">{timestamp}</div>
</div>
)}
{quotes && quotedMessage && <QuotedMessageLink message={quotedMessage} />}
{quotes && quotedMessage && (
<div className="ChatMessage-quoted-link">
<QuotedMessageLink message={quotedMessage} />
</div>
)}
<div className="ChatMessage-bottom">
<div>
<span

View File

@ -9,7 +9,6 @@ import React, {
useState,
} from "react";
import { io, Socket } from "socket.io-client";
import lozad from "lozad";
import debounce from "lodash.debounce";
import { useRootContext } from "./useRootContext";
import { useWindowFocus } from "./useWindowFocus";
@ -178,17 +177,6 @@ export function ChatProvider({ children }: PropsWithChildren) {
title.innerHTML = alertedWhileAway ? `[+${notifications}] Chat` : "Chat";
}, [notifications, focused]);
// Setup Lozad
useEffect(() => {
const { observe, observer } = lozad();
observe();
return () => {
observer.disconnect();
};
}, []);
return (
<ChatContext.Provider value={context}>{children}</ChatContext.Provider>
);