mirror of
https://github.com/web3privacy/explorer-app.git
synced 2024-10-15 16:46:26 +02:00
Merge pull request #48 from web3privacy/dw/bug-fixes
Fixed fundings and removed ratings from dto
This commit is contained in:
commit
92749aaa06
2 changed files with 3 additions and 2 deletions
|
@ -11,7 +11,7 @@ type Fundings = {
|
||||||
}
|
}
|
||||||
|
|
||||||
function useFundings(project?: Partial<Project>) {
|
function useFundings(project?: Partial<Project>) {
|
||||||
const fundings = ref<Fundings[]>(project?.funding as Fundings[] || [])
|
const fundings = ref<Fundings[]>(Array.isArray(project?.funding) ? project?.funding as unknown as Fundings[] : [project?.funding as unknown as Fundings])
|
||||||
const newFunding = reactive<Fundings>({
|
const newFunding = reactive<Fundings>({
|
||||||
name: '',
|
name: '',
|
||||||
link: '',
|
link: '',
|
||||||
|
@ -59,7 +59,7 @@ defineExpose({
|
||||||
<ProjectCreateComponentsItem
|
<ProjectCreateComponentsItem
|
||||||
v-for="funding in fundings"
|
v-for="funding in fundings"
|
||||||
:key="funding.name"
|
:key="funding.name"
|
||||||
@remove="() => removeFunding(fundings.indexOf(funding))"
|
@remove="() => removeFunding(fundings?.indexOf(funding))"
|
||||||
>
|
>
|
||||||
<template #label>
|
<template #label>
|
||||||
<div
|
<div
|
||||||
|
|
|
@ -10,6 +10,7 @@ export const useProject = defineStore('project', () => {
|
||||||
|
|
||||||
function setProject(id: string) {
|
function setProject(id: string) {
|
||||||
project.value = getProjectById(id, { shallow: false }) as Project
|
project.value = getProjectById(id, { shallow: false }) as Project
|
||||||
|
delete project.value.ratings
|
||||||
}
|
}
|
||||||
|
|
||||||
function clearProject() {
|
function clearProject() {
|
||||||
|
|
Loading…
Reference in a new issue