Skip to content

Commit

Permalink
Sidebar even faster + fix error message about creation time not being…
Browse files Browse the repository at this point in the history
… available
  • Loading branch information
blackforestboi committed May 18, 2024
1 parent a22a816 commit 740bc4b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
30 changes: 15 additions & 15 deletions src/in-page-ui/ribbon/react/containers/ribbon/logic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,21 +221,21 @@ export class RibbonContainerLogic extends UILogic<
})

try {
const signupDate = new Date(
await (await this.dependencies.authBG.getCurrentUser())
.creationTime,
).getTime()
const isTrial =
(await enforceTrialPeriod30Days(
this.dependencies.browserAPIs,
signupDate,
)) ?? null

if (isTrial) {
this.emitMutation({
isTrial: { $set: isTrial },
signupDate: { $set: signupDate },
})
const currentUser = await this.dependencies.authBG.getCurrentUser()
if (currentUser) {
const signupDate = new Date(currentUser?.creationTime).getTime()
const isTrial =
(await enforceTrialPeriod30Days(
this.dependencies.browserAPIs,
signupDate,
)) ?? null

if (isTrial) {
this.emitMutation({
isTrial: { $set: isTrial },
signupDate: { $set: signupDate },
})
}
}
} catch (error) {
console.error('error in updatePageCounter', error)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4715,7 +4715,7 @@ const AnnotationContainer = styled(Margin)`
}
animation-name: ${sidebarContentOpen};
animation-duration: 800ms;
animation-duration: 200ms;
animation-timing-function: cubic-bezier(0.3, 0.35, 0.14, 0.8);
animation-fill-mode: both;
`
Expand All @@ -4733,11 +4733,11 @@ const AnnotationBox = styled.div<{
width: 100%;
z-index: ${(props) => props.zIndex};
animation-name: ${openAnimation};
animation-duration: 600ms;
/* animation-name: ${openAnimation};
animation-duration: 100ms;
animation-delay: ${(props) => props.order * 20}ms;
animation-timing-function: cubic-bezier(0.3, 0.35, 0.14, 0.8);
animation-fill-mode: forwards;
animation-fill-mode: forwards; */
position: relative;
margin-bottom: 5px;
`
Expand Down

0 comments on commit 740bc4b

Please sign in to comment.