Skip to content

Commit

Permalink
Merge pull request #21 from nunawa/15-remove-emotion
Browse files Browse the repository at this point in the history
15 remove emotion
  • Loading branch information
nunawa authored May 12, 2024
2 parents b616a7c + 49640e1 commit c567434
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 801 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Frontend source code for online pc builder [jisaku.nunawa.net](https://jisaku.nu
- [sql.js](https://sql.js.org/#/)
- [Jotai](https://jotai.org/)
- [SWR](https://swr.vercel.app/ja)
- [Emotion](https://emotion.sh/docs/introduction)

## Run Locally

Expand Down
20 changes: 3 additions & 17 deletions components/ProductList.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/** @jsxImportSource @emotion/react */
import { selectedProductsAtom } from "@/jotai/atom";
import { css } from "@emotion/react";
import styles from "@/styles/ProductCardLink.module.scss";
import { useAtom } from "jotai";
import Link from "next/link";
import { Button, Card, Container, Spinner, Stack } from "react-bootstrap";
Expand All @@ -17,23 +16,10 @@ export default function ProductList({ id, products }) {
<Card key={iterator.id} className="mb-2">
<Card.Header as="h5">
<Stack direction="horizontal">
<div
className="me-auto"
css={css({
overflow: "hidden",
whiteSpace: "nowrap",
maxWidth: "700px",
textOverflow: "ellipsis",
})}
>
<div className={"me-auto " + styles["div"]}>
<Link
href={"https://kakaku.com/item/" + iterator.id}
css={css({
textDecoration: "none",
"&:hover": {
textDecoration: "underline",
},
})}
className={styles["link"]}
>
{iterator.manufacturer} {iterator.name}
</Link>
Expand Down
27 changes: 4 additions & 23 deletions components/SelectedProduct.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/** @jsxImportSource @emotion/react */
import { selectedProductsAtom } from "@/jotai/atom";
import { css } from "@emotion/react";
import styles from "@/styles/ProductCardLink.module.scss";
import { useAtomValue } from "jotai";
import Link from "next/link";
import { Card, Stack } from "react-bootstrap";
Expand All @@ -15,33 +14,15 @@ export default function SelectedProduct({ id }) {
<Card className="mb-3">
<Card.Header as="h5">
<Stack direction="horizontal">
<div
className="me-auto"
css={css({
overflow: "hidden",
whiteSpace: "nowrap",
maxWidth: "700px",
textOverflow: "ellipsis",
})}
>
<div className={"me-auto " + styles["div"]}>
<Link
href={"https://kakaku.com/item/" + product.id}
css={css({
textDecoration: "none",
"&:hover": {
textDecoration: "underline",
},
})}
className={styles["link"]}
>
{product.manufacturer} {product.name}
</Link>
</div>
<div
className="text-muted ms-2"
css={css({ fontWeight: "normal", wordBreak: "keep-all" })}
>
選択中
</div>
<div className={"text-muted ms-2 " + styles["status"]}>選択中</div>
</Stack>
</Card.Header>
<Card.Body>
Expand Down
Loading

0 comments on commit c567434

Please sign in to comment.