show next continent
This commit is contained in:
parent
9b439d0a19
commit
ca9be2d846
3 changed files with 42 additions and 0 deletions
|
@ -144,3 +144,21 @@ export const alertCont = style({
|
||||||
border: "2px solid #ff2d2d",
|
border: "2px solid #ff2d2d",
|
||||||
animation: `${alertFade} 1s ease-in-out 4 alternate`,
|
animation: `${alertFade} 1s ease-in-out 4 alternate`,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
export const nextCont = style({
|
||||||
|
display: "flex",
|
||||||
|
flexDirection: "row",
|
||||||
|
alignItems: "center",
|
||||||
|
padding: "0.5rem",
|
||||||
|
justifyContent: "center",
|
||||||
|
backgroundColor: "#222",
|
||||||
|
borderRadius: "0.4rem",
|
||||||
|
margin: "0.5rem",
|
||||||
|
color: "#aaa",
|
||||||
|
});
|
||||||
|
|
||||||
|
export const nextContText = style({
|
||||||
|
fontWeight: "bold",
|
||||||
|
textTransform: "uppercase",
|
||||||
|
marginRight: "0.5rem",
|
||||||
|
});
|
||||||
|
|
|
@ -22,6 +22,12 @@ export type IndexWorldProps = {
|
||||||
export const IndexWorld = ({ metagame, population }: IndexWorldProps) => {
|
export const IndexWorld = ({ metagame, population }: IndexWorldProps) => {
|
||||||
const worldId = metagame.id;
|
const worldId = metagame.id;
|
||||||
const { platform, location, name } = worlds[String(worldId || "default")];
|
const { platform, location, name } = worlds[String(worldId || "default")];
|
||||||
|
const nextZone = metagame.zones.sort(
|
||||||
|
(a, b) =>
|
||||||
|
new Date(a.locked_since ?? Date.now()).getTime() -
|
||||||
|
new Date(b.locked_since ?? Date.now()).getTime()
|
||||||
|
)[0];
|
||||||
|
const nextZoneStrings = zones[nextZone.id];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.container}>
|
<div className={styles.container}>
|
||||||
|
@ -121,6 +127,23 @@ export const IndexWorld = ({ metagame, population }: IndexWorldProps) => {
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
{worldId !== 19 && (
|
||||||
|
<div className={styles.nextCont}>
|
||||||
|
<div className={styles.nextContText}>Next continent »</div>{" "}
|
||||||
|
<div className={styles.contName}>
|
||||||
|
<div
|
||||||
|
className={styles.contCircle}
|
||||||
|
style={
|
||||||
|
{
|
||||||
|
"--upper-color": nextZoneStrings.colors[0],
|
||||||
|
"--lower-color": nextZoneStrings.colors[1],
|
||||||
|
} as any
|
||||||
|
}
|
||||||
|
></div>
|
||||||
|
<div>{nextZoneStrings.name}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
@ -21,6 +21,7 @@ export type MetagameWorld = {
|
||||||
tr: number;
|
tr: number;
|
||||||
vs: number;
|
vs: number;
|
||||||
};
|
};
|
||||||
|
locked_since?: string;
|
||||||
}[];
|
}[];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue