1
0
Fork 0

refactor: use @ prefixed imports

This allows to get rid of the path `./../` and use a common way to import components or anything from `src/` directory.

IMHO this improves readability by a mile.
This commit is contained in:
Vojtěch Mareš 2022-12-03 19:30:30 +01:00
parent bcc4219124
commit 8280fb59d6
Signed by: vojtech.mares
GPG key ID: C6827B976F17240D
9 changed files with 25 additions and 25 deletions

View file

@ -1,7 +1,7 @@
import Image from 'next/image'
import { Button } from './../components/Button'
import { Container } from './../components/Container'
import { Button } from '@/components/Button'
import { Container } from '@/components/Container'
import backgroundImage from '@/images/background-call-to-action.jpg'
export function CallToAction() {

View file

@ -1,6 +1,6 @@
import Image from 'next/image'
import { Container } from './../components/Container'
import { Container } from '@/components/Container'
import backgroundImage from '@/images/background-faqs.jpg'
const faqs = [

View file

@ -1,9 +1,9 @@
import Link from 'next/link'
import { Container } from './../components/Container'
import { Container } from '@/components/Container'
// import { Logo } from '@/components/Logo'
import { NavLink } from './../components/NavLink'
import { Button } from './../components/Button'
// import { NavLink } from '@/components/NavLink'
import { Button } from '@/components/Button'
export function Footer() {
return (

View file

@ -1,8 +1,8 @@
import Link from "next/link"
import { NavLink } from "./NavLink";
import { Container } from "./Container"
import { Button } from "./Button"
import { NavLink } from "@/components/NavLink";
import { Container } from "@/components/Container"
import { Button } from "@/components/Button"
export function Header() {
return (

View file

@ -1,5 +1,5 @@
import { Button } from './Button'
import { Container } from './Container'
import { Button } from '@/components/Button'
import { Container } from '@/components/Container'
export function Hero() {
return (

View file

@ -1,7 +1,7 @@
import clsx from 'clsx'
import { Button } from './../components/Button'
import { Container } from './../components/Container'
import { Button } from '@/components/Button'
import { Container } from '@/components/Container'
type SwirlyDoodleProps = { className: string }

View file

@ -3,7 +3,7 @@ import Image from 'next/image'
import { Tab } from '@headlessui/react'
import clsx from 'clsx'
import { Container } from './../components/Container'
import { Container } from '@/components/Container'
import backgroundImage from '@/images/background-features.jpg'
import screenshotExpenses from '@/images/screenshots/contacts.png'
import screenshotPayroll from '@/images/screenshots/contacts.png'

View file

@ -3,7 +3,7 @@ import Image, { StaticImageData } from 'next/image'
import { Tab } from '@headlessui/react'
import clsx from 'clsx'
import { Container } from './Container'
import { Container } from '@/components/Container'
import screenshotContacts from '@/images/screenshots/contacts.png'

View file

@ -1,15 +1,15 @@
import Head from "next/head";
import { Header } from "./../components/Header"
import { Hero } from "./../components/Hero"
import { CallToAction } from './../components/CallToAction'
import { Faqs } from './../components/Faqs'
import { Footer } from './../components/Footer'
import { Pricing } from './../components/Pricing'
import { PrimaryFeatures } from './../components/PrimaryFeatures'
import { TechStack } from './../components/TechStack'
import { Testimonials } from './../components/Testimonials'
import { Environment } from './../components/Environment'
import { Header } from "@/components/Header"
import { Hero } from "@/components/Hero"
import { CallToAction } from '@/components/CallToAction'
import { Faqs } from '@/components/Faqs'
import { Footer } from '@/components/Footer'
import { Pricing } from '@/components/Pricing'
import { PrimaryFeatures } from '@/components/PrimaryFeatures'
import { TechStack } from '@/components/TechStack'
import { Testimonials } from '@/components/Testimonials'
import { Environment } from '@/components/Environment'
export default function Home() {
return (