Skip to content

Commit 37229dd

Browse files
committed
hotfix(OUT-2186): reimplement warning to not use Client Home in CRM preview
1 parent 644ef0f commit 37229dd

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

src/app/client-preview/page.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,10 @@ export default async function ClientPreviewPage({
5757
return <InvalidToken />
5858
}
5959

60-
console.log('aaa raw token', searchParams.token)
6160
const token = tokenParsed.data
62-
console.log('aaa token parsed', token)
6361
const copilotClient = new CopilotAPI(token)
64-
console.log('aaa copilotClient', copilotClient)
6562
const tokenPayload = await copilotClient.getTokenPayload()
66-
console.log('aaa tokenPayload', tokenPayload)
67-
if (!tokenPayload || !tokenPayload.clientId || !tokenPayload.companyId) {
63+
if (!tokenPayload) {
6864
return <InvalidToken />
6965
}
7066

@@ -73,7 +69,7 @@ export default async function ClientPreviewPage({
7369
}
7470

7571
const clientId = z.string().uuid().safeParse(tokenPayload.clientId)
76-
if (!clientId.success) {
72+
if (!clientId.success || !tokenPayload.companyId) {
7773
return <InvalidToken />
7874
}
7975

0 commit comments

Comments
 (0)