Skip to content

Commit 9f77f4f

Browse files
committed
refactor: update imports
Signed-off-by: Adam Setch <adam.setch@outlook.com>
1 parent 166f1b3 commit 9f77f4f

File tree

8 files changed

+32
-25
lines changed

8 files changed

+32
-25
lines changed

src/components/Hero.astro

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
import { Image } from "astro:assets";
3-
import Logo from "./Logo.astro";
43
4+
import notifications from "~/assets/notifications.png";
5+
import LatestRelease from "~/components/LatestRelease.astro";
6+
import Logo from "~/components/Logo.astro";
57
import { siteMetadata } from "~/constants";
6-
import notifications from "../assets/notifications.png";
7-
import LatestRelease from "./LatestRelease.astro";
88
---
99

1010
<div class="bg-gray-100">
@@ -16,7 +16,9 @@ import LatestRelease from "./LatestRelease.astro";
1616

1717
<h1 class="text-2xl lg:text-4xl font-semibold">{siteMetadata.title}</h1>
1818

19-
<h2 class="mt-2 text-xl lg:text-2xl font-light">{siteMetadata.description}.</h2>
19+
<h2 class="mt-2 text-xl lg:text-2xl font-light">
20+
{siteMetadata.description}.
21+
</h2>
2022

2123
<LatestRelease />
2224
</div>

src/components/LatestRelease.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
import { Icon } from "astro-icon/components";
3-
import { format, parseISO } from "date-fns";
3+
import { format } from "date-fns";
44
import { Octokit } from "octokit";
55
66
import { URLs, siteMetadata } from "~/constants";
@@ -9,7 +9,7 @@ import type {
99
DownloadLinks,
1010
HeroData,
1111
ReleaseAsset,
12-
} from "../types";
12+
} from "~/types";
1313
1414
const octokit = new Octokit();
1515

src/components/Navbar.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2+
import GitHubRepo from "~/components/GitHubRepo.astro";
3+
import Logo from "~/components/Logo.astro";
24
import { siteMetadata } from "~/constants";
3-
import GitHubRepo from "./GitHubRepo.astro";
4-
import Logo from "./Logo.astro";
55
66
const { currentPathname } = Astro.props;
77
const isHomepage = currentPathname === "/";

src/layouts/Layout.astro

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
import Footer from "../components/Footer.astro";
3-
import GoogleAnalytics from "../components/GoogleAnalytics.astro";
4-
import Navbar from "../components/Navbar.astro";
5-
import "../styles/app.css";
2+
import Footer from "~/components/Footer.astro";
3+
import GoogleAnalytics from "~/components/GoogleAnalytics.astro";
4+
import Navbar from "~/components/Navbar.astro";
65
7-
import { siteMetadata } from "../constants";
6+
import "~/styles/app.css";
7+
import { siteMetadata } from "~/constants";
88
99
export interface Props {
1010
title: string;

src/pages/404.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
import Layout from "../layouts/Layout.astro";
2+
import Layout from "~/layouts/Layout.astro";
33
---
44

55
<Layout title="Page Not Found">

src/pages/callback.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
import Layout from "../layouts/Layout.astro";
2+
import Layout from "~/layouts/Layout.astro";
33
---
44

55
<Layout title="Callback">

src/pages/faq.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
import { FaqAccordion } from "../components/solid/FaqAccordion";
3-
import Layout from "../layouts/Layout.astro";
2+
import { FaqAccordion } from "~/components/solid/FaqAccordion";
3+
import Layout from "~/layouts/Layout.astro";
44
---
55

66
<Layout title="Frequently Asked Questions">

src/pages/index.astro

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
import { Icon } from "astro-icon/components";
33
4+
import Hero from "~/components/Hero.astro";
45
import { openSourceLibs } from "~/icons/icons";
5-
import Hero from "../components/Hero.astro";
6-
import Layout from "../layouts/Layout.astro";
7-
import SectionRow from "../layouts/SectionRow.astro";
6+
import Layout from "~/layouts/Layout.astro";
7+
import SectionRow from "~/layouts/SectionRow.astro";
88
---
99

1010
<Layout title="GitHub notifications on your menu bar">
@@ -15,17 +15,17 @@ import SectionRow from "../layouts/SectionRow.astro";
1515
title="All your GitHub notifications on your desktop. Nice & Easy."
1616
description="<p>Ever got lost with GitHub notifications? Too many emails?</p><br /><p>Gitify is all about making your life easier. Sitting on your menu bar, it informs you for any GitHub notifications without being annoying and of course without adverts. It just gets the job done.</p><br /><p>Works with GitHub Cloud and GitHub Enterprise Server. You can even connect multiple accounts.</p>"
1717
screenshot={{
18-
path: 'all-read',
19-
alt: 'Screenshot when there are no notifications read',
18+
path: "all-read",
19+
alt: "Screenshot when there are no notifications read",
2020
}}
2121
/>
2222

2323
<SectionRow
2424
title="It's about your preferences."
2525
description="<p>Gitify will notify you every time you receive a notification by playing a sound (not an annoying one - it's a promise), showing native mac OS notifications or by just turning its tray icon to green.</p><br /><p>It is not there to interupt your workflow or distract you, you can customize your settings to your preference.</p>"
2626
screenshot={{
27-
path: 'settings',
28-
alt: 'Your Preferences, Settings',
27+
path: "settings",
28+
alt: "Your Preferences, Settings",
2929
}}
3030
isDark
3131
isReversed
@@ -40,7 +40,12 @@ import SectionRow from "../layouts/SectionRow.astro";
4040
openSourceLibs.map((item) => (
4141
<div class="hover:bg-gray-200 p-2 m-2 rounded-lg">
4242
<a href={item.link} target="_blank" rel="noopener noreferrer">
43-
<Icon name={item.svg} title={item.name} size={32} class="w-8 sm:w-12" />
43+
<Icon
44+
name={item.svg}
45+
title={item.name}
46+
size={32}
47+
class="w-8 sm:w-12"
48+
/>
4449
</a>
4550
</div>
4651
))

0 commit comments

Comments
 (0)