chore: lint fix
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { env } from "@/env/server"
|
||||
|
||||
import Script from "next/script"
|
||||
|
||||
import { env } from "@/env/server"
|
||||
|
||||
export default function AdobeScript() {
|
||||
return env.ADOBE_SCRIPT_SRC ? (
|
||||
<Script data-cookieconsent="statistics" src={env.ADOBE_SCRIPT_SRC} />
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { Lang } from "@/constants/languages"
|
||||
|
||||
import styles from "./contact.module.css"
|
||||
|
||||
import { Lang } from "@/constants/languages"
|
||||
import { Section, type ContactNode } from "@/types/requests/asides/contact"
|
||||
import { type ContactNode, Section } from "@/types/requests/asides/contact"
|
||||
|
||||
export default function Contact({ sections, system: { locale } }: ContactNode) {
|
||||
if (!sections.length) {
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
"use client"
|
||||
import { renderOptions } from "./renderOptions"
|
||||
import { useRouter } from "next/navigation"
|
||||
|
||||
import { Button } from "@scandic-hotels/design-system/current"
|
||||
|
||||
import Image from "@/components/Image"
|
||||
import JsonToHtml from "@/components/JsonToHtml"
|
||||
import { Button } from "@scandic-hotels/design-system/current"
|
||||
|
||||
import { renderOptions } from "./renderOptions"
|
||||
|
||||
import styles from "./puff.module.css"
|
||||
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import styles from "./puff.module.css"
|
||||
|
||||
import { RTETypeEnum } from "@/types/rte/enums"
|
||||
|
||||
import type { EmbedByUid } from "@/types/components/jsontohtml"
|
||||
import type { RTENext, RTEDefaultNode } from "@/types/rte/node"
|
||||
import { RTETypeEnum } from "@/types/rte/enums"
|
||||
import type { RTEDefaultNode, RTENext } from "@/types/rte/node"
|
||||
import type { RenderOptions } from "@/types/rte/option"
|
||||
|
||||
export const renderOptions: RenderOptions = {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import Puff from "./Puff"
|
||||
import Contacts from "./Contacts"
|
||||
|
||||
import { AsideTypenameEnum } from "@/types/requests/utils/typename"
|
||||
import type { AsideProps } from "@/types/components/current/aside"
|
||||
import Puff from "./Puff"
|
||||
|
||||
import styles from "./aside.module.css"
|
||||
|
||||
import type { AsideProps } from "@/types/components/current/aside"
|
||||
import { AsideTypenameEnum } from "@/types/requests/utils/typename"
|
||||
|
||||
export default function Aside({ blocks }: AsideProps) {
|
||||
if (!blocks?.length) {
|
||||
return null
|
||||
@@ -24,12 +24,7 @@ export default function Aside({ blocks }: AsideProps) {
|
||||
/>
|
||||
)
|
||||
case AsideTypenameEnum.CurrentBlocksPageAsidePuff:
|
||||
return (
|
||||
<Puff
|
||||
key={`block-${idx}`}
|
||||
{...block.puff}
|
||||
/>
|
||||
)
|
||||
return <Puff key={`block-${idx}`} {...block.puff} />
|
||||
default:
|
||||
return null
|
||||
}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import { cva } from "class-variance-authority"
|
||||
|
||||
import { BlockListItemsEnum } from "@/types/requests/blocks/list"
|
||||
|
||||
import styles from "./list.module.css"
|
||||
|
||||
import type { ListItem } from "@/types/requests/blocks/list"
|
||||
import { BlockListItemsEnum } from "@/types/requests/blocks/list"
|
||||
|
||||
const config = {
|
||||
variants: {
|
||||
|
||||
@@ -2,10 +2,10 @@ import List from "./List"
|
||||
import Puffs from "./Puffs"
|
||||
import Text from "./Text"
|
||||
|
||||
import { BlocksTypenameEnum } from "@/types/requests/utils/typename"
|
||||
|
||||
import styles from "./blocks.module.css"
|
||||
|
||||
import type { BlocksProps } from "@/types/components/current/blocks"
|
||||
import { BlocksTypenameEnum } from "@/types/requests/utils/typename"
|
||||
|
||||
export default function Blocks({ blocks }: BlocksProps) {
|
||||
if (!blocks?.length) {
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
import { request } from "@/lib/graphql/request"
|
||||
import { GetFooter } from "@/lib/graphql/Query/Footer.graphql"
|
||||
|
||||
import Image from "@/components/Image"
|
||||
import Navigation from "./Navigation"
|
||||
import Script from "next/script"
|
||||
|
||||
import type { GetFooterData } from "@/types/requests/footer"
|
||||
import { GetFooter } from "@/lib/graphql/Query/Footer.graphql"
|
||||
import { request } from "@/lib/graphql/request"
|
||||
|
||||
import Image from "@/components/Image"
|
||||
|
||||
import Navigation from "./Navigation"
|
||||
|
||||
import type { LangParams } from "@/types/params"
|
||||
import type { GetFooterData } from "@/types/requests/footer"
|
||||
|
||||
export default async function Footer({ lang }: LangParams) {
|
||||
const response = await request<GetFooterData>(
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
import { useState } from "react"
|
||||
|
||||
import Image from "@/components/Image"
|
||||
|
||||
import Mobile from "../LanguageSwitcher/Mobile"
|
||||
|
||||
import styles from "./mainMenu.module.css"
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { homeHrefs } from "@/constants/homeHrefs"
|
||||
import { languages } from "@/constants/languages"
|
||||
import { env } from "@/env/server"
|
||||
import { batchRequest } from "@/lib/graphql/batchRequest"
|
||||
import { request } from "@/lib/graphql/request"
|
||||
import { GetHeader } from "@/lib/graphql/Query/Header.graphql"
|
||||
import {
|
||||
GetDaDeEnUrls,
|
||||
GetFiNoSvUrls,
|
||||
} from "@/lib/graphql/Query/LanguageSwitcher.graphql"
|
||||
import { homeHrefs } from "@/constants/homeHrefs"
|
||||
import { env } from "@/env/server"
|
||||
import { request } from "@/lib/graphql/request"
|
||||
|
||||
import MainMenu from "./MainMenu"
|
||||
import OfflineBanner from "./OfflineBanner"
|
||||
@@ -15,9 +15,9 @@ import TopMenu from "./TopMenu"
|
||||
|
||||
import styles from "./header.module.css"
|
||||
|
||||
import type { HeaderProps } from "@/types/components/current/header"
|
||||
import { LangParams } from "@/types/params"
|
||||
import type { HeaderQueryData } from "@/types/requests/header"
|
||||
import type { HeaderProps } from "@/types/components/current/header"
|
||||
import type { LanguageSwitcherQueryData } from "@/types/requests/languageSwitcher"
|
||||
|
||||
export default async function Header({ lang, uid }: LangParams & HeaderProps) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Lang, localeToLang } from "@/constants/languages"
|
||||
import { headers } from "next/headers"
|
||||
|
||||
import { Lang, localeToLang } from "@/constants/languages"
|
||||
|
||||
export default function LangPopup({ lang }: { lang: Lang }) {
|
||||
const headersList = headers()
|
||||
const preferedLang = headersList.get("Accept-Language") ?? ""
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"use client"
|
||||
|
||||
import { useEffect } from "react"
|
||||
import ContentstackLivePreview from "@contentstack/live-preview-utils"
|
||||
import { useEffect } from "react"
|
||||
|
||||
export default function InitLivePreview() {
|
||||
useEffect(() => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { renderOptions } from "./renderOptions"
|
||||
import JsonToHtml from "@/components/JsonToHtml"
|
||||
|
||||
import Breadcrumbs from "./Breadcrumbs"
|
||||
import JsonToHtml from "@/components/JsonToHtml"
|
||||
import { renderOptions } from "./renderOptions"
|
||||
|
||||
import styles from "./preamble.module.css"
|
||||
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import styles from "./preamble.module.css"
|
||||
|
||||
import { RTETypeEnum } from "@/types/rte/enums"
|
||||
|
||||
import type { EmbedByUid } from "@/types/components/jsontohtml"
|
||||
import type { RTENext, RTEDefaultNode } from "@/types/rte/node"
|
||||
import { RTETypeEnum } from "@/types/rte/enums"
|
||||
import type { RTEDefaultNode, RTENext } from "@/types/rte/node"
|
||||
import type { RenderOptions } from "@/types/rte/option"
|
||||
|
||||
export const renderOptions: RenderOptions = {
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
"use client"
|
||||
|
||||
import { usePathname, useSearchParams } from "next/navigation"
|
||||
import { useEffect, useState } from "react"
|
||||
|
||||
import {
|
||||
SiteSectionObject,
|
||||
TrackingData,
|
||||
TrackingProps,
|
||||
} from "@/types/components/tracking"
|
||||
import { usePathname, useSearchParams } from "next/navigation"
|
||||
import { useEffect, useState } from "react"
|
||||
|
||||
function createPageObject(trackingData: TrackingData) {
|
||||
const englishSegments = trackingData.englishUrl
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
"use client"
|
||||
|
||||
import NextImage, { type ImageProps, type ImageLoaderProps } from "next/image"
|
||||
import NextImage from "next/image"
|
||||
|
||||
import type { ImageLoaderProps, ImageProps } from "next/image"
|
||||
|
||||
function imageLoader({ quality, src, width }: ImageLoaderProps) {
|
||||
return `${src}?w=${width}${quality ? "&q=" + quality : ""}`
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
import Image from "@/components/Image"
|
||||
import Link from "next/link"
|
||||
|
||||
import { EmbedEnum } from "@/types/requests/utils/embeds"
|
||||
import { RTEItemTypeEnum, RTETypeEnum } from "@/types/rte/enums"
|
||||
import { RTEMarkType } from "@/types/rte/node"
|
||||
import Image from "@/components/Image"
|
||||
|
||||
import styles from "./jsontohtml.module.css"
|
||||
|
||||
import type { Attributes } from "@/types/rte/attrs"
|
||||
import type { EmbedByUid } from "@/types/components/jsontohtml"
|
||||
import { EmbedEnum } from "@/types/requests/utils/embeds"
|
||||
import type { Attributes } from "@/types/rte/attrs"
|
||||
import { RTEItemTypeEnum, RTETypeEnum } from "@/types/rte/enums"
|
||||
import type {
|
||||
RTENext,
|
||||
RTEDefaultNode,
|
||||
RTENext,
|
||||
RTENode,
|
||||
RTERegularNode,
|
||||
} from "@/types/rte/node"
|
||||
import { RTEMarkType } from "@/types/rte/node"
|
||||
import type { RenderOptions } from "@/types/rte/option"
|
||||
|
||||
function extractPossibleAttributes(attrs: Attributes) {
|
||||
@@ -263,7 +263,9 @@ export const renderOptions: RenderOptions = {
|
||||
}
|
||||
} else {
|
||||
const props = extractPossibleAttributes(node.attrs)
|
||||
const href = node.attrs?.locale ? `/${node.attrs.locale}${node.attrs.href}` : node.attrs.href
|
||||
const href = node.attrs?.locale
|
||||
? `/${node.attrs.locale}${node.attrs.href}`
|
||||
: node.attrs.href
|
||||
return (
|
||||
<Link {...props} href={href} key={node.uid}>
|
||||
{next(node.children, embeds, fullRenderOptions)}
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
import { renderOptions } from "./renderOptions"
|
||||
|
||||
import { RTEMarkType, RTERenderMark } from "@/types/rte/node"
|
||||
import { RTETypeEnum } from "@/types/rte/enums"
|
||||
|
||||
import type { EmbedByUid } from "@/types/components/jsontohtml"
|
||||
import type { Embeds } from "@/types/requests/embeds"
|
||||
import type { Node } from "@/types/requests/utils/edges"
|
||||
import type { RenderOptions } from "@/types/rte/option"
|
||||
import { RTETypeEnum } from "@/types/rte/enums"
|
||||
import type {
|
||||
RTENode,
|
||||
RTETextNode,
|
||||
RTERenderOptionComponent,
|
||||
RTETextNode,
|
||||
} from "@/types/rte/node"
|
||||
import type { Embeds } from "@/types/requests/embeds"
|
||||
import { RTEMarkType, RTERenderMark } from "@/types/rte/node"
|
||||
import type { RenderOptions } from "@/types/rte/option"
|
||||
|
||||
export function groupEmbedsByUid(embedsArray: Node<Embeds>[]) {
|
||||
const embedsByUid = embedsArray.reduce<EmbedByUid>((acc, embed) => {
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
import { serverClient } from "@/lib/trpc/server"
|
||||
import Title from "@/components/MyPages/Title"
|
||||
import styles from "./current.module.css"
|
||||
import Link from "next/link"
|
||||
|
||||
import { serverClient } from "@/lib/trpc/server"
|
||||
|
||||
import Title from "@/components/MyPages/Title"
|
||||
|
||||
import styles from "./current.module.css"
|
||||
|
||||
export default async function CurrentBenefitsBlock() {
|
||||
const benefits = await serverClient().user.benefits.current()
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import Link from "next/link"
|
||||
import { Lock } from "react-feather"
|
||||
|
||||
import { serverClient } from "@/lib/trpc/server"
|
||||
|
||||
import { Lock } from "react-feather"
|
||||
import Title from "@/components/MyPages/Title"
|
||||
import Button from "@/components/TempDesignSystem/Button"
|
||||
import Link from "next/link"
|
||||
|
||||
import styles from "./next.module.css"
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"use client"
|
||||
|
||||
import Button from "@/components/TempDesignSystem/Button"
|
||||
import Image from "@/components/Image"
|
||||
import Button from "@/components/TempDesignSystem/Button"
|
||||
|
||||
import type { User } from "@/types/user"
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"use client"
|
||||
|
||||
import Button from "@/components/TempDesignSystem/Button"
|
||||
import Image from "@/components/Image"
|
||||
import Button from "@/components/TempDesignSystem/Button"
|
||||
|
||||
import styles from "./btn.module.css"
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import Divider from "@/components/TempDesignSystem/Divider"
|
||||
|
||||
import Title from "../Title"
|
||||
|
||||
import styles from "./progress.module.css"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import Divider from "@/components/TempDesignSystem/Divider"
|
||||
|
||||
import Title from "../Title"
|
||||
|
||||
import styles from "./totalPoints.module.css"
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { serverClient } from "@/lib/trpc/server"
|
||||
|
||||
import Link from "@/components/TempDesignSystem/Link"
|
||||
import Title from "@/components/MyPages/Title"
|
||||
import StayCard from "../../Stays/StayCard"
|
||||
import Link from "@/components/TempDesignSystem/Link"
|
||||
|
||||
import EmptyUpcomingStaysBlock from "../../Stays/EmptyUpcomingStays"
|
||||
import StayCard from "../../Stays/StayCard"
|
||||
|
||||
import styles from "./upcoming.module.css"
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import Title from "@/components/MyPages/Title"
|
||||
|
||||
import Friend from "./Friend"
|
||||
import Stats from "./Stats"
|
||||
import Title from "@/components/MyPages/Title"
|
||||
|
||||
import styles from "./overview.module.css"
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import Image from "@/components/Image"
|
||||
import Link from "next/link"
|
||||
|
||||
import Image from "@/components/Image"
|
||||
import Title from "@/components/MyPages/Title"
|
||||
|
||||
import styles from "./shortcuts.module.css"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import Title from "@/components/MyPages/Title"
|
||||
|
||||
import styles from "./emptyPreviousStays.module.css"
|
||||
|
||||
export default function EmptyPreviousStaysBlock() {
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import Link from "next/link"
|
||||
|
||||
import Title from "@/components/MyPages/Title"
|
||||
import Button from "@/components/TempDesignSystem/Button"
|
||||
|
||||
import styles from "./emptyUpcomingStays.module.css"
|
||||
import Link from "next/link"
|
||||
|
||||
export default function EmptyUpcomingStaysBlock() {
|
||||
return (
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { dt } from "@/lib/dt"
|
||||
|
||||
import Image from "@/components/Image"
|
||||
import Title from "@/components/MyPages/Title"
|
||||
|
||||
import styles from "./stay.module.css"
|
||||
import Title from "@/components/MyPages/Title"
|
||||
|
||||
import type { StayCardProps } from "@/types/components/myPages/stays/stayCard"
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import Button from "@/components/TempDesignSystem/Button"
|
||||
|
||||
import StayCard from "../StayCard"
|
||||
|
||||
import styles from "./stayList.module.css"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import Image from "@/components/Image"
|
||||
|
||||
import styles from "./language.module.css"
|
||||
|
||||
export default function LanguageSwitcher() {
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { request } from "@/lib/graphql/request"
|
||||
import Link from "next/link"
|
||||
|
||||
import { GetMyPagesLogo } from "@/lib/graphql/Query/Logo.graphql"
|
||||
import { request } from "@/lib/graphql/request"
|
||||
|
||||
import Image from "@/components/Image"
|
||||
import Link from "next/link"
|
||||
|
||||
import styles from "./logo.module.css"
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { serverClient } from "@/lib/trpc/server"
|
||||
|
||||
import styles from "./user.module.css"
|
||||
|
||||
export default async function User() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type {
|
||||
NavigationItem,
|
||||
MenuItem,
|
||||
NavigationItem,
|
||||
} from "@/types/requests/myPages/navigation"
|
||||
|
||||
export function mapMenuItems(navigationItems: NavigationItem[]) {
|
||||
|
||||
@@ -1,16 +1,20 @@
|
||||
import { mapMenuItems } from "./helpers"
|
||||
import { request } from "@/lib/graphql/request"
|
||||
import { GetNavigationMyPages } from "@/lib/graphql/Query/NavigationMyPages.graphql"
|
||||
|
||||
import { Fragment } from "react"
|
||||
import { LogOut } from "react-feather"
|
||||
|
||||
import { GetNavigationMyPages } from "@/lib/graphql/Query/NavigationMyPages.graphql"
|
||||
import { request } from "@/lib/graphql/request"
|
||||
|
||||
import Link from "@/components/TempDesignSystem/Link"
|
||||
|
||||
import Title from "../Title"
|
||||
import { mapMenuItems } from "./helpers"
|
||||
|
||||
import styles from "./sidebar.module.css"
|
||||
|
||||
import type { GetNavigationMyPagesData } from "@/types/requests/myPages/navigation"
|
||||
import type { SidebarProps } from "@/types/requests/myPages/navigation"
|
||||
import type {
|
||||
GetNavigationMyPagesData,
|
||||
SidebarProps,
|
||||
} from "@/types/requests/myPages/navigation"
|
||||
|
||||
export default async function Sidebar({ lang }: SidebarProps) {
|
||||
const response = await request<GetNavigationMyPagesData>(
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { cva } from "class-variance-authority"
|
||||
|
||||
import Card from "@/components/MyProfile/Card"
|
||||
import Image from "@/components/Image"
|
||||
import Card from "@/components/MyProfile/Card"
|
||||
|
||||
import styles from "./profile.module.css"
|
||||
|
||||
|
||||
@@ -12,9 +12,9 @@ import {
|
||||
HouseIcon,
|
||||
PhoneIcon,
|
||||
} from "@/components/Icons"
|
||||
import Field from "@/components/MyProfile/Field"
|
||||
import CountrySelect from "@/components/TempDesignSystem/Form/Country"
|
||||
import DateSelect from "@/components/TempDesignSystem/Form/Date"
|
||||
import Field from "@/components/MyProfile/Field"
|
||||
import Input from "@/components/TempDesignSystem/Form/Input"
|
||||
import Phone from "@/components/TempDesignSystem/Form/Phone"
|
||||
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
"use client"
|
||||
import { FormProvider, useForm } from "react-hook-form"
|
||||
import { useFormState as useReactFormState } from "react-dom"
|
||||
import { useEffect } from "react"
|
||||
import { zodResolver } from "@hookform/resolvers/zod"
|
||||
import { useEffect } from "react"
|
||||
import { useFormState as useReactFormState } from "react-dom"
|
||||
import { FormProvider, useForm } from "react-hook-form"
|
||||
|
||||
import { editProfile } from "@/actions/editProfile"
|
||||
import { editProfileSchema, type EditProfileSchema } from "./schema"
|
||||
import { useProfileStore } from "@/stores/edit-profile"
|
||||
|
||||
import { editProfile } from "@/actions/editProfile"
|
||||
|
||||
import FormContent from "./Content"
|
||||
import { type EditProfileSchema, editProfileSchema } from "./schema"
|
||||
|
||||
import styles from "./form.module.css"
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { z } from "zod"
|
||||
|
||||
import { _ } from "@/lib/translation"
|
||||
|
||||
import { phoneValidator } from "@/utils/phoneValidator"
|
||||
|
||||
export const editProfileSchema = z.object({
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { dt } from "@/lib/dt"
|
||||
import { _ } from "@/lib/translation"
|
||||
import { countries } from "@/components/TempDesignSystem/Form/Country/countries"
|
||||
import { serverClient } from "@/lib/trpc/server"
|
||||
|
||||
import {
|
||||
CalendarIcon,
|
||||
@@ -7,14 +8,13 @@ import {
|
||||
HouseIcon,
|
||||
PhoneIcon,
|
||||
} from "@/components/Icons"
|
||||
import Container from "./Container"
|
||||
import { countries } from "@/components/TempDesignSystem/Form/Country/countries"
|
||||
|
||||
import Field from "../Field"
|
||||
import Container from "./Container"
|
||||
|
||||
import styles from "./profile.module.css"
|
||||
|
||||
import { serverClient } from "@/lib/trpc/server"
|
||||
import { dt } from "@/lib/dt"
|
||||
|
||||
export default async function Profile() {
|
||||
const user = await serverClient().user.get()
|
||||
const countryName = countries.find(
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
"use client"
|
||||
import { useController, useFormContext } from "react-hook-form"
|
||||
import { ErrorMessage } from "@hookform/error-message"
|
||||
import { useRef } from "react"
|
||||
|
||||
import { _ } from "@/lib/translation"
|
||||
import { countries } from "./countries"
|
||||
|
||||
import {
|
||||
Button,
|
||||
ComboBox,
|
||||
FieldError,
|
||||
Input,
|
||||
type Key,
|
||||
ListBox,
|
||||
ListBoxItem,
|
||||
Popover,
|
||||
type Key,
|
||||
} from "react-aria-components"
|
||||
import { ErrorMessage } from "@hookform/error-message"
|
||||
import { useController, useFormContext } from "react-hook-form"
|
||||
|
||||
import { _ } from "@/lib/translation"
|
||||
|
||||
import SelectChevron from "../SelectChevron"
|
||||
import { countries } from "./countries"
|
||||
|
||||
import styles from "./country.module.css"
|
||||
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
"use client"
|
||||
import { useRef } from "react"
|
||||
|
||||
import {
|
||||
Button,
|
||||
type Key,
|
||||
Label,
|
||||
ListBox,
|
||||
ListBoxItem,
|
||||
Popover,
|
||||
Select as ReactAriaSelect,
|
||||
SelectValue,
|
||||
type Key,
|
||||
} from "react-aria-components"
|
||||
|
||||
import SelectChevron from "../../SelectChevron"
|
||||
|
||||
import styles from "./select.module.css"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { Control, RegisterOptions } from "react-hook-form"
|
||||
|
||||
import type { EditProfileSchema } from "@/components/MyProfile/Profile/Edit/Form/schema"
|
||||
|
||||
export interface DateProps
|
||||
|
||||
@@ -1,25 +1,27 @@
|
||||
"use client"
|
||||
import { parseDate } from "@internationalized/date"
|
||||
import { useController, useFormContext, useWatch } from "react-hook-form"
|
||||
|
||||
import { _ } from "@/lib/translation"
|
||||
import { dt } from "@/lib/dt"
|
||||
import { rangeArray } from "@/utils/rangeArray"
|
||||
|
||||
import {
|
||||
DateInput,
|
||||
DatePicker,
|
||||
DateSegment,
|
||||
Group,
|
||||
} from "react-aria-components"
|
||||
import { useController, useFormContext, useWatch } from "react-hook-form"
|
||||
|
||||
import { dt } from "@/lib/dt"
|
||||
import { _ } from "@/lib/translation"
|
||||
|
||||
import { rangeArray } from "@/utils/rangeArray"
|
||||
|
||||
import { DateName } from "./Select/select"
|
||||
import Select from "./Select"
|
||||
|
||||
import styles from "./date.module.css"
|
||||
|
||||
import { DateName } from "./Select/select"
|
||||
import type { DateProps } from "./date"
|
||||
import type { Key } from "react-aria-components"
|
||||
|
||||
import type { DateProps } from "./date"
|
||||
|
||||
/** TODO: Get selecting with Enter-key to work */
|
||||
export default function DateSelect({
|
||||
control,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { FieldValuesFromFieldErrors } from "@hookform/error-message"
|
||||
import type { FieldValuesFromFieldErrors } from "@hookform/error-message"
|
||||
import type {
|
||||
FieldErrors,
|
||||
FieldName,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
"use client"
|
||||
import { Input as AriaInput, TextField } from "react-aria-components"
|
||||
import { useController } from "react-hook-form"
|
||||
|
||||
import ErrorMessage from "@/components/TempDesignSystem/Form/ErrorMessage"
|
||||
import { Input as AriaInput, TextField } from "react-aria-components"
|
||||
|
||||
import styles from "./input.module.css"
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { EditProfileSchema } from "@/components/MyProfile/Profile/Edit/Form/schema"
|
||||
import { Control, RegisterOptions } from "react-hook-form"
|
||||
|
||||
import { EditProfileSchema } from "@/components/MyProfile/Profile/Edit/Form/schema"
|
||||
|
||||
export interface InputProps
|
||||
extends React.InputHTMLAttributes<HTMLInputElement> {
|
||||
control: Control<EditProfileSchema>
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
"use client"
|
||||
import "react-international-phone/style.css"
|
||||
import { useController, useFormContext, useWatch } from "react-hook-form"
|
||||
|
||||
import { useCallback, useEffect, useRef } from "react"
|
||||
import { useController, useFormContext, useWatch } from "react-hook-form"
|
||||
import { defaultCountries, getCountry } from "react-international-phone"
|
||||
import { PhoneInput, type PhoneInputRefType } from "react-international-phone"
|
||||
|
||||
import ErrorMessage from "@/components/TempDesignSystem/Form/ErrorMessage"
|
||||
import { PhoneInput, type PhoneInputRefType } from "react-international-phone"
|
||||
|
||||
import styles from "./phone.module.css"
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
"use client"
|
||||
import NextLink from "next/link"
|
||||
import { usePathname } from "next/navigation"
|
||||
|
||||
import { linkVariants } from "./variants"
|
||||
|
||||
import NextLink from "next/link"
|
||||
|
||||
import type { LinkProps } from "./link"
|
||||
|
||||
export default function Link({
|
||||
|
||||
Reference in New Issue
Block a user