diff --git a/config/config.ts_TEMPLATE b/config/config.ts_TEMPLATE index e83fcc9..6454bec 100644 --- a/config/config.ts_TEMPLATE +++ b/config/config.ts_TEMPLATE @@ -37,6 +37,8 @@ interface Config { frontend: { // How often to autrefresh, in seconds. Set to null to disable autoRefreshInterval: number | null; + // Twitter handle, this is for the Twitter link preview + twitterHandle: string, }; // Donation configuration, right now only supports lnd @@ -82,6 +84,7 @@ const config: Config = { frontend: { autoRefreshInterval: 120, + twitterHandle: "", }, // donation: { diff --git a/frontend/app.tsx b/frontend/app.tsx index 8e6fc32..0a3dab9 100644 --- a/frontend/app.tsx +++ b/frontend/app.tsx @@ -2,6 +2,10 @@ import React, { ComponentType, useEffect, useState } from "https://esm.sh/react@ import { StoreProvider } from "https://esm.sh/easy-peasy"; import store, { useStoreActions } from "./state/index.ts"; +import config from "./back/config/config.ts"; + +const forkName = config.fork.name; +const twitterHandle = config.frontend.twitterHandle; function StoreStarter({ Page, pageProps }: { Page: ComponentType; pageProps: any }) { const [gotBlocks, setGotBlocks] = useState(false); @@ -29,6 +33,25 @@ export default function App({ Page, pageProps }: { Page: ComponentType; pag + + {twitterHandle && ( + <> + + + + + + + + + + )}