Skip to content

Commit

Permalink
Fix frontend loading
Browse files Browse the repository at this point in the history
  • Loading branch information
riku6460 committed Sep 25, 2023
1 parent 4d9a694 commit 8291dfa
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/frontend/src/filters/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@
*/

import * as Misskey from 'misskey-js';
import * as Acct from 'misskey-js/src/acct.js';
import { url } from '@/config.js';

export const acct = (user: misskey.Acct) => {
return Misskey.acct.toString(user);
export const acct = (user: Misskey.Acct) => {
return Acct.toString(user);
};

export const userName = (user: Misskey.entities.User) => {
return user.name || user.username;
};

export const userPage = (user: misskey.Acct, path?, absolute = false) => {
export const userPage = (user: Misskey.Acct, path?, absolute = false) => {
return `${absolute ? url : ''}/@${acct(user)}${(path ? `/${path}` : '')}`;
};

0 comments on commit 8291dfa

Please sign in to comment.