Import Functions form JS (that uses Vuex store) file to Component

I’m making an app in with ionic using Vue. I want to make functions on a JS file (or Vue file if that ends up working better) I can import into other pages. I’m using ionic local storage and I want to use the Vuex getters in the functions that also access localstorage.
I’ve been banging my head against the wall for a while on this one and can’t get the imports to work. I’ve been noticing it says this warning as well. “[Vue warn]: inject() can only be used inside setup() or functional components.”
I’ve gotten some other warning like the imports are not a function but those have changed as I’ve tried different things out.

I want to export something like this (javascript database file, I’ve stripped stuff I’ve to do make it work since none of it failed and this makes the purpose clearer)

import { useStore } from "vuex";
import { Drivers, Storage } from '@ionic/storage';
import * as CordovaSQLiteDriver from 'localforage-cordovasqlitedriver';
const store = useStore();
const storage = new Storage({
    driverOrder: [CordovaSQLiteDriver._driver, Drivers.IndexedDB, Drivers.LocalStorage]

});
storage.create();

    //returns an object from the database after parsing it
     export async function getValue(key) {
        const jsonObject = await storage.get(key);
        return JSON.parse(jsonObject);
    }
     export async function getStudent(studentId) {
            const student = store.getters.student(studentId);
            if (store.getters.student(studentId)) {
                console.log("gotten from State: ", student);
                return student;
            }
            else {
                const studentJson = await storage.get(studentId);
                const studentParsed = JSON.parse(studentJson);
                store.dispatch("addStudent", studentParsed);
                console.log("gotten from sql and added to state: ", student);
                return student;
            }
        }

I want to use it in something like this. (component page)

import { computed, ref, } from "vue";

import {
  IonSelect,
  IonSelectOption,
  IonItem,
} from "@ionic/vue";

import { useStore } from "vuex";
import { useRoute } from "vue-router";
**import { getStudent } from "../store/database.js"; //import js file**
import studentOverview from "../components/student/studentOverview.vue";
export default {

  components: {
    studentOverview,
    IonSelect,
    IonSelectOption,
    IonItem,
  },

  // composition api code
  setup() {

    const store = useStore();
    const route = useRoute();
    var studentId = ref(route.params.id); //may need to make var instead of const and experiment with options API method

    const loadedStudent = computed(() =>
      .getStudent(studentId.value)
);

    //return values from setup we need
    return { loadedStudent, classTypeFilter };
  },

};

</script>