Skip to content
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
1 change: 0 additions & 1 deletion src/config/general/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ const general = {

profileViews: {
badgeBaseUrl: 'https://visitor-badge.laobi.icu/badge',
imageBaseUrl: 'https://profile-counter.glitch.me',
},

activities: {
Expand Down
2 changes: 1 addition & 1 deletion src/features/profile-views/default-config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const defaultProfileViewsSectionConfig = {
props: {
content: {
type: 'default',
type: 'badge',
props: {
left_color: '',
right_color: '',
Expand Down
4 changes: 0 additions & 4 deletions src/features/profile-views/panel/fields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ const groups = [
label: 'Format',
props: {
options: [
{
label: 'Default',
value: 'default',
},
{
label: 'Badge',
value: 'badge',
Expand Down
5 changes: 1 addition & 4 deletions src/utils/getProfileViewsUrl/index.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
import { config } from 'config';

const { badgeBaseUrl, imageBaseUrl } =
config.general.urls.sections.profileViews;
const { badgeBaseUrl } = config.general.urls.sections.profileViews;

const urls = {
badge: (username: string) =>
`${badgeBaseUrl}?page_id=${username}.${username}&`,

default: (username: string) => `${imageBaseUrl}/${username}/count.svg?`,
};

const getProfileViewsUrl = (type: keyof typeof urls, username: string) =>
Expand Down
4 changes: 0 additions & 4 deletions src/utils/getProfileViewsUrl/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ describe('UTILS - Get profile views url', () => {
input: ['badge', 'test'],
expected: `${badgeBaseUrl}?page_id=test.test&`,
},
{
input: ['default', 'test'],
expected: `${imageBaseUrl}/test/count.svg?`,
},
];

inputs.forEach(({ input: [type, username], expected }) => {
Expand Down
Loading