Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | 77x 77x 77x 77x 77x 77x 77x 77x 77x 77x 77x 77x 77x 77x 77x 77x 77x 77x 77x 77x 77x 77x 77x 77x 77x 77x 11x 11x 50x 50x 77x 453x 453x 77x 77x 77x 77x 2x 77x 77x 77x 77x 77x 77x 77x 77x 9x 77x 77x 77x 77x 77x 77x 77x 77x 77x 144x 77x 77x 77x 77x 77x 77x 77x 77x 77x 77x 27x 77x 77x 77x 5x 131x 133x 77x 2x 77x 77x 77x 51x 77x 6x 77x 77x 77x 1x 1x 77x 18x 77x 77x 45x 77x 1x 77x 168x 77x | /* The source of truth for URLs is //docs/urls.md Please make sure this file stays in sync with that file as well as //app/backend/src/couchers/urls.py */ import { ReferenceType } from "proto/references_pb"; import SearchFilters, { parseSearchFiltersToQuery } from "utils/searchFilters"; export const baseRoute = "/"; export const githubURL = "https://github.com/Couchers-org/couchers"; export const helpCenterURL = "https://help.couchers.org"; export const dashboardRoute = "/dashboard"; export const blogRoute = "/blog"; export const faqRoute = "/faq"; export const missionRoute = "/mission"; export const foundationRoute = "/foundation"; export const planRoute = "/plan"; export const teamRoute = "/team"; export const donationsRoute = "/donate"; export const builtWithRoute = "/open-source"; export const contactRoute = "/contact"; export const loginRoute = "/login"; export const resetPasswordRoute = "/password-reset"; export const featurePreviewRoute = "/preview"; export const confirmChangeEmailRoute = "/confirm-email"; export const signupRoute = "/signup"; export const settingsRoute = "/account-settings"; export const notificationSettingsRoute = `${settingsRoute}/notifications`; export const loginsSettingsRoute = `${settingsRoute}/logins`; // profile export const userTabs = [ "about", "home", "references", "favorites", "photos", ] as const; export const editUserTabs = ["about", "home"] as const; export type UserTab = (typeof userTabs)[number]; export type EditUserTab = (typeof editUserTabs)[number]; const profileBaseRoute = "/profile"; export function routeToProfile(tab?: UserTab) { return `${profileBaseRoute}${tab ? `/${tab}` : ""}`; } export function routeToEditProfile(tab?: EditUserTab) { return `${profileBaseRoute}/edit${tab ? `/${tab}` : ""}`; } // user const userBaseRoute = "/user"; export function routeToUser(username: string, tab?: UserTab) { return `${userBaseRoute}/${username}${tab ? `/${tab}` : ""}`; } export const messagesRoute = "/messages"; export const messageTypeStrings = ["chats", "hosting", "surfing"] as const; export type MessageType = (typeof messageTypeStrings)[number]; export const groupChatsRoute = `${messagesRoute}/chats`; export const routeToCreateMessage = (username: string) => `${groupChatsRoute}?to=${username}`; export const surfingRequestsRoute = `${messagesRoute}/surfing`; export const hostingRequestsRoute = `${messagesRoute}/hosting`; export const hostRequestRoute = `${messagesRoute}/request`; export const routeToGroupChat = (id: number) => `${groupChatsRoute}/${id}`; export const routeToHostRequest = (id: number) => `${hostRequestRoute}/${id}`; // REFERENCES export const leaveReferenceBaseRoute = "/leave-reference"; export const routeToLeaveReference = ( referenceType: ReferenceTypeRouteStrings, userId: number, hostRequestId?: number ) => `${leaveReferenceBaseRoute}/${referenceType}/${userId}/${hostRequestId}`; export const referenceTypeRouteStrings = [ "friend", "surfed", "hosted", ] as const; export type ReferenceTypeRouteStrings = (typeof referenceTypeRouteStrings)[number]; export const referenceTypeRoute: Record< ReferenceType, ReferenceTypeRouteStrings > = { [ReferenceType.REFERENCE_TYPE_FRIEND]: "friend", [ReferenceType.REFERENCE_TYPE_SURFED]: "surfed", [ReferenceType.REFERENCE_TYPE_HOSTED]: "hosted", }; export const referenceStepStrings = [ "appropriate", "rating", "reference", "submit", ] as const; export type ReferenceStep = (typeof referenceStepStrings)[number]; export const eventsRoute = "/events"; export const logoutRoute = "/logout"; export const connectionsRoute = "/connections"; export const friendsRoute = `${connectionsRoute}/friends`; export const searchRoute = "/search"; export const routeToSearch = (filters: SearchFilters) => `${searchRoute}?${parseSearchFiltersToQuery(filters)}`; export const jailRoute = "/restricted"; export const tosRoute = "/terms"; const placeBaseRoute = "/place"; export const routeToPlace = (id: number, slug: string) => `${placeBaseRoute}/${id}/${slug}`; export const newPlaceRoute = `${placeBaseRoute}/new`; const guideBaseRoute = "/guide"; export const routeToGuide = (id: number, slug: string) => `${guideBaseRoute}/${id}/${slug}`; export const newGuideRoute = `${guideBaseRoute}/new`; const groupBaseRoute = "/group"; export const routeToGroup = (id: number, slug: string) => `${groupBaseRoute}/${id}/${slug}`; export const discussionBaseRoute = "/discussion"; export const routeToDiscussion = (id: number, slug: string) => `${discussionBaseRoute}/${id}/${slug}`; export const eventBaseRoute = "/event"; export const newEventRoute = `${eventBaseRoute}/new`; export const routeToNewEvent = (communityId?: number) => `${newEventRoute}${communityId ? `?communityId=${communityId}` : ""}`; export const routeToEvent = (id: number, slug: string) => `${eventBaseRoute}/${id}/${slug}`; export const routeToEditEvent = (id: number, slug: string) => `${routeToEvent(id, slug)}/edit`; const communityBaseRoute = "/community"; export const communityTabs = [ "overview", "info", "discussions", "events", ] as const; export type CommunityTab = (typeof communityTabs)[number]; export const routeToCommunity = ( id: number, slug: string, page?: CommunityTab ) => `${communityBaseRoute}/${id}/${slug}${page ? `/${page}` : ""}`; export const routeToEditCommunityPage = (id: number, slug: string) => `${routeToCommunity(id, slug, "info")}/edit`; export const composingDiscussionHash = "new"; export const volunteerRoute = "/volunteer"; export const strongVerificationURL = `${process.env.NEXT_PUBLIC_CONSOLE_BASE_URL}/strong-verification`; export function adminPanelUserLink(username: string) { return `${process.env.NEXT_PUBLIC_CONSOLE_BASE_URL}/admin/user/${username}`; } export const howToRespondRequestGuideUrl = "https://help.couchers.org/hc/couchersorg-help-center/articles/1715125658-what-are-some-things-i-should-think-about-before-responding-to-a-request"; export const howToWriteRequestGuideUrl = "https://help.couchers.org/hc/couchersorg-help-center/articles/1725943310-quick-reference-writing-great-requests"; export const howToDonateUrl = "https://help.couchers.org/hc/couchersorg-help-center/articles/1715125658-how-do-i-donate-money-to-couchers-org"; export const howToCompleteProfileUrl = "https://help.couchers.org/hc/couchersorg-help-center/articles/1725919152-why-do-i-need-to-complete-my-profile-to-use-some-features"; export const howToInviteCommunityUrl = "https://help.couchers.org/hc/couchersorg-help-center/articles/1720304409-how-does-the-invite-the-community-feature-work"; export const howToMakeGreatProfileUrl = "https://help.couchers.org/hc/couchersorg-help-center/articles/1725919197-how-do-i-create-a-great-profile"; |