Add fetched plugins to CellData, close img

This commit is contained in:
Tyler Hallada 2022-08-19 19:09:33 -04:00
parent cd61c29a96
commit 735670c163
5 changed files with 10 additions and 6 deletions

View File

@ -4,8 +4,9 @@ import useSWRImmutable from "swr/immutable";
import styles from "../styles/CellData.module.css";
import ModList from "./ModList";
import PluginList from "./ParsedPluginsList";
import ParsedPluginsList from "./ParsedPluginsList";
import { jsonFetcher } from "../lib/api";
import FetchedPluginsList from "./FetchedPluginsList";
export interface Mod {
id: number;
@ -110,7 +111,8 @@ const CellData: React.FC<Props> = ({ selectedCell, counts }) => {
<span>{data.plugins_count}</span>
</li>
</ul>
<PluginList selectedCell={selectedCell} />
<ParsedPluginsList selectedCell={selectedCell} />
<FetchedPluginsList selectedCell={selectedCell} />
<ModList mods={data.mods} counts={counts} />
</>
)

View File

@ -1,3 +1,4 @@
/* eslint-disable @next/next/no-img-element */
import Link from "next/link";
import React from "react";
@ -8,7 +9,7 @@ import {
toggleFetchedPlugin,
removeFetchedPlugin,
} from "../slices/plugins";
import styles from "../styles/FetchedPluginList.module.css";
import styles from "../styles/FetchedPluginsList.module.css";
type Props = {
selectedCell?: { x: number; y: number };
@ -67,7 +68,7 @@ const FetchedPluginsList: React.FC<Props> = ({ selectedCell }) => {
onClick={() => dispatch(removeFetchedPlugin(plugin.hash))}
className={styles["plugin-remove"]}
>
&#10006;
<img src="/img/close.svg" width={18} height={18} alt="close" />
</button>
</li>
))}

View File

@ -8,7 +8,7 @@ import {
disableAllParsedPlugins,
toggleParsedPlugin,
} from "../slices/plugins";
import styles from "../styles/ParsedPluginList.module.css";
import styles from "../styles/ParsedPluginsList.module.css";
type Props = {
selectedCell?: { x: number; y: number };

View File

@ -31,7 +31,8 @@
padding: 2px 8px;
background: none;
border: none;
font-size: 14px;
display: flex;
align-items: center;
}
.plugin-remove:hover {