mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-08-24 12:06:54 -05:00
weapon selector: weapons in categories
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Select, Tag, TagCloseButton, TagLabel } from "@chakra-ui/core";
|
||||
import { weaponsWithHero } from "lib/lists/weaponsWithHero";
|
||||
import { weaponsWithHeroCategorized } from "lib/lists/weaponsWithHero";
|
||||
import WeaponImage from "./WeaponImage";
|
||||
|
||||
interface Props {
|
||||
@@ -15,10 +15,14 @@ const WeaponSelector: React.FC<Props> = ({ name, value, onChange }) => {
|
||||
name={name}
|
||||
onChange={(e) => onChange(value.concat(e.target.value))}
|
||||
>
|
||||
{weaponsWithHero.map((wpn) => (
|
||||
<option key={wpn} value={wpn}>
|
||||
{wpn}
|
||||
</option>
|
||||
{weaponsWithHeroCategorized.map((wpnCategory) => (
|
||||
<optgroup key={wpnCategory.name} label={wpnCategory.name}>
|
||||
{wpnCategory.weapons.map((wpn) => (
|
||||
<option key={wpn} value={wpn}>
|
||||
{wpn}
|
||||
</option>
|
||||
))}
|
||||
</optgroup>
|
||||
))}
|
||||
</Select>
|
||||
{value.map((wpn) => (
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/// <reference types="cypress" />
|
||||
|
||||
describe.only("Map Planner", () => {
|
||||
describe("Map Planner", () => {
|
||||
beforeEach(() => {
|
||||
cy.visit("/plans");
|
||||
});
|
||||
|
||||
@@ -139,3 +139,193 @@ export const weaponsWithHero = [
|
||||
"Undercover Sorella Brella",
|
||||
"Kensa Undercover Brella",
|
||||
] as const;
|
||||
|
||||
export const weaponsWithHeroCategorized: readonly {
|
||||
name: string;
|
||||
weapons: readonly string[];
|
||||
}[] = [
|
||||
{
|
||||
name: "Shooters",
|
||||
weapons: [
|
||||
"Sploosh-o-matic",
|
||||
"Neo Sploosh-o-matic",
|
||||
"Sploosh-o-matic 7",
|
||||
"Splattershot Jr.",
|
||||
"Custom Splattershot Jr.",
|
||||
"Kensa Splattershot Jr.",
|
||||
"Splash-o-matic",
|
||||
"Neo Splash-o-matic",
|
||||
"Aerospray MG",
|
||||
"Aerospray RG",
|
||||
"Aerospray PG",
|
||||
"Splattershot",
|
||||
"Hero Shot Replica",
|
||||
"Tentatek Splattershot",
|
||||
"Octo Shot Replica",
|
||||
"Kensa Splattershot",
|
||||
".52 Gal",
|
||||
".52 Gal Deco",
|
||||
"Kensa .52 Gal",
|
||||
"N-ZAP '85",
|
||||
"N-ZAP '89",
|
||||
"N-ZAP '83",
|
||||
"Splattershot Pro",
|
||||
"Forge Splattershot Pro",
|
||||
"Kensa Splattershot Pro",
|
||||
".96 Gal",
|
||||
".96 Gal Deco",
|
||||
"Jet Squelcher",
|
||||
"Custom Jet Squelcher",
|
||||
"L-3 Nozzlenose",
|
||||
"L-3 Nozzlenose D",
|
||||
"Kensa L-3 Nozzlenose",
|
||||
"H-3 Nozzlenose",
|
||||
"H-3 Nozzlenose D",
|
||||
"Cherry H-3 Nozzlenose",
|
||||
"Squeezer",
|
||||
"Foil Squeezer",
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Blasters",
|
||||
weapons: [
|
||||
"Luna Blaster",
|
||||
"Luna Blaster Neo",
|
||||
"Kensa Luna Blaster",
|
||||
"Blaster",
|
||||
"Hero Blaster Replica",
|
||||
"Custom Blaster",
|
||||
"Range Blaster",
|
||||
"Custom Range Blaster",
|
||||
"Grim Range Blaster",
|
||||
"Rapid Blaster",
|
||||
"Rapid Blaster Deco",
|
||||
"Kensa Rapid Blaster",
|
||||
"Rapid Blaster Pro",
|
||||
"Rapid Blaster Pro Deco",
|
||||
"Clash Blaster",
|
||||
"Clash Blaster Neo",
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Rollers",
|
||||
weapons: [
|
||||
"Carbon Roller",
|
||||
"Carbon Roller Deco",
|
||||
"Splat Roller",
|
||||
"Hero Roller Replica",
|
||||
"Krak-On Splat Roller",
|
||||
"Kensa Splat Roller",
|
||||
"Dynamo Roller",
|
||||
"Gold Dynamo Roller",
|
||||
"Kensa Dynamo Roller",
|
||||
"Flingza Roller",
|
||||
"Foil Flingza Roller",
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Brushes",
|
||||
weapons: [
|
||||
"Inkbrush",
|
||||
"Inkbrush Nouveau",
|
||||
"Permanent Inkbrush",
|
||||
"Octobrush",
|
||||
"Herobrush Replica",
|
||||
"Octobrush Nouveau",
|
||||
"Kensa Octobrush",
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Chargers",
|
||||
weapons: [
|
||||
"Classic Squiffer",
|
||||
"New Squiffer",
|
||||
"Fresh Squiffer",
|
||||
"Splat Charger",
|
||||
"Hero Charger Replica",
|
||||
"Firefin Splat Charger",
|
||||
"Kensa Charger",
|
||||
"Splatterscope",
|
||||
"Firefin Splatterscope",
|
||||
"Kensa Splatterscope",
|
||||
"E-liter 4K",
|
||||
"Custom E-liter 4K",
|
||||
"E-liter 4K Scope",
|
||||
"Custom E-liter 4K Scope",
|
||||
"Bamboozler 14 Mk I",
|
||||
"Bamboozler 14 Mk II",
|
||||
"Bamboozler 14 Mk III",
|
||||
"Goo Tuber",
|
||||
"Custom Goo Tuber",
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Sloshers",
|
||||
weapons: [
|
||||
"Slosher",
|
||||
"Hero Slosher Replica",
|
||||
"Slosher Deco",
|
||||
"Soda Slosher",
|
||||
"Tri-Slosher",
|
||||
"Tri-Slosher Nouveau",
|
||||
"Sloshing Machine",
|
||||
"Sloshing Machine Neo",
|
||||
"Kensa Sloshing Machine",
|
||||
"Bloblobber",
|
||||
"Bloblobber Deco",
|
||||
"Explosher",
|
||||
"Custom Explosher",
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Splatlings",
|
||||
weapons: [
|
||||
"Mini Splatling",
|
||||
"Zink Mini Splatling",
|
||||
"Kensa Mini Splatling",
|
||||
"Heavy Splatling",
|
||||
"Hero Splatling Replica",
|
||||
"Heavy Splatling Deco",
|
||||
"Heavy Splatling Remix",
|
||||
"Hydra Splatling",
|
||||
"Custom Hydra Splatling",
|
||||
"Ballpoint Splatling",
|
||||
"Ballpoint Splatling Nouveau",
|
||||
"Nautilus 47",
|
||||
"Nautilus 79",
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Dualies",
|
||||
weapons: [
|
||||
"Dapple Dualies",
|
||||
"Dapple Dualies Nouveau",
|
||||
"Clear Dapple Dualies",
|
||||
"Splat Dualies",
|
||||
"Hero Dualie Replicas",
|
||||
"Enperry Splat Dualies",
|
||||
"Kensa Splat Dualies",
|
||||
"Glooga Dualies",
|
||||
"Glooga Dualies Deco",
|
||||
"Kensa Glooga Dualies",
|
||||
"Dualie Squelchers",
|
||||
"Custom Dualie Squelchers",
|
||||
"Dark Tetra Dualies",
|
||||
"Light Tetra Dualies",
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Brellas",
|
||||
weapons: [
|
||||
"Splat Brella",
|
||||
"Hero Brella Replica",
|
||||
"Sorella Brella",
|
||||
"Tenta Brella",
|
||||
"Tenta Sorella Brella",
|
||||
"Tenta Camo Brella",
|
||||
"Undercover Brella",
|
||||
"Undercover Sorella Brella",
|
||||
"Kensa Undercover Brella",
|
||||
],
|
||||
},
|
||||
] as const;
|
||||
|
||||
@@ -10,6 +10,7 @@ import Profile from "scenes/Profile";
|
||||
|
||||
const prisma = new PrismaClient();
|
||||
|
||||
// FIXME: should try to make it so that /u/Sendou and /u/234234298348 point to the same page
|
||||
export const getStaticPaths: GetStaticPaths = async () => {
|
||||
const users = await prisma.user.findMany({});
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user