mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-06 01:22:44 +00:00
removing isclient check to see what's what
This commit is contained in:
@@ -41,12 +41,6 @@ const Homebrew = (props)=>{
|
|||||||
brews
|
brews
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
const [isClient, setIsClient] = useState(false);
|
|
||||||
|
|
||||||
useEffect(()=>{
|
|
||||||
setIsClient(true);
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
global.account = account;
|
global.account = account;
|
||||||
global.version = version;
|
global.version = version;
|
||||||
global.enable_v3 = enable_v3;
|
global.enable_v3 = enable_v3;
|
||||||
@@ -54,7 +48,6 @@ const Homebrew = (props)=>{
|
|||||||
global.config = config;
|
global.config = config;
|
||||||
|
|
||||||
const backgroundObject = ()=>{
|
const backgroundObject = ()=>{
|
||||||
if(!isClient) return null;
|
|
||||||
if(config.deployment || config.local){
|
if(config.deployment || config.local){
|
||||||
const bgText = config.deployment || 'Local';
|
const bgText = config.deployment || 'Local';
|
||||||
return {
|
return {
|
||||||
@@ -66,7 +59,7 @@ const Homebrew = (props)=>{
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Router location={url}>
|
<Router location={url}>
|
||||||
<div className={`homebrew${isClient && (config.deployment || config.local) ? ' deployment' : ''}`} style={backgroundObject()}>
|
<div className={`homebrew${(config.deployment || config.local) ? ' deployment' : ''}`} style={backgroundObject()}>
|
||||||
<Routes>
|
<Routes>
|
||||||
<Route path='/edit/:id' element={<WithRoute el={EditPage} brew={brew} userThemes={userThemes}/>} />
|
<Route path='/edit/:id' element={<WithRoute el={EditPage} brew={brew} userThemes={userThemes}/>} />
|
||||||
<Route path='/share/:id' element={<WithRoute el={SharePage} brew={brew} />} />
|
<Route path='/share/:id' element={<WithRoute el={SharePage} brew={brew} />} />
|
||||||
|
|||||||
Reference in New Issue
Block a user