fix(web): replace incorrect custom types with codegen from gql & update values to match expected shapes

This commit is contained in:
Pujit Mehrotra
2024-10-17 10:53:22 -04:00
parent 8fe1e80bbd
commit 64db2f19a7
3 changed files with 5 additions and 3 deletions

View File

@@ -136,6 +136,7 @@ export const serverState: Server = {
apiKey: "unupc_fab6ff6ffe51040595c6d9ffb63a353ba16cc2ad7d93f813a2e80a5810",
avatar: "https://source.unsplash.com/300x300/?portrait",
config: {
id: 'config-id',
error: null,
valid: false,
},

View File

@@ -1,17 +1,17 @@
import { defineStore, createPinia, setActivePinia } from 'pinia';
import type { NotificationItemProps } from "~/types/ui/notification";
import type { NotificationFragmentFragment } from '~/composables/gql/graphql';
setActivePinia(createPinia());
export const useNotificationsStore = defineStore('notifications', () => {
const notifications = ref<NotificationItemProps[]>([]);
const notifications = ref<NotificationFragmentFragment[]>([]);
const isOpen = ref<boolean>(false);
const title = computed<string>(() => isOpen.value ? 'Notifications Are Open' : 'Notifications Are Closed');
const toggle = () => isOpen.value = !isOpen.value;
const setNotifications = (newNotifications: NotificationItemProps[]) => {
const setNotifications = (newNotifications: NotificationFragmentFragment[]) => {
notifications.value = newNotifications;
};

View File

@@ -714,6 +714,7 @@ export const useServerStore = defineStore('server', () => {
// ref: 'configError',
// type: 'server',
// };
//@ts-expect-error - causing a build-breaking type error, but seems plausible, so i kept it around - pujitm
case 'INELIGIBLE':
return {
heading: 'Ineligible for OS Version',