Skip to content
Snippets Groups Projects
Commit d7b7ae89 authored by Håkon Eilertsen Røskaft's avatar Håkon Eilertsen Røskaft
Browse files

Merge branch 'home_picture_fix' into 'main'

Home picture fix

See merge request !152
parents 26cea543 d7de8b37
No related branches found
No related tags found
1 merge request!152Home picture fix
Pipeline #182289 canceled
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
<script> <script>
import axios from "axios"; import axios from "axios";
import { tokenHeader, parseCurrentUser } from "@/utils/token-utils"; import { tokenHeader, parseCurrentUser } from "@/utils/token-utils";
import { getItemPictures, } from "@/utils/apiutil"; import { getItemPictures } from "@/utils/apiutil";
export default { export default {
props: { props: {
...@@ -61,7 +61,7 @@ export default { ...@@ -61,7 +61,7 @@ export default {
data() { data() {
return { return {
image: null, image: null,
} };
}, },
computed: { computed: {
userID() { userID() {
...@@ -113,8 +113,8 @@ export default { ...@@ -113,8 +113,8 @@ export default {
if (images.length > 0) { if (images.length > 0) {
this.image = images[0].picture; this.image = images[0].picture;
} else { } else {
this.image = "https://images.unsplash.com/photo-1453728013993-6d66e9c9123a?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxzZWFyY2h8Mnx8dmlld3xlbnwwfHwwfHw%3D&w=1000&q=80"; this.image =
"https://images.unsplash.com/photo-1453728013993-6d66e9c9123a?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxzZWFyY2h8Mnx8dmlld3xlbnwwfHwwfHw%3D&w=1000&q=80";
} }
}, },
}, },
......
<template> <template>
<!-- A list conatining all the communities --> <!-- A list conatining all the communities -->
<p v-if="!communities.length" class="flex place-content-center text-gray-400 mt-8"> <p
v-if="!communities.length"
class="flex place-content-center text-gray-400 mt-8"
>
Ingen grupper Ingen grupper
</p> </p>
<ul v-else> <ul v-else>
......
...@@ -54,10 +54,7 @@ ...@@ -54,10 +54,7 @@
v-if="!community.picture" v-if="!community.picture"
class="h-10 w-10 flex flex-col justify-center items-center ml-2 mr-2" class="h-10 w-10 flex flex-col justify-center items-center ml-2 mr-2"
> >
<UserGroupIcon <UserGroupIcon alt="Bilde" class="h-10 w-10 text-primary-dark" />
alt="Bilde"
class="h-10 w-10 text-primary-dark"
/>
</div> </div>
<div <div
v-else v-else
...@@ -66,7 +63,7 @@ ...@@ -66,7 +63,7 @@
<img <img
:src="community.picture" :src="community.picture"
alt="Bilde" alt="Bilde"
class="rounded-md" class="rounded-md h-14 w-14 object-contain"
/> />
</div> </div>
<div class="flex-1 pl-1 overflow-hidden"> <div class="flex-1 pl-1 overflow-hidden">
......
...@@ -40,13 +40,13 @@ ...@@ -40,13 +40,13 @@
:key="item" :key="item"
> >
<div class="w-full"> <div class="w-full">
<ItemCard <ItemCard
id="ItemCardPage" id="ItemCardPage"
class="ItemCard w-full h-full" class="ItemCard w-full h-full"
:item="item" :item="item"
/> />
</div> </div>
<TripleDotButton class="DotButton" @click="openDotMenu(item)"/> <TripleDotButton class="DotButton" @click="openDotMenu(item)" />
<div <div
v-show="item.toggle" v-show="item.toggle"
...@@ -110,10 +110,13 @@ ...@@ -110,10 +110,13 @@
> >
<div class="cardContainer" v-for="item in searchedItems" :key="item"> <div class="cardContainer" v-for="item in searchedItems" :key="item">
<div class="w-full"> <div class="w-full">
<ItemCard id="ItemCardSearch" class="ItemCard w-full h-full" :item="item" /> <ItemCard
id="ItemCardSearch"
class="ItemCard w-full h-full"
:item="item"
/>
</div> </div>
<TripleDotButton class="DotButton" @click="openDotMenu(item)"/> <TripleDotButton class="DotButton" @click="openDotMenu(item)" />
<div <div
v-show="item.toggle" v-show="item.toggle"
......
...@@ -14,7 +14,7 @@ exports[`CommunityListItem component renders correctly 1`] = ` ...@@ -14,7 +14,7 @@ exports[`CommunityListItem component renders correctly 1`] = `
> >
<img <img
alt="Bilde" alt="Bilde"
class="rounded-md" class="rounded-md h-14 w-14 object-contain"
src="string" src="string"
/> />
</div> </div>
......
...@@ -24,7 +24,7 @@ exports[`CommunityList component renders correctly 1`] = ` ...@@ -24,7 +24,7 @@ exports[`CommunityList component renders correctly 1`] = `
> >
<img <img
alt="Bilde" alt="Bilde"
class="rounded-md" class="rounded-md h-14 w-14 object-contain"
src="string" src="string"
/> />
</div> </div>
...@@ -75,7 +75,7 @@ exports[`CommunityList component renders correctly 1`] = ` ...@@ -75,7 +75,7 @@ exports[`CommunityList component renders correctly 1`] = `
> >
<img <img
alt="Bilde" alt="Bilde"
class="rounded-md" class="rounded-md h-14 w-14 object-contain"
src="string" src="string"
/> />
</div> </div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment