Mobile view and misc.
This commit is contained in:
@@ -21,15 +21,18 @@ export default function Homepage({ theme }: any) {
|
||||
key: 'bookmarkFilter',
|
||||
defaultValue: ['All'],
|
||||
});
|
||||
const isMobile = window.matchMedia('(max-width: 600px)').matches;
|
||||
function date() {
|
||||
const currentDate = new Date();
|
||||
const dateOptions: Intl.DateTimeFormatOptions = {
|
||||
weekday: 'long',
|
||||
year: 'numeric',
|
||||
month: 'long',
|
||||
day: 'numeric',
|
||||
};
|
||||
const date = currentDate.toLocaleDateString('en-GB', dateOptions);
|
||||
const dateOptions: Intl.DateTimeFormatOptions = !isMobile
|
||||
? {
|
||||
weekday: 'long',
|
||||
year: 'numeric',
|
||||
month: 'long',
|
||||
day: 'numeric',
|
||||
}
|
||||
: {};
|
||||
const date = currentDate.toLocaleDateString('en-US', dateOptions);
|
||||
return date;
|
||||
}
|
||||
function greet(list: any) {
|
||||
@@ -60,9 +63,9 @@ export default function Homepage({ theme }: any) {
|
||||
return (
|
||||
<Stack gap={0} className={stackClasses.containerStack} justify='center'>
|
||||
<Search />
|
||||
<Header date={date()} greet={displayedGreeting} />
|
||||
<Applications contentType={appFilter} />
|
||||
<Bookmarks contentType={bookmarkFilter} />
|
||||
<Header date={date()} greet={displayedGreeting} isMobile={isMobile} />
|
||||
<Applications contentType={appFilter} isMobile={isMobile} />
|
||||
<Bookmarks contentType={bookmarkFilter} isMobile={isMobile} />
|
||||
<SettingsButton
|
||||
theme={theme}
|
||||
setAppFilter={setAppFilter}
|
||||
|
||||
Reference in New Issue
Block a user