/* eslint-disable camelcase */ import 'core-js/es/string/to-well-formed.js'; //Polyfill for older browsers import './homebrew.less'; import React from 'react'; import { StaticRouter as Router, Route, Routes, useParams, useSearchParams } from 'react-router'; import { updateLocalStorage } from './utils/updateLocalStorage/updateLocalStorageKeys.js'; import HomePage from './pages/homePage/homePage.jsx'; import EditPage from './pages/editPage/editPage.jsx'; import UserPage from './pages/userPage/userPage.jsx'; import SharePage from './pages/sharePage/sharePage.jsx'; import NewPage from './pages/newPage/newPage.jsx'; import ErrorPage from './pages/errorPage/errorPage.jsx'; import VaultPage from './pages/vaultPage/vaultPage.jsx'; import AccountPage from './pages/accountPage/accountPage.jsx'; const WithRoute = ({ el: Element, ...rest })=>{ const params = useParams(); const [searchParams] = useSearchParams(); const queryParams = Object.fromEntries(searchParams?.entries() || []); return ; }; const Homebrew = (props)=>{ const { url = '', version = '0.0.0', account = null, config, brew = { title : '', text : '', shareId : null, editId : null, createdAt : null, updatedAt : null, lang : '' }, userThemes, brews } = props; global.account = account; global.version = version; global.config = config; const backgroundObject = ()=>{ if(global.config.deployment || (config.local && config.development)){ const bgText = global.config.deployment || 'Local'; return { backgroundImage : `url("data:image/svg+xml;utf8,${bgText}")` }; } return null; }; updateLocalStorage(); return (
} /> } /> } /> } /> } /> }/> } /> } /> } /> } /> } /> } /> } /> } />
); }; module.exports = Homebrew;