mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-21 21:08:09 -05:00
Compare commits
1 Commits
fix/email
...
improvemen
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
41e2ced7ed |
@@ -213,12 +213,9 @@ export default function LoginPage({
|
||||
onError: (ctx) => {
|
||||
logger.error('Login error:', ctx.error)
|
||||
|
||||
// EMAIL_NOT_VERIFIED is handled by the catch block which redirects to /verify
|
||||
if (ctx.error.code?.includes('EMAIL_NOT_VERIFIED')) {
|
||||
errorHandled = true
|
||||
if (typeof window !== 'undefined') {
|
||||
sessionStorage.setItem('verificationEmail', email)
|
||||
}
|
||||
router.push('/verify')
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -110,16 +110,15 @@ export function getCustomTools(workspaceId?: string): CustomToolDefinition[] {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a specific custom tool from the query cache by ID or title (for non-React code)
|
||||
* Custom tools are referenced by title in the system (custom_${title}), so title lookup is required.
|
||||
* Get a specific custom tool from the query cache by ID (for non-React code)
|
||||
* If workspaceId is not provided, extracts it from the current URL
|
||||
*/
|
||||
export function getCustomTool(
|
||||
identifier: string,
|
||||
toolId: string,
|
||||
workspaceId?: string
|
||||
): CustomToolDefinition | undefined {
|
||||
const tools = getCustomTools(workspaceId)
|
||||
return tools.find((tool) => tool.id === identifier || tool.title === identifier)
|
||||
return tools.find((tool) => tool.id === toolId) || tools.find((tool) => tool.title === toolId)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user