mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 04:48:53 +00:00
fix(core): adjust ai onboarding copywriting and local onboarding actions (#6834)
This commit is contained in:
@@ -139,13 +139,22 @@ export function useNavigateHelper() {
|
||||
(
|
||||
redirectUri?: string,
|
||||
logic: RouteLogic = RouteLogic.PUSH,
|
||||
otherOptions?: Omit<NavigateOptions, 'replace'>
|
||||
otherOptions?: Omit<NavigateOptions, 'replace'>,
|
||||
params?: Record<string, string>
|
||||
) => {
|
||||
const searchParams = new URLSearchParams();
|
||||
|
||||
if (redirectUri) {
|
||||
searchParams.set('redirect_uri', encodeURIComponent(redirectUri));
|
||||
}
|
||||
|
||||
if (params) {
|
||||
for (const key in params) searchParams.set(key, params[key]);
|
||||
}
|
||||
|
||||
return navigate(
|
||||
'/signIn' +
|
||||
(redirectUri
|
||||
? `?redirect_uri=${encodeURIComponent(redirectUri)}`
|
||||
: ''),
|
||||
(searchParams.toString() ? '?' + searchParams.toString() : ''),
|
||||
{
|
||||
replace: logic === RouteLogic.REPLACE,
|
||||
...otherOptions,
|
||||
|
||||
Reference in New Issue
Block a user