forked from Kieran/zap.stream
Define XXX
This commit is contained in:
parent
e607df56df
commit
b9f0d349ef
3
src/d.ts
3
src/d.ts
@ -1,5 +1,8 @@
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
/// <reference types="@webbtc/webln-types" />
|
||||
|
||||
declare const __XXX: boolean;
|
||||
|
||||
declare module "*.jpg" {
|
||||
const value: unknown;
|
||||
export default value;
|
||||
|
@ -37,7 +37,15 @@ export function useStreamsFeed(tag?: string) {
|
||||
const feed = useRequestBuilder<NoteCollection>(System, NoteCollection, rb);
|
||||
const feedSorted = useMemo(() => {
|
||||
if (feed.data) {
|
||||
return [...feed.data];
|
||||
if (__XXX) {
|
||||
return [...feed.data].filter(
|
||||
(a) => findTag(a, "content-warning") !== undefined
|
||||
);
|
||||
} else {
|
||||
return [...feed.data].filter(
|
||||
(a) => findTag(a, "content-warning") === undefined
|
||||
);
|
||||
}
|
||||
}
|
||||
return [];
|
||||
}, [feed.data]);
|
||||
|
@ -65,6 +65,9 @@ const config = {
|
||||
new webpack.IgnorePlugin({
|
||||
resourceRegExp: /^\.\/locale$/,
|
||||
contextRegExp: /moment$/,
|
||||
}),
|
||||
new webpack.DefinePlugin({
|
||||
__XXX: process.env["__XXX"] || JSON.stringify(false)
|
||||
})
|
||||
],
|
||||
module: {
|
||||
|
Loading…
Reference in New Issue
Block a user