Skip to content

Commit

Permalink
chore: remove shared composable
Browse files Browse the repository at this point in the history
  • Loading branch information
muratmerdoglu-dp committed Jan 15, 2024
1 parent 4d46762 commit 83a10e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { computed, onMounted, ref } from "vue";
import { createTestableSharedComposable } from "@/utils/create-shared-composable";

import {
FilterOption,
Expand All @@ -17,7 +16,7 @@ import { useI18n } from "vue-i18n";
import { useFilterLocalStorage } from "./localStorage.composable";
import { printDate } from "@/plugins/datetime";

const dataTableFilter = (userType: string) => {
export const useDataTableFilter = (userType: string) => {
const { t } = useI18n();
const { setFilterState, getFilterStorage, initializeUserType } =
useFilterLocalStorage();
Expand Down Expand Up @@ -207,6 +206,3 @@ const dataTableFilter = (userType: string) => {
updateFilter,
};
};

export const useDataTableFilter =
createTestableSharedComposable(dataTableFilter);
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { useStorage } from "@vueuse/core";
import { UiState, User } from "../types";
import { ref } from "vue";
import { createTestableSharedComposable } from "@/utils/create-shared-composable";

const filterLocalStorage = () => {
export const useFilterLocalStorage = () => {
const userType = ref<string>();

const initializeUserType = (user: string) => {
Expand Down Expand Up @@ -55,6 +54,3 @@ const filterLocalStorage = () => {

return { getFilterStorage, setFilterState, initializeUserType, state };
};

export const useFilterLocalStorage =
createTestableSharedComposable(filterLocalStorage);

0 comments on commit 83a10e6

Please sign in to comment.