Skip to content

Commit

Permalink
chore: code structure improved
Browse files Browse the repository at this point in the history
  • Loading branch information
nicitaacom committed Apr 17, 2024
1 parent 4d500d0 commit 078a5b2
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
1 change: 1 addition & 0 deletions app/(auth)/auth/callback/oauth/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export async function GET(request: Request) {
avatar_url: avatarUrl,
providers: [provider!],
})

// If row already exist - do 4 and 5
if (is_row_exist) {
// 4. If provider_response !=== provider - add one more provider
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
"use client"

import Link from "next/link"
import Image from "next/image"
import { twMerge } from "tailwind-merge"

import useTicket from "@/hooks/support/useTicket"
import useSender from "@/hooks/ui/useSender"
import { ITicket } from "@/interfaces/support/ITicket"
import Image from "next/image"
import Link from "next/link"
import { twMerge } from "tailwind-merge"

interface DesktopSidebarTicketProps {
ticket: ITicket
Expand Down
1 change: 1 addition & 0 deletions app/components/Navbar/components/LogoutDropdownItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ export default function LogoutDropdownItem() {
userStore.logoutUser()
router.refresh()
}

return <DropdownItem label="Logout" icon={BiLogOut} onClick={logout} />
}
8 changes: 7 additions & 1 deletion app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,13 @@ body {
}

.image-upload {
/* https://kovart.github.io/dashed-border-generator/ */
/*
Docs - https://kovart.github.io/dashed-border-generator/
stroke='%230E00FF' - correct
stroke='%0E00FF' - not correcrt
stroke='0E00FF' - not correcrt
So just add your HEX after %23
*/
background-image: url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' stroke='%23FE0E00FF' stroke-width='4' stroke-dasharray='9%25%2c 10%25' stroke-dashoffset='6' stroke-linecap='butt'/%3e%3c/svg%3e");
}

Expand Down
1 change: 1 addition & 0 deletions app/hooks/ui/supportButton/useActiveTab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { useEffect, useRef, useState } from "react"
export const useIsActiveTab = () => {
const isActiveRef = useRef<boolean>(document.visibilityState === "visible" && document.hasFocus())
const [trigger, setTrigger] = useState(false) // Used only to trigger re-renders
// don't remove line above because it will not work as expected

// Function to update the isActive state
const updateIsActiveState = (isActive: boolean) => {
Expand Down

0 comments on commit 078a5b2

Please sign in to comment.