Skip to content
This repository has been archived by the owner on Apr 8, 2023. It is now read-only.

Commit

Permalink
refactor: config files names
Browse files Browse the repository at this point in the history
  • Loading branch information
mhaidarhanif committed May 8, 2022
1 parent c9ce0ed commit e1f9046
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 66 deletions.
File renamed without changes.
7 changes: 3 additions & 4 deletions app/configs/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
export * from './app';
export * from './colors';
export * from './document-links';
export * from './external-links';
export * from './document';
export * from './features';
export * from './meta';
export * from './navigation-menu';
export * from './navigation-links';
export * from './navigation';
export * from './themes';
export * from './urls';
34 changes: 0 additions & 34 deletions app/configs/navigation-links.ts

This file was deleted.

17 changes: 0 additions & 17 deletions app/configs/navigation-menu.ts

This file was deleted.

59 changes: 59 additions & 0 deletions app/configs/navigation.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/**
* Config Navigation Links
*
* Used in the Navigation Bar with 2 modes:
* - Large screen mode (desktop, TV)
* - Small screen mode (mobile, tablet)
*/

export const configNavigationLinks = [
{ to: '/', text: 'Home' },
{ to: '/about', text: 'About' },
{ to: '/subscribe', text: 'Subscribe' },
{ to: '/debug', text: 'Debug' },
{ to: '/examples', text: 'Examples' },
{ to: '/examples/button', text: 'Example Button' },
{ to: '/examples/rest', text: 'Example REST' },
{ to: '/examples/graphql', text: 'Example GraphQL' },
// In large screen, the auth links are as buttons
];

export const configNavigationLinksMenu = [
{
name: 'Pages',
links: [...configNavigationLinks],
},
{
// In small screen, the auth links are inside the menu modal
name: 'Account',
links: [
{ to: '/signup', text: 'Sign up' },
{ to: '/signin', text: 'Sign in' },
{ to: '/signout', text: 'Sign out' },
],
},
];

/**
* Config Navigation Menu Content Links
*
* Used in the Navigation Menu with Radix UI
*/

export const configNavigationContentPages = [
{ to: '/about', text: 'About' },
{ to: '/blog', text: 'Blog' },
{ to: '/subscribe', text: 'Subscribe' },
];

export const configNavigationContentExamples1 = [
{ to: '/examples/button', text: 'Button' },
{ to: '/examples/form', text: 'Form' },
{ to: '/examples/navigation-menu', text: 'Navigation Menu' },
];

export const configNavigationContentExamples2 = [
{ to: '/examples/rest', text: 'REST API' },
{ to: '/examples/graphql', text: 'GraphQL' },
{ to: '/examples/debug', text: 'Debug' },
];
28 changes: 17 additions & 11 deletions app/configs/external-links.ts → app/configs/urls.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
import type { ExternalLinkItem } from '~/types';

/**
* Config External Links
* Config URLs
*
* Used in the redirect routes
*/

export const configUrls = {
GITHUB_URL: 'https://a.mhaidarhanif.com/github',
TWITTER_URL: 'https://a.mhaidarhanif.com/twitter',
YOUTUBE_URL: 'https://a.mhaidarhanif.com/youtube',
DEV_URL: 'https://a.mhaidarhanif.com/devto',
MEDIUM_URL: 'https://a.mhaidarhanif.com/medium',
DISCORD_URL: 'https://a.mhaidarhanif.com/discord',
TELEGRAM_URL: 'https://a.mhaidarhanif.com/telegram',
};

/**
* Config External Anchor URLs
*
* The intention is so have this URL format:
* https://oursite.com/r/name
Expand All @@ -22,13 +38,3 @@ export const configExternalLinks: Array<ExternalLinkItem> = [
{ name: 'Discord', url: '/r/discord', isEnabled: false },
{ name: 'Telegram', url: '/r/telegram', isEnabled: false },
];

export const configUrls = {
GITHUB_URL: 'https://a.mhaidarhanif.com/github',
TWITTER_URL: 'https://a.mhaidarhanif.com/twitter',
YOUTUBE_URL: 'https://a.mhaidarhanif.com/youtube',
DEV_URL: 'https://a.mhaidarhanif.com/devto',
MEDIUM_URL: 'https://a.mhaidarhanif.com/medium',
DISCORD_URL: 'https://a.mhaidarhanif.com/discord',
TELEGRAM_URL: 'https://a.mhaidarhanif.com/telegram',
};

0 comments on commit e1f9046

Please sign in to comment.