mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
revert offline text
This commit is contained in:
@@ -1,30 +1,23 @@
|
||||
import React from "react";
|
||||
import { useSubplebbit } from "@plebbit/plebbit-react-hooks";
|
||||
|
||||
const OfflineIndicator = ({ address, className, tooltipPlace, isText }) => {
|
||||
const OfflineIndicator = ({ address, className, tooltipPlace }) => {
|
||||
const subplebbit = useSubplebbit({ subplebbitAddress: address });
|
||||
const isOnline = subplebbit.updatedAt > Date.now() / 1000 - 60 * 20;
|
||||
const isOnline = false;
|
||||
|
||||
return (
|
||||
<>
|
||||
{!isOnline && (
|
||||
<>
|
||||
{isText ? (
|
||||
<span
|
||||
className={className}
|
||||
>
|
||||
(OFFLINE)
|
||||
</span>
|
||||
) : (
|
||||
<img
|
||||
className={className}
|
||||
alt="offline"
|
||||
src="assets/offline.png"
|
||||
data-tooltip-id="tooltip"
|
||||
data-tooltip-content="Offline"
|
||||
data-tooltip-place={tooltipPlace}
|
||||
/>
|
||||
)}
|
||||
{" "}
|
||||
<img
|
||||
className={className}
|
||||
alt="offline"
|
||||
src="assets/offline.png"
|
||||
data-tooltip-id="tooltip"
|
||||
data-tooltip-content="Offline"
|
||||
data-tooltip-place={tooltipPlace}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
|
||||
@@ -284,8 +284,10 @@ export const BoardsContent = styled.div`
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
.offline-text {
|
||||
|
||||
.disconnected {
|
||||
width: 13px;
|
||||
margin-bottom: -1px;
|
||||
position: absolute;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -294,10 +296,10 @@ export const BoardsContent = styled.div`
|
||||
display: none;
|
||||
}
|
||||
|
||||
.offline-text {
|
||||
font-size: 9px;
|
||||
color: red;
|
||||
font-weight: 700;
|
||||
.disconnected {
|
||||
width: 13px;
|
||||
margin-top: 0px;
|
||||
position: absolute;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ const Home = () => {
|
||||
<OfflineIndicator
|
||||
key={`offline-${index}`}
|
||||
address={subscription}
|
||||
className="offline-text"
|
||||
className="disconnected"
|
||||
isText={true} />
|
||||
<br key={`br-${index}`} />
|
||||
</Fragment>
|
||||
|
||||
Reference in New Issue
Block a user