버그 수정

This commit is contained in:
2025-04-24 13:48:53 +09:00
parent 7fa99e6988
commit f01bcbdf39
9 changed files with 18 additions and 21 deletions
+1
View File
@@ -173,6 +173,7 @@ const fetchClubs = async () => {
// 첫 번째 클럽의 memberType을 localStorage에 저장
if (clubs.value.length > 0) {
localStorage.setItem('userClubRole', clubs.value[0].memberType || '');
localStorage.setItem('clubId', clubs.value[0].id);
}
} catch (error) {
console.error('클럽 목록 로드 실패:', error);
+1
View File
@@ -91,6 +91,7 @@ const userAvatar = computed(() => user.value?.avatar || '');
// 로그아웃
const logout = () => {
user.value = null;
localStorage.removeItem('token');
localStorage.removeItem('clubId');
localStorage.removeItem('userRole');
@@ -65,6 +65,7 @@ const fetchEvents = async () => {
loading.value = true;
try {
const eventData = await eventService.getEvents(clubId.value);
console.log('eventData', eventData);
events.value = eventData.map(event => ({
id: event.id,
title: event.title,
@@ -105,6 +105,7 @@
<Button label="예" icon="pi pi-check" class="p-button-danger" @click="deleteEvent" />
</template>
</Dialog>
<Toast />
</div>
</template>
@@ -163,6 +164,7 @@ const fetchEvents = async () => {
loading.value = true;
try {
const response = await eventService.getEvents(clubId.value);
console.log('eventData', response);
events.value = response;
} catch (error) {
toast.add({