Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions src/lib/components/HarnessSelector/HarnessSelector.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import { tick } from 'svelte';
import { clickOutside } from '$lib/utils/clickOutside';
import { allHarnesses, vehicleHarnesses, genericHarnesses } from '$lib/utils/harnesses';
import { selectedCar } from '../../../store';
import { NO_HARNESS_OPTION } from '$lib/constants/vehicles.js';

import NoteCard from '$lib/components/NoteCard.svelte';
Expand Down Expand Up @@ -38,13 +37,6 @@
// Don't update w/ initial state
onChange(selection);
updateQueryParams(selection);

// remember with cookie
if (selection?.car) {
selectedCar.set(selection.car);
} else {
selectedCar.set('');
}
}

function updateQueryParams(selectedHarness) {
Expand Down
8 changes: 0 additions & 8 deletions src/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,6 @@ export const cartTotalQuantity = writable(browser ? window.localStorage.getItem(
export const cartItems = writable([]);
export const cartDiscount = writable({});
export const cartSubtotal = writable({});
export const selectedCar = writable(browser ? localStorage.getItem('selectedCar') || '' : '');

if (browser) {
selectedCar.subscribe((value) => {
if (value) localStorage.setItem('selectedCar', value);
else localStorage.removeItem('selectedCar');
});
}

if (browser) {
cartId.subscribe((value) => window.localStorage.cartId = value)
Expand Down