mirror of
https://github.com/aykhans/slash-e.git
synced 2025-07-06 13:12:36 +00:00
19 lines
571 B
TypeScript
19 lines
571 B
TypeScript
import type { Shortcut } from "@/types/proto/api/v2/shortcut_service";
|
|
import { useStorage } from "@plasmohq/storage/hook";
|
|
import classNames from "classnames";
|
|
import ShortcutView from "./ShortcutView";
|
|
|
|
const ShortcutsContainer = () => {
|
|
const [shortcuts] = useStorage<Shortcut[]>("shortcuts", (v) => (v ? v : []));
|
|
|
|
return (
|
|
<div className={classNames("w-full grid grid-cols-2 gap-2")}>
|
|
{shortcuts.map((shortcut) => {
|
|
return <ShortcutView key={shortcut.id} shortcut={shortcut} />;
|
|
})}
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default ShortcutsContainer;
|