Linted
This commit is contained in:
@@ -1,31 +1,31 @@
|
||||
import { Stack } from "@mantine/core";
|
||||
import stackClasses from "../../styles/Stack.module.css";
|
||||
import { useQueryAPI } from "../../hooks/useAPI";
|
||||
import Search from "./components/Search";
|
||||
import Header from "./components/Header";
|
||||
import Applications from "./components/Applications";
|
||||
import Bookmarks from "./components/Bookmarks";
|
||||
import SettingsButton from "./components/SettingsButton";
|
||||
import { useEffect, useState } from "react";
|
||||
import "../../index.css";
|
||||
import { useLocalStorage } from "@mantine/hooks";
|
||||
import { Stack } from '@mantine/core';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { useQueryAPI } from '../../hooks/useAPI';
|
||||
import stackClasses from '../../styles/Stack.module.css';
|
||||
import Applications from './components/Applications';
|
||||
import Bookmarks from './components/Bookmarks';
|
||||
import Header from './components/Header';
|
||||
import Search from './components/Search';
|
||||
import SettingsButton from './components/SettingsButton';
|
||||
import '../../index.css';
|
||||
import { useLocalStorage } from '@mantine/hooks';
|
||||
|
||||
export default function Homepage({ theme }: any) {
|
||||
const { data, isFetching } = useQueryAPI({ endpoint: "api/messages" });
|
||||
const [displayedGreeting, setDisplayedGreeting] = useState("");
|
||||
const { data, isFetching } = useQueryAPI({ endpoint: 'api/messages' });
|
||||
const [displayedGreeting, setDisplayedGreeting] = useState('');
|
||||
const [contentType, setContentType] = useLocalStorage<any>({
|
||||
key: "contenttype",
|
||||
defaultValue: "All",
|
||||
key: 'contenttype',
|
||||
defaultValue: 'All',
|
||||
});
|
||||
function date() {
|
||||
const currentDate = new Date();
|
||||
const dateOptions: Intl.DateTimeFormatOptions = {
|
||||
weekday: "long",
|
||||
year: "numeric",
|
||||
month: "long",
|
||||
day: "numeric",
|
||||
weekday: 'long',
|
||||
year: 'numeric',
|
||||
month: 'long',
|
||||
day: 'numeric',
|
||||
};
|
||||
const date = currentDate.toLocaleDateString("en-GB", dateOptions);
|
||||
const date = currentDate.toLocaleDateString('en-GB', dateOptions);
|
||||
return date;
|
||||
}
|
||||
function greet(list: any) {
|
||||
@@ -35,7 +35,7 @@ export default function Homepage({ theme }: any) {
|
||||
let timeBased: any = [];
|
||||
let easterEggs: any = [];
|
||||
for (const l of list) {
|
||||
if (l.easteregg === "N") {
|
||||
if (l.easteregg === 'N') {
|
||||
timeBased = timeBased.concat(l);
|
||||
} else {
|
||||
easterEggs = easterEggs.concat(l);
|
||||
@@ -54,7 +54,7 @@ export default function Homepage({ theme }: any) {
|
||||
}, [isFetching]);
|
||||
|
||||
return (
|
||||
<Stack gap={0} className={stackClasses.containerStack} justify="center">
|
||||
<Stack gap={0} className={stackClasses.containerStack} justify='center'>
|
||||
<Search />
|
||||
<Header date={date()} greet={displayedGreeting} />
|
||||
<Applications contentType={contentType} />
|
||||
|
||||
Reference in New Issue
Block a user