More performance updates
This commit is contained in:
@@ -76,7 +76,7 @@ export function Homepage() {
|
||||
});
|
||||
|
||||
const personal: PersonalData = personalData?.[0];
|
||||
const message: Message = messageData?.[0];
|
||||
const message: Message = messageData?.[0] || {};
|
||||
const [displayedGreeting, setDisplayedGreeting] = useState<string | undefined>('');
|
||||
const [current, setCurrent] = useState<CW>({
|
||||
icon: '',
|
||||
@@ -122,7 +122,7 @@ export function Homepage() {
|
||||
useEffect(() => {
|
||||
if (personal) {
|
||||
setDisplayedGreeting(() => {
|
||||
if (Math.floor(Math.random() * 100) > 10 || message === undefined) {
|
||||
if (Math.floor(Math.random() * 100) > 10 || message.message === undefined) {
|
||||
switch (Math.floor(new Date().getHours() / 6)) {
|
||||
case 0:
|
||||
return `Good night, ${personal?.firstName}!`;
|
||||
|
||||
Reference in New Issue
Block a user