Merged in feature/hardcoded-mypages-links (pull request #1325)

Feature/hardcoded mypages links

* feat: wip use hardcoded links

* Merge branch 'master' of bitbucket.org:scandic-swap/web into feature/hardcoded-mypages-links

* feat: use hardcoded links for my pages to support dynamic links

* cleanup

* code fixes

* refactor: restructure MyPagesMobileDropdown component for improved readability

* use util timeout function


Approved-by: Christian Andolf
Approved-by: Linus Flood
This commit is contained in:
Joakim Jäderberg
2025-02-13 09:28:30 +00:00
parent eabe45b73c
commit 6f51130e48
30 changed files with 500 additions and 556 deletions

View File

@@ -1,8 +1,9 @@
import { setTimeout } from "timers/promises"
import { z } from "zod"
import { protectedProcedure } from "@/server/trpc"
import { timeout } from "@/utils/timeout"
import { getSasToken } from "./getSasToken"
const outputSchema = z.object({
@@ -15,7 +16,7 @@ export const linkAccount = protectedProcedure
const sasAuthToken = getSasToken()
console.log("[SAS] link account")
await setTimeout(1000)
await timeout(1000)
//TODO: Call actual API here
console.log("[SAS] link account done")

View File

@@ -1,16 +1,17 @@
import { TRPCError } from "@trpc/server"
import { setTimeout } from "timers/promises"
import { z } from "zod"
import { protectedProcedure } from "@/server/trpc"
import { timeout } from "@/utils/timeout"
const outputSchema = z.object({})
export const performLevelUpgrade = protectedProcedure
.output(outputSchema)
.mutation(async function ({ ctx, input }) {
console.log("[SAS] perform upgrade")
await setTimeout(1000)
await timeout(1000)
//TODO: Call actual API here
throw new TRPCError({

View File

@@ -1,9 +1,10 @@
import { TRPCError } from "@trpc/server"
import { setTimeout } from "timers/promises"
import { z } from "zod"
import { protectedProcedure } from "@/server/trpc"
import { timeout } from "@/utils/timeout"
const outputSchema = z.object({
// unlinked: z.boolean(),
})
@@ -12,7 +13,7 @@ export const unlinkAccount = protectedProcedure
.output(outputSchema)
.mutation(async function ({ ctx, input }) {
console.log("[SAS] unlink account")
await setTimeout(1000)
await timeout(1000)
//TODO: Call actual API here
throw new TRPCError({