Skip to content

Commit

Permalink
fix: dashboard/index 의 chart가 안보이는 현상 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
lavi27 committed Jan 19, 2024
1 parent ec6af48 commit f68cf8e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 3 additions & 5 deletions components/dashboard/InviteURLUsageChart.vue
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
<template>
<canvas ref="myChart"></canvas>
<canvas ref="chartEl"></canvas>
</template>

<script setup lang="ts">
import Chart from 'chart.js/auto'
import moment from 'moment'
const emit = defineEmits(['initInviteURLUsageChart'])
const props = defineProps<{ data: number[] }>()
const initChartEvent = useEventBus('initInviteURLUsageChart')
const chartEl = ref<HTMLCanvasElement>()
initChartEvent.on(() => {
onMounted(() => {
if (!chartEl.value) return
const ctx = chartEl.value.getContext('2d')
if (!ctx) return
const labels: string[] = []
Expand Down
4 changes: 1 addition & 3 deletions pages/dashboard/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ definePageMeta({
middleware: ['auth', 'guild-id'],
})
const initChartEvent = useEventBus('initInviteURLUsageChart')
const route = useRoute()
const API = useAPI()
const { alertsData, loadPush, checkPush, onPushCheck } = useSocketAlert()
Expand Down Expand Up @@ -207,9 +206,8 @@ onMounted(async () => {
checkPush(Number(route.query.id))
}, 5000)
await wait(100)
await wait(200)
initChartEvent.emit()
resizeAlerts()
loadingSuccess()
} catch (e) {}
Expand Down
8 changes: 6 additions & 2 deletions pages/dashboard/members.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@
class="flex items-center shrink-0 rounded-lg px-3 py-3 text-ellipsis whitespace-nowrap overflow-hidden box-content"
>
<!-- <nuxt-img src="img/test.png" alt="user_logo" class="h-8 mr-2 rounded-lg" /> -->
<nuxt-img :src="memberMap[member].icon + '?size=128'" alt="user_logo" class="h-8 mr-2 rounded-lg" />
<nuxt-img
:src="memberMap[member].icon + '?size=128'"
alt="user_logo"
class="w-8 h-8 mr-2 rounded-lg overflow-hidden"
/>

<span class="mr-1 text-lg min-w-0 overflow-hidden text-ellipsis">{{ memberMap[member].nickName }}</span>
<p class="min-w-0 mr-4 overflow-hidden text-ellipsis text-gray-400">
Expand Down Expand Up @@ -163,7 +167,7 @@ const setBlackList = async () => {
member.isBlackList = !member.isBlackList
} catch (e) {
await modalShowAndClose(MODAL.failed, 3000)
await wait(1000)
// await wait(1000)
// location.reload()
// TODO - 요청 다시하는걸로 해야하려나
Expand Down

0 comments on commit f68cf8e

Please sign in to comment.