Skip to content

Commit

Permalink
chore: Fix type checks
Browse files Browse the repository at this point in the history
  • Loading branch information
aklinker1 committed Apr 8, 2024
1 parent c59a893 commit 8209a42
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
3 changes: 2 additions & 1 deletion web/composables/useBoardLayoutsQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ export default function () {

const partsQuery = useQuery({
queryKey: ['onshape', 'board-layouts', url],
queryFn: () => loader.getParts(url.value),
queryFn: () => loader.getParts(url.value!),
enabled: computed(() => url.value != null),
});

const layouts = computed(() => {
Expand Down
6 changes: 3 additions & 3 deletions web/composables/useEditProject.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
export default function () {
const { openDialog } = useDialogState();
const openProjectIds = useOpenProjectIds();
const allProjects = useProjects();
const router = useRouter();

const openExistingProject = (project: Project) =>
new Promise<Project>((res, rej) => {
Expand All @@ -14,7 +12,9 @@ export default function () {
});
});

return async (project: Project) => {
return async (project: Project | undefined) => {
if (project == null) return;

const newProject = await openExistingProject(project);
allProjects.value = allProjects.value.map((p) =>
p.id === newProject.id ? newProject : p,
Expand Down
15 changes: 15 additions & 0 deletions web/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,21 @@ const deleteProject = useDeleteProject();
No projects,
<ULink variant="link" @click="createNewProject">add one</ULink>
</li>
<li class="text-center pt-16 opacity-50">
<ULink
class="underline"
to="https://github.com/aklinker1/cutlist"
target="blank"
>GitHub</ULink
>
&ensp;&bull;&ensp;
<ULink
class="underline"
to="https://github.com/aklinker1/cutlist/wiki"
target="blank"
>User Manual</ULink
>
</li>
</ul>
</ClientOnly>
</div>
Expand Down

0 comments on commit 8209a42

Please sign in to comment.