mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
feat: rename plebchan to 5chan
This commit is contained in:
@@ -3,7 +3,7 @@ import { useAccount, setAccount } from '@plebbit/plebbit-react-hooks';
|
||||
import { getAutoSubscribeAddresses, useDefaultSubplebbits } from './use-default-subplebbits';
|
||||
import { useAutoSubscribeStore } from '../stores/use-auto-subscribe-store';
|
||||
|
||||
const AUTO_SUBSCRIBE_KEY_PREFIX = 'plebchan-auto-subscribe-done-';
|
||||
const AUTO_SUBSCRIBE_KEY_PREFIX = '5chan-auto-subscribe-done-';
|
||||
|
||||
// Keep track of which accounts have been processed globally
|
||||
const processedAccounts = new Set<string>();
|
||||
|
||||
@@ -12,7 +12,7 @@ export interface MultisubSubplebbit {
|
||||
address: string;
|
||||
tags?: string[];
|
||||
features?: string[];
|
||||
plebchanAutoSubscribe?: boolean;
|
||||
autoSubscribe5Chan?: boolean;
|
||||
lowUptime?: boolean;
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ export const useDefaultSubplebbits = () => {
|
||||
|
||||
// Cache auto-subscribe addresses when we fetch subplebbits
|
||||
cacheAutoSubscribeAddresses = filteredSubplebbits
|
||||
.filter((sub: MultisubSubplebbit) => sub.plebchanAutoSubscribe && sub.address)
|
||||
.filter((sub: MultisubSubplebbit) => sub.autoSubscribe5Chan && sub.address)
|
||||
.map((sub: MultisubSubplebbit) => sub.address);
|
||||
|
||||
setState({
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import localForageLru from '@plebbit/plebbit-react-hooks/dist/lib/localforage-lru/index.js';
|
||||
|
||||
const gifFrameDb = localForageLru.createInstance({ name: 'plebchanGifFrames', size: 500 });
|
||||
const gifFrameDb = localForageLru.createInstance({ name: '5chanGifFrames', size: 500 });
|
||||
|
||||
const getCachedGifFrame = async (url: string): Promise<string | null> => {
|
||||
return await gifFrameDb.getItem(url);
|
||||
|
||||
@@ -2,11 +2,11 @@ import assert from 'assert';
|
||||
import { useParams } from 'react-router-dom';
|
||||
|
||||
// the timestamp the last time the user visited
|
||||
const lastVisitTimestamp = localStorage.getItem('plebchanLastVisitTimestamp');
|
||||
const lastVisitTimestamp = localStorage.getItem('5chanLastVisitTimestamp');
|
||||
|
||||
// update the last visited timestamp every n seconds
|
||||
setInterval(() => {
|
||||
localStorage.setItem('plebchanLastVisitTimestamp', Date.now().toString());
|
||||
localStorage.setItem('5chanLastVisitTimestamp', Date.now().toString());
|
||||
}, 60 * 1000);
|
||||
|
||||
const timeFilterNamesToSeconds: Record<string, number | undefined> = {
|
||||
|
||||
Reference in New Issue
Block a user