Skip to content

The hard-coded list of routes in isContentPage may become brittle; consider extracting the paths into a constant or config and using Array.includes for clarity and easier updates. #747

Description

@BenjaminMichaelis

[nitpick] The hard-coded list of routes in isContentPage may become brittle; consider extracting the paths into a constant or config and using Array.includes for clarity and easier updates.

        const NON_CONTENT_ROUTES = ['/home', '/guidelines', '/about', '/announcements'];
        const isContentPage = computed(() => {
            let path = window.location.pathname;
            return !NON_CONTENT_ROUTES.includes(path);
        });

Originally posted by @Copilot in #667 (comment)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions