fix: Thomas review

This commit is contained in:
Arman
2023-04-11 19:18:48 +02:00
parent 55a3216bca
commit de460751cf
3 changed files with 5 additions and 17 deletions
+1 -12
View File
@@ -1,5 +1,4 @@
<script lang="ts">
import { createEventDispatcher } from 'svelte';
import { Drop } from '.';
import type { Placement } from './drop.svelte';
@@ -13,19 +12,9 @@
export let width: string = null;
export let fullWidth = false;
export let position: 'relative' | 'static' = 'relative';
const dispatch = createEventDispatcher();
</script>
<Drop
bind:show
{placement}
{childStart}
{noArrow}
{noStyle}
{fullWidth}
{fixed}
on:blur={() => dispatch('blur')}>
<Drop bind:show {placement} {childStart} {noArrow} {noStyle} {fullWidth} {fixed} on:blur>
<slot />
<svelte:fragment slot="list">
<div
+1 -1
View File
@@ -25,7 +25,7 @@ export const dismissNotification = (id: number) => {
};
export const dismissAllNotifications = () => {
notifications.update(() => []);
notifications.set([]);
};
export const addNotification = (notification: Omit<Notification, 'id'>) => {
@@ -47,9 +47,7 @@
if (counter) {
const parsedCounter = parseInt(counter);
if (parsedCounter > 2) {
return;
} else if (parsedCounter === 2) {
if (parsedCounter === 2) {
addNotification({
type: 'info',
icon: 'question-mark-circle',
@@ -65,7 +63,8 @@
}
]
});
} else {
}
if (parsedCounter < 2) {
localStorage.setItem(
'createRelationshipCounter',
(parseInt(counter) + 1).toString()