removed user specific motd from index

This commit is contained in:
mrfry 2021-01-26 10:25:30 +01:00
parent dca3ebdbfb
commit 7d5b14456f

View file

@ -29,7 +29,7 @@ export default function Index(props) {
const [news, setNews] = useState(null) const [news, setNews] = useState(null)
const [allQrSelector, setAllQrSelector] = useState(null) const [allQrSelector, setAllQrSelector] = useState(null)
const motd = props.globalData.motd const motd = props.globalData.motd
const userSpecificMotd = props.globalData.userSpecificMotd // const userSpecificMotd = props.globalData.userSpecificMotd
useEffect(() => { useEffect(() => {
console.info('Fetching news.json') console.info('Fetching news.json')
@ -130,22 +130,22 @@ export default function Index(props) {
) )
} }
const renderUserSpecificMotd = () => { // const renderUserSpecificMotd = () => {
return ( // return (
<div> // <div>
<hr /> // <hr />
<div className={styles.subtitle}>Üzenet admintól:</div> // <div className={styles.subtitle}>Üzenet admintól:</div>
{userSpecificMotd ? ( // {userSpecificMotd ? (
<div // <div
className={styles.motd} // className={styles.motd}
dangerouslySetInnerHTML={{ __html: userSpecificMotd.msg }} // dangerouslySetInnerHTML={{ __html: userSpecificMotd.msg }}
/> // />
) : ( // ) : (
<div>...</div> // <div>...</div>
)} // )}
</div> // </div>
) // )
} // }
const renderDbSelector = () => { const renderDbSelector = () => {
if (allQrSelector) { if (allQrSelector) {
@ -213,7 +213,7 @@ export default function Index(props) {
</div> </div>
<hr /> <hr />
{renderMotd()} {renderMotd()}
{userSpecificMotd && renderUserSpecificMotd()} {/*{userSpecificMotd && renderUserSpecificMotd()} */}
<hr /> <hr />
<hr /> <hr />
<Sleep /> <Sleep />