Skip to content

Commit

Permalink
fix: fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
katharinawuensche committed Jul 4, 2024
1 parent 7bf39c1 commit 708a27a
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 11 deletions.
8 changes: 3 additions & 5 deletions components/reference-button.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const props = withDefaults(
popupPosition?: Placement;
popupOffset?: number;
}>(),
{ popupPosition: "top", popupOffset: 12 },
{ popupPosition: "top", popupOffset: 12, references: () => [] },
);
// Popover positioning using floatingUI
const reference = ref(null);
Expand Down Expand Up @@ -62,13 +62,11 @@ function downloadBibTex() {
>
<PopoverPanel
ref="floating"
class="z-10 max-h-96 max-w-72 cursor-auto overflow-auto"
class="z-10 max-h-96 max-w-72 cursor-auto overflow-auto rounded-lg shadow-lg ring-1 ring-black/5"
:style="{ ...floatingStyles }"
@click.stop.prevent
>
<div
class="overflow-auto rounded-lg bg-neutral-50 p-4 text-sm shadow-lg ring-1 ring-black/5 dark:bg-neutral-800"
>
<div class="overflow-auto bg-neutral-50 p-4 text-sm dark:bg-neutral-800">
<div class="ml-auto flex w-fit">
<button :title="t('References.download-bibtex')" @click.stop.prevent="downloadBibTex()">
<ArrowDownToLine class="size-4 transition-transform hover:scale-125" />
Expand Down
2 changes: 1 addition & 1 deletion pages/detail/event/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const flattenedRelations = computed(() => {
</div>
</div>
<ReferenceButton
v-if="data.entity.data?.references?.length > 0"
v-if="Number(data.entity.data?.references?.length) > 0"
:references="data.entity.data?.references"
class="ml-auto inline-block size-7 w-fit"
popup-position="left"
Expand Down
2 changes: 1 addition & 1 deletion pages/detail/function/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const flattenedRelations = computed(() => {
</div>
</div>
<ReferenceButton
v-if="data.entity.data?.references?.length > 0"
v-if="Number(data.entity.data?.references?.length) > 0"
:references="data.entity.data?.references"
class="ml-auto inline-block size-7 w-fit"
popup-position="left"
Expand Down
2 changes: 1 addition & 1 deletion pages/detail/institution/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const flattenedRelations = computed(() => {
</div>
</div>
<ReferenceButton
v-if="data.entity.data?.references?.length > 0"
v-if="Number(data.entity.data?.references?.length) > 0"
:references="data.entity.data?.references"
class="ml-auto inline-block size-7 w-fit"
popup-position="left"
Expand Down
2 changes: 1 addition & 1 deletion pages/detail/person/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const flattenedRelations = computed(() => {
</div>
</div>
<ReferenceButton
v-if="data.entity.data?.references?.length > 0"
v-if="Number(data.entity.data?.references?.length) > 0"
:references="data.entity.data?.references"
class="ml-auto inline-block size-7 w-fit"
popup-position="left"
Expand Down
2 changes: 1 addition & 1 deletion pages/detail/place/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const flattenedRelations = computed(() => {
</div>
</div>
<ReferenceButton
v-if="data.entity.data?.references?.length > 0"
v-if="Number(data.entity.data?.references?.length) > 0"
:references="data.entity.data?.references"
class="ml-auto inline-block size-7 w-fit"
popup-position="left"
Expand Down
2 changes: 1 addition & 1 deletion pages/detail/salary/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const flattenedRelations = computed(() => {
{{ data.entity.data?.repetitionType }}
</div>
<ReferenceButton
v-if="data.entity.data?.references?.length > 0"
v-if="Number(data.entity.data?.references?.length) > 0"
:references="data.entity.data?.references"
class="ml-auto inline-block size-7 w-fit"
popup-position="left"
Expand Down

0 comments on commit 708a27a

Please sign in to comment.