Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(notice-detail-store): prevent duplicate requests while loading data #5452

Merged
merged 3 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ onUnmounted(() => {
@apply block;
margin-right: 0.125rem;
margin-left: auto;
flex-shrink: 0;
&:hover {
transform: scale(1.3);
}
Expand Down
2 changes: 0 additions & 2 deletions apps/web/src/lib/file-manager/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ import ErrorHandler from '@/common/composables/error/errorHandler';
const uploadFile = async (file: File, resourceGroup: FileManagerResourceGroupType, resourceId?: string): Promise<FileModel> => {
const formData = new FormData();
formData.append('file', file);
// TODO: Remove after test is done
console.log('file', file);
let resourceGroupPath: string;
let params = '';
if (resourceGroup === 'DOMAIN') {
Expand Down
1 change: 1 addition & 0 deletions apps/web/src/services/info/stores/notice-detail-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export const useNoticeDetailStore = defineStore('notice-detail', () => {
const actions = {
getNoticePost: async (postId: string) => {
try {
if (state.loading) return;
state.loading = true;
const result = await SpaceConnector.clientV2.board.post.get<PostGetParameters, PostModel>({
post_id: postId,
Expand Down
Loading