chore(codestyle): cleanup and reformat
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
import { MomentInput } from "moment";
|
||||
|
||||
import { ConfigData, radarName, radarNameShort } from "../../config";
|
||||
import { useMessages } from "../../context/MessagesContext";
|
||||
import { formatRelease } from "../../date";
|
||||
import { featuredOnly, Item, HomepageOption } from "../../model";
|
||||
import { HomepageOption, Item, featuredOnly } from "../../model";
|
||||
import Fadeable from "../Fadeable/Fadeable";
|
||||
import HeroHeadline from "../HeroHeadline/HeroHeadline";
|
||||
import QuadrantGrid from "../QuadrantGrid/QuadrantGrid";
|
||||
import RadarGrid from '../RadarGrid/RadarGrid';
|
||||
import Fadeable from "../Fadeable/Fadeable";
|
||||
import RadarGrid from "../RadarGrid/RadarGrid";
|
||||
import SetTitle from "../SetTitle";
|
||||
import { ConfigData, radarName, radarNameShort } from "../../config";
|
||||
import { MomentInput } from "moment";
|
||||
import { useMessages } from "../../context/MessagesContext";
|
||||
|
||||
type PageIndexProps = {
|
||||
leaving: boolean;
|
||||
@@ -25,12 +26,16 @@ export default function PageIndex({
|
||||
releases,
|
||||
}: PageIndexProps) {
|
||||
const { pageIndex } = useMessages();
|
||||
const publishedLabel = pageIndex?.publishedLabel || 'Published';
|
||||
const publishedLabel = pageIndex?.publishedLabel || "Published";
|
||||
|
||||
const newestRelease = releases.slice(-1)[0];
|
||||
const numberOfReleases = releases.length;
|
||||
const showChart = config.homepageContent === HomepageOption.chart || config.homepageContent === HomepageOption.both;
|
||||
const showColumns = config.homepageContent === HomepageOption.columns || config.homepageContent === HomepageOption.both;
|
||||
const showChart =
|
||||
config.homepageContent === HomepageOption.chart ||
|
||||
config.homepageContent === HomepageOption.both;
|
||||
const showColumns =
|
||||
config.homepageContent === HomepageOption.columns ||
|
||||
config.homepageContent === HomepageOption.both;
|
||||
return (
|
||||
<Fadeable leaving={leaving} onLeave={onLeave}>
|
||||
<SetTitle title={radarNameShort} />
|
||||
@@ -39,9 +44,7 @@ export default function PageIndex({
|
||||
{radarName}
|
||||
</HeroHeadline>
|
||||
</div>
|
||||
{showChart && (
|
||||
<RadarGrid items={featuredOnly(items)} config={config} />
|
||||
)}
|
||||
{showChart && <RadarGrid items={featuredOnly(items)} config={config} />}
|
||||
{showColumns && (
|
||||
<QuadrantGrid items={featuredOnly(items)} config={config} />
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user