Feat:edu frontend (#17251)
Co-authored-by: crazywoola <427733928@qq.com> Co-authored-by: zxhlyh <jasonapring2015@outlook.com>
This commit is contained in:
@@ -90,3 +90,12 @@ export const canFindTool = (providerId: string, oldToolId?: string) => {
|
||||
|| providerId === `langgenius/${oldToolId}/${oldToolId}`
|
||||
|| providerId === `langgenius/${oldToolId}_tool/${oldToolId}`
|
||||
}
|
||||
|
||||
export const removeSpecificQueryParam = (key: string | string[]) => {
|
||||
const url = new URL(window.location.href)
|
||||
if (Array.isArray(key))
|
||||
key.forEach(k => url.searchParams.delete(k))
|
||||
else
|
||||
url.searchParams.delete(key)
|
||||
window.history.replaceState(null, '', url.toString())
|
||||
}
|
||||
|
Reference in New Issue
Block a user