fix EducationPerfect shortcut

This commit is contained in:
SethBurkart123
2023-09-25 11:00:04 +10:00
parent 661ba7709e
commit 3e805f91fb
2 changed files with 54 additions and 9 deletions
+16 -2
View File
@@ -118,7 +118,7 @@ export default function Shortcuts() {
{/* Shortcuts Section */}
{settingsState.shortcuts ? (
settingsState.shortcuts.map((shortcut) => (
settingsState.shortcuts.map((shortcut) => shortcut.name && (
<div className="flex items-center justify-between px-4 py-3" key={shortcut.name}>
{shortcut.name}
<Switch state={shortcut.enabled} onChange={(isOn) => switchChange(shortcut.name, isOn)} />
@@ -133,7 +133,21 @@ export default function Shortcuts() {
settingsState.customshortcuts.map((shortcut, index) => (
<div className="flex items-center justify-between px-4 py-3" key={shortcut.name}>
{shortcut.name}
<button onClick={() => deleteCustomShortcut(index)}>Delete</button>
<button onClick={() => deleteCustomShortcut(index)}>
<svg
xmlns="http://www.w3.org/2000/svg"
className="w-4 h-4 text-red-500"
viewBox="0 0 20 20"
fill="currentColor"
>
<path
fillRule="evenodd"
// eslint-disable-next-line max-len
d="M15.707 4.293a1 1 0 010 1.414L11.414 10l4.293 4.293a1 1 0 11-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 11-1.414-1.414L8.586 10 4.293 5.707a1 1 0 111.414-1.414L10 8.586l4.293-4.293a1 1 0 011.414 0z"
clipRule="evenodd"
/>
</svg>
</button>
</div>
))
) : (