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

@BenjaminMichaelis

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)

Metadata

Metadata

Assignees

No one assigned

    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