refactor(routes): move shared pages to global scope
This commit is contained in:
@@ -38,9 +38,6 @@ export interface CharacterRoutes {
|
||||
readonly chat: string;
|
||||
readonly privateRoom: string;
|
||||
readonly tip: string;
|
||||
readonly sidebar: string;
|
||||
readonly feedback: string;
|
||||
readonly coinsRules: string;
|
||||
}
|
||||
|
||||
export function getCharacterRoutes(
|
||||
@@ -52,9 +49,6 @@ export function getCharacterRoutes(
|
||||
chat: `${root}/chat`,
|
||||
privateRoom: `${root}/private-room`,
|
||||
tip: `${root}/tip`,
|
||||
sidebar: `${root}/sidebar`,
|
||||
feedback: `${root}/feedback`,
|
||||
coinsRules: `${root}/coins-rules`,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -86,15 +80,15 @@ export const ROUTE_BUILDERS = {
|
||||
options: {
|
||||
payChannel?: PayChannel;
|
||||
returnTo?: Exclude<AppSubscriptionReturnTo, null>;
|
||||
characterSlug?: string;
|
||||
sourceCharacterSlug?: string;
|
||||
analytics?: PaymentAnalyticsContext;
|
||||
} = {},
|
||||
): `/subscription?${string}` => {
|
||||
const params = new URLSearchParams({ type });
|
||||
if (options.payChannel) params.set("payChannel", options.payChannel);
|
||||
if (options.returnTo) params.set("returnTo", options.returnTo);
|
||||
if (options.characterSlug) {
|
||||
params.set("character", options.characterSlug);
|
||||
if (options.sourceCharacterSlug) {
|
||||
params.set("character", options.sourceCharacterSlug);
|
||||
}
|
||||
if (options.analytics) {
|
||||
params.set(
|
||||
|
||||
Reference in New Issue
Block a user