mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 20:19:49 +02:00
feat: colors
This commit is contained in:
1 parent
2fd2e93f55
commit
c35916c291
2 files changed
+6
-4
No files matched your search
@@ -10,13 +10,14 @@ interface DayProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function Day({ offset }: DayProps) {
|
export function Day({ offset }: DayProps) {
|
||||||
|
const timeTo = new Date(Date.now() - offset * 24 * 60 * 60 * 1000);
|
||||||
|
const timeFrom = new Date(Date.now() - (offset + 1) * 24 * 60 * 60 * 1000);
|
||||||
const awaitedTankDefinitions = use(tankDefinitions);
|
const awaitedTankDefinitions = use(tankDefinitions);
|
||||||
const tanksList = useMemo(
|
const tanksList = useMemo(
|
||||||
() => Object.values(awaitedTankDefinitions),
|
() => Object.values(awaitedTankDefinitions),
|
||||||
[awaitedTankDefinitions],
|
[awaitedTankDefinitions],
|
||||||
);
|
);
|
||||||
const [expanded, setExpanded] = useState(true);
|
const [expanded, setExpanded] = useState(offset === 0);
|
||||||
const time = new Date(Date.now() - offset * 24 * 60 * 60 * 1000);
|
|
||||||
const tanks = tanksList
|
const tanks = tanksList
|
||||||
.filter((tank) => tank.tier === 10)
|
.filter((tank) => tank.tier === 10)
|
||||||
.sort(() => Math.random() - 0.5)
|
.sort(() => Math.random() - 0.5)
|
||||||
@@ -41,7 +42,7 @@ export function Day({ offset }: DayProps) {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{expanded ? <CaretDownIcon /> : <CaretRightIcon />}
|
{expanded ? <CaretDownIcon /> : <CaretRightIcon />}
|
||||||
{time.toLocaleString('default', {
|
{timeTo.toLocaleString('default', {
|
||||||
month: 'short',
|
month: 'short',
|
||||||
day: 'numeric',
|
day: 'numeric',
|
||||||
})}
|
})}
|
||||||
@@ -70,6 +71,7 @@ export function Day({ offset }: DayProps) {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
|
draggable={false}
|
||||||
src={tankIcon(tank.id)}
|
src={tankIcon(tank.id)}
|
||||||
style={{
|
style={{
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import { Day } from './components/Day';
|
|||||||
|
|
||||||
export default function Page() {
|
export default function Page() {
|
||||||
return (
|
return (
|
||||||
<PageWrapper color="indigo">
|
<PageWrapper color="iris">
|
||||||
<Flex gap="2">
|
<Flex gap="2">
|
||||||
<Heading>TresAbhi</Heading>
|
<Heading>TresAbhi</Heading>
|
||||||
<Heading color="gray">[OPTML]</Heading>
|
<Heading color="gray">[OPTML]</Heading>
|
||||||
|
|||||||
Reference in new issue
Block a user