Skip to content

Commit

Permalink
refactor: reorganize comment module
Browse files Browse the repository at this point in the history
  • Loading branch information
dewanakl committed Jan 5, 2025
1 parent b836c48 commit f11661b
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion js/app.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { util } from './util.js';
import { theme } from './theme.js';
import { comment } from './comment.js';
import { guest } from './guest/guest.js';
import { comment } from './comment/comment.js';

document.addEventListener('DOMContentLoaded', () => {
guest.init();
Expand Down
8 changes: 4 additions & 4 deletions js/card.js → js/comment/card.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { util } from './util.js';
import { theme } from './theme.js';
import { session } from './session.js';
import { storage } from './storage.js';
import { util } from '../util.js';
import { theme } from '../theme.js';
import { session } from '../session.js';
import { storage } from '../storage.js';
import { pagination } from './pagination.js';

export const card = (() => {
Expand Down
12 changes: 6 additions & 6 deletions js/comment.js → js/comment/comment.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { card } from './card.js';
import { like } from './like.js';
import { util } from './util.js';
import { theme } from './theme.js';
import { dto } from './http/dto.js';
import { session } from './session.js';
import { storage } from './storage.js';
import { util } from '../util.js';
import { theme } from '../theme.js';
import { dto } from '../http/dto.js';
import { session } from '../session.js';
import { storage } from '../storage.js';
import { pagination } from './pagination.js';
import { request, HTTP_GET, HTTP_POST, HTTP_DELETE, HTTP_PUT } from './http/request.js';
import { request, HTTP_GET, HTTP_POST, HTTP_DELETE, HTTP_PUT } from '../http/request.js';

export const comment = (() => {

Expand Down
10 changes: 5 additions & 5 deletions js/like.js → js/comment/like.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { dto } from './http/dto.js';
import { storage } from './storage.js';
import { session } from './session.js';
import { confetti } from './libs/confetti.js';
import { request, HTTP_PATCH, HTTP_POST } from './http/request.js';
import { dto } from '../http/dto.js';
import { storage } from '../storage.js';
import { session } from '../session.js';
import { confetti } from '../libs/confetti.js';
import { request, HTTP_PATCH, HTTP_POST } from '../http/request.js';

export const like = (() => {

Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions js/dashboard.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { util } from './util.js';
import { admin } from './dashboard/admin.js';
import { theme } from './theme.js';
import { comment } from './comment.js';
import { admin } from './dashboard/admin.js';
import { comment } from './comment/comment.js';

document.addEventListener('DOMContentLoaded', () => {
admin.init();
Expand Down
2 changes: 1 addition & 1 deletion js/dashboard/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { dto } from '../http/dto.js';
import { navbar } from './navbar.js';
import { storage } from '../storage.js';
import { session } from '../session.js';
import { comment } from '../comment.js';
import { offline } from '../offline.js';
import { comment } from '../comment/comment.js';
import { request, HTTP_GET, HTTP_PATCH, HTTP_PUT } from '../http/request.js';

export const admin = (() => {
Expand Down
2 changes: 1 addition & 1 deletion js/guest/guest.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { audio } from './audio.js';
import { theme } from '../theme.js';
import { session } from '../session.js';
import { storage } from '../storage.js';
import { comment } from '../comment.js';
import { offline } from '../offline.js';
import { progress } from './progress.js';
import { confetti } from '../libs/confetti.js';
import { comment } from '../comment/comment.js';
import { bootstrap } from '../libs/bootstrap.js';

export const guest = (() => {
Expand Down

0 comments on commit f11661b

Please sign in to comment.