diff --git a/.github/workflows/pull-request-jobs.yaml b/.github/workflows/pull-request-jobs.yaml
index 21c7757..e5ed58c 100644
--- a/.github/workflows/pull-request-jobs.yaml
+++ b/.github/workflows/pull-request-jobs.yaml
@@ -9,7 +9,7 @@ concurrency:
jobs:
check:
- name: Run check jobs
+ name: Check Types
runs-on: ubuntu-latest
steps:
@@ -29,8 +29,8 @@ jobs:
- name: Setup environment variables
uses: Firenza/secrets-to-env@v1.3.0
with:
- secrets: ${{ toJSON(secrets) }}
- secret_filter_regex: SPOTIFY_*
+ secrets: ${{ toJSON(secrets) }}
+ secret_filter_regex: SPOTIFY_*
- name: Install dependencies
run: pnpm install
@@ -38,8 +38,8 @@ jobs:
- name: Run checks for repo
run: pnpm check
- test:
- name: Run test jobs
+ lint:
+ name: Lint Code
runs-on: ubuntu-latest
steps:
@@ -52,13 +52,33 @@ jobs:
version: 9
- name: Install Node
- uses: actions/setup-node@v3
+ uses: actions/setup-node@v4
+
+ - name: Install dependencies
+ run: pnpm install
+ timeout-minutes: 2
+
+ - name: Run linting for repo
+ run: pnpm lint
+ format:
+ name: Check Formatting
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout branch
+ uses: actions/checkout@v4
+
+ - name: Install pnpm
+ uses: pnpm/action-setup@v3
with:
- node-version: 20
+ version: 9
+
+ - name: Install Node
+ uses: actions/setup-node@v4
- name: Install dependencies
run: pnpm install
timeout-minutes: 2
- - name: Run tests for repo
- run: pnpm test
+ - name: Run format checks for repo
+ run: pnpm format:check
diff --git a/.husky/pre-commit b/.husky/pre-commit
new file mode 100644
index 0000000..cb2c84d
--- /dev/null
+++ b/.husky/pre-commit
@@ -0,0 +1 @@
+pnpm lint-staged
diff --git a/.oxlint.json b/.oxlint.json
new file mode 100644
index 0000000..eda782b
--- /dev/null
+++ b/.oxlint.json
@@ -0,0 +1,6 @@
+{
+ "$schema": "./node_modules/oxlint/configuration_schema.json",
+ "ignorePatterns": [
+ "node_modules"
+ ]
+}
diff --git a/README.md b/README.md
index 5c61f75..031d635 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,12 @@
-# `fi.dev`
+# `fi`
+
Monorepo holding my procrastination and hopefully some actual merged code.
## 🧞 Commands
-| Command | Action |
-| :------------------------ | :----------------------------------------------- |
-| `pnpm install` | Installs workspace dependencies |
-| `pnpm dev` | Run workspace dev tasks |
-| `pnpm build` | Run workspace build tasks |
-| `pnpm @home` | Alias to home app scripts (@fi.dev/home) |
+
+| Command | Action |
+| :------------- | :----------------------------------- |
+| `pnpm install` | Installs workspace dependencies |
+| `pnpm dev` | Run workspace dev tasks |
+| `pnpm build` | Run workspace build tasks |
+| `pnpm @home` | Alias to home app scripts (@fi/home) |
diff --git a/apps/home/README.md b/apps/home/README.md
index 782689d..0fcec49 100644
--- a/apps/home/README.md
+++ b/apps/home/README.md
@@ -1,12 +1,14 @@
-# `fi.dev` home
+# `fi` home
+
Home application containing the blog and other goodies
## 🧞 Commands
-| Command | Action |
-| :------------------------ | :----------------------------------------------- |
-| `pnpm install` | Installs dependencies |
-| `pnpm dev` | Starts local dev server at `localhost:3000` |
-| `pnpm build` | Build your production site to `./dist/` |
-| `pnpm preview` | Preview your build locally, before deploying |
-| `pnpm astro ...` | Run CLI commands like `astro add`, `astro check` |
-| `pnpm astro -- --help` | Get help using the Astro CLI |
+
+| Command | Action |
+| :--------------------- | :----------------------------------------------- |
+| `pnpm install` | Installs dependencies |
+| `pnpm dev` | Starts local dev server at `localhost:3000` |
+| `pnpm build` | Build your production site to `./dist/` |
+| `pnpm preview` | Preview your build locally, before deploying |
+| `pnpm astro ...` | Run CLI commands like `astro add`, `astro check` |
+| `pnpm astro -- --help` | Get help using the Astro CLI |
diff --git a/apps/home/astro.config.ts b/apps/home/astro.config.ts
index 9fbcdc8..17e4fdc 100644
--- a/apps/home/astro.config.ts
+++ b/apps/home/astro.config.ts
@@ -1,5 +1,5 @@
-import { loadEnv } from "vite";
import { defineConfig } from "astro/config";
+import { loadEnv } from "vite";
import tailwind from "@astrojs/tailwind";
diff --git a/apps/home/biome.jsonc b/apps/home/biome.jsonc
deleted file mode 100644
index 6619d33..0000000
--- a/apps/home/biome.jsonc
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
- "extends": ["../../biome.jsonc"],
- "linter": {
- "enabled": false
- }
-}
diff --git a/apps/home/cms.config.ts b/apps/home/cms.config.ts
index cc66ad2..5798ae1 100644
--- a/apps/home/cms.config.ts
+++ b/apps/home/cms.config.ts
@@ -2,15 +2,13 @@ import { exec } from "node:child_process";
import "dotenv/config";
-import { defineContentConfig } from "@fi.dev/content";
+import { defineContentConfig } from "@fi/content";
import { musicPost } from "@/libraries/posts/music";
-import { onPublishPosts } from "@/libraries/posts/onPublish";
export default defineContentConfig({
dir: "./src/content",
entries: [musicPost],
- onPublish: onPublishPosts,
hooks: [
{
events: ["create"],
diff --git a/apps/home/drizzle.config.ts b/apps/home/drizzle.config.ts
deleted file mode 100644
index fa9cd80..0000000
--- a/apps/home/drizzle.config.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import "dotenv/config";
-
-import { defineConfig } from "drizzle-kit";
-
-export default defineConfig({
- schema: "./src/libraries/database/database.tables.ts",
- out: "./migrations",
- dialect: "postgresql",
- dbCredentials: {
- url: process.env.NEON_DATABASE_URL!,
- },
-});
diff --git a/apps/home/package.json b/apps/home/package.json
index 3d2521f..233477b 100644
--- a/apps/home/package.json
+++ b/apps/home/package.json
@@ -1,5 +1,5 @@
{
- "name": "@fi.dev/home",
+ "name": "@fi/home",
"type": "module",
"version": "0.0.1",
"scripts": {
@@ -7,11 +7,10 @@
"start": "astro dev",
"build": "astro check && astro build",
"preview": "astro preview",
+ "lint": "oxlint",
"check": "astro check",
- "test": "vitest",
"astro": "astro",
"astro:upgrade": "pnpm dlx @astrojs/upgrade",
- "drizzle": "drizzle-kit",
"node": "tsx",
"content": "pnpm node ./cms.config.ts",
"sync:icons": "pnpm node ./scripts/sync-svg-sprites.ts",
@@ -23,14 +22,13 @@
"@astrojs/solid-js": "^5.0.0",
"@astrojs/tailwind": "^5.1.3",
"@astrojs/vercel": "^8.0.0",
- "@fi.dev/content": "workspace:*",
- "@fi.dev/theme": "workspace:*",
- "@fi.dev/typescript": "workspace:*",
+ "@fi/content": "workspace:*",
+ "@fi/theme": "workspace:*",
+ "@fi/typescript": "workspace:*",
"@fontsource-variable/nunito": "^5.1.0",
"@fontsource-variable/space-grotesk": "^5.1.0",
"@kobalte/core": "^0.13.7",
"@kobalte/tailwindcss": "^0.9.0",
- "@neondatabase/serverless": "^0.10.1",
"@solid-primitives/intersection-observer": "^2.1.6",
"@tanstack/solid-query": "^5.56.2",
"@tanstack/solid-query-devtools": "^5.56.2",
@@ -39,8 +37,6 @@
"astro": "^5.0.2",
"astro-compressor": "^1.0.0",
"class-variance-authority": "^0.7.0",
- "drizzle-orm": "^0.35.3",
- "drizzle-zod": "^0.5.1",
"hast-util-from-html": "^2.0.3",
"html-to-text": "^9.0.5",
"qss": "^3.0.0",
@@ -53,7 +49,6 @@
"@astrojs/check": "^0.9.4",
"@types/hast": "^3.0.4",
"dotenv": "^16.4.5",
- "drizzle-kit": "^0.26.2",
"open": "^10.1.0",
"rehype-stringify": "^10.0.1",
"remark-parse": "^11.0.0",
diff --git a/apps/home/scripts/spotify-auth-code-flow.ts b/apps/home/scripts/spotify-auth-code-flow.ts
index 3c5feb3..8318c95 100644
--- a/apps/home/scripts/spotify-auth-code-flow.ts
+++ b/apps/home/scripts/spotify-auth-code-flow.ts
@@ -2,8 +2,8 @@ import "dotenv/config";
import open from "open";
-import { getSpotifyEnv } from "@/libraries/schemas";
import { createSpotifyClient } from "@/libraries/clients";
+import { getSpotifyEnv } from "@/libraries/schemas";
const startSpotifyAuthFlow = async () => {
console.log("Starting Spotify authorisation code flow");
diff --git a/apps/home/scripts/sync-music-post-entries-db.ts b/apps/home/scripts/sync-music-post-entries-db.ts
deleted file mode 100644
index b4a301e..0000000
--- a/apps/home/scripts/sync-music-post-entries-db.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-import path from "node:path";
-
-import "dotenv/config";
-
-import { getPostsPathsFromRootDir } from "@fi.dev/content";
-
-import { client } from "../src/libraries/database";
-
-const syncMusicPostEntriesDatabase = async () => {
- const paths = getPostsPathsFromRootDir("./src/content/music").filter((path) =>
- path.includes(".md"),
- );
-
- const postsToPublish = paths.map((entryPath) => {
- const splitPath = entryPath.split("/");
-
- const slug = path.basename(entryPath).split(".")[0];
- const date = splitPath.at(-2);
-
- return { slug, publishDate: new Date(date || "") };
- });
-
- client.post.handlePostPublishing(postsToPublish);
- console.log(`Handled publishing of ${postsToPublish.length} posts`);
-};
-
-syncMusicPostEntriesDatabase();
diff --git a/apps/home/scripts/sync-music-post-entries-local.ts b/apps/home/scripts/sync-music-post-entries-local.ts
index 9ac169e..d405d2b 100644
--- a/apps/home/scripts/sync-music-post-entries-local.ts
+++ b/apps/home/scripts/sync-music-post-entries-local.ts
@@ -1,10 +1,10 @@
import fs from "node:fs";
-import { getPostsPathsFromRootDir, matter } from "@fi.dev/content";
+import { getPostsPathsFromRootDir, matter } from "@fi/content";
const syncMusicPostEntriesLocal = () => {
const paths = getPostsPathsFromRootDir("./src/content/music").filter((path) =>
- path.includes(".md"),
+ path.includes(".md")
);
for (const path of paths) {
diff --git a/apps/home/src/components/astro/ContentDisplay.astro b/apps/home/src/components/astro/ContentDisplay.astro
index bebcaf0..e0e2c3c 100644
--- a/apps/home/src/components/astro/ContentDisplay.astro
+++ b/apps/home/src/components/astro/ContentDisplay.astro
@@ -1,8 +1,8 @@
---
-import { render, type CollectionEntry } from "astro:content";
+import { type CollectionEntry, render } from "astro:content";
import { twMerge } from "tailwind-merge";
-import { getEnvironmentVariable } from "@fi.dev/typescript";
+import { getEnvironmentVariable } from "@fi/typescript";
import { compileOutputWithPlugins } from "@/libraries/plugins";
import type { CollectionKey } from "astro:content";
@@ -31,40 +31,30 @@ const output = await (async () => {
})();
---
- {
- typeof output === "string" ? (
-
- ) : (
-
- )
- }
+ {typeof output === "string" ? : }
-
+ link.setAttribute("target", "_blank");
+ }
+});
+
diff --git a/apps/home/src/components/astro/InlineSprites.astro b/apps/home/src/components/astro/InlineSprites.astro
index 070fdc2..defece2 100644
--- a/apps/home/src/components/astro/InlineSprites.astro
+++ b/apps/home/src/components/astro/InlineSprites.astro
@@ -1,164 +1,104 @@
-
+
diff --git a/apps/home/src/components/core/display/Icon.tsx b/apps/home/src/components/core/display/Icon.tsx
index 7938919..88c4a3e 100644
--- a/apps/home/src/components/core/display/Icon.tsx
+++ b/apps/home/src/components/core/display/Icon.tsx
@@ -1,4 +1,4 @@
-import { splitProps, type JSX } from "solid-js";
+import { type JSX, splitProps } from "solid-js";
import { ICONS_SPRITES } from "@/components/core/display/Icon.data";
@@ -7,7 +7,9 @@ export const Icon = (props: IconProps) => {
if (!ICONS_SPRITES.includes(capturedProps.name)) {
throw new Error(
- `Unsupported sprite - got ${capturedProps.name}\n Supported sprites: ${ICONS_SPRITES.join("\n")}`,
+ `Unsupported sprite - got ${capturedProps.name}\n Supported sprites: ${
+ ICONS_SPRITES.join("\n")
+ }`,
);
}
diff --git a/apps/home/src/components/core/display/Popover.tsx b/apps/home/src/components/core/display/Popover.tsx
index 7477b06..30e7540 100644
--- a/apps/home/src/components/core/display/Popover.tsx
+++ b/apps/home/src/components/core/display/Popover.tsx
@@ -1,8 +1,5 @@
-import { Show, type JSX } from "solid-js";
-import {
- Popover as KobaltePopover,
- type PopoverRootProps,
-} from "@kobalte/core/popover";
+import { Popover as KobaltePopover, type PopoverRootProps } from "@kobalte/core/popover";
+import { type JSX, Show } from "solid-js";
import { twMerge } from "tailwind-merge";
export const Popover = (props: PopoverProps) => {
diff --git a/apps/home/src/components/core/display/Tooltip.tsx b/apps/home/src/components/core/display/Tooltip.tsx
index 8c4495e..6ea5456 100644
--- a/apps/home/src/components/core/display/Tooltip.tsx
+++ b/apps/home/src/components/core/display/Tooltip.tsx
@@ -1,9 +1,6 @@
+import { Tooltip as KolbalteTooltip, type TooltipRootProps } from "@kobalte/core/tooltip";
import type { JSX } from "solid-js";
import { twMerge } from "tailwind-merge";
-import {
- Tooltip as KolbalteTooltip,
- type TooltipRootProps,
-} from "@kobalte/core/tooltip";
export const Tooltip = (props: TooltipProps) => {
return (
diff --git a/apps/home/src/components/core/inputs/Button.tsx b/apps/home/src/components/core/inputs/Button.tsx
index 07876e3..76baff6 100644
--- a/apps/home/src/components/core/inputs/Button.tsx
+++ b/apps/home/src/components/core/inputs/Button.tsx
@@ -1,6 +1,6 @@
+import type { VariantProps } from "class-variance-authority";
import type { JSX } from "solid-js";
import { twMerge } from "tailwind-merge";
-import type { VariantProps } from "class-variance-authority";
import { ButtonConfig } from "@/components/core/inputs/Button.config";
import { LinkConfig } from "@/components/core/navigation/Link.config";
@@ -27,13 +27,12 @@ const BaseButton = (props: ButtonProps) => {
};
export const Button = Object.assign(BaseButton, {
- Link: (props: Omit
) => (
-
- ),
+ Link: (props: Omit) => ,
});
-export type ButtonProps = JSX.ButtonHTMLAttributes &
- (
+export type ButtonProps =
+ & JSX.ButtonHTMLAttributes
+ & (
| ({ nature?: "button" } & VariantProps)
| ({ nature?: "link" } & VariantProps)
);
diff --git a/apps/home/src/components/core/layouts/Container.tsx b/apps/home/src/components/core/layouts/Container.tsx
index 6839d5f..acb8a3a 100644
--- a/apps/home/src/components/core/layouts/Container.tsx
+++ b/apps/home/src/components/core/layouts/Container.tsx
@@ -1,5 +1,5 @@
-import { Dynamic } from "solid-js/web";
import type { JSX, ValidComponent } from "solid-js";
+import { Dynamic } from "solid-js/web";
import { twMerge } from "tailwind-merge";
diff --git a/apps/home/src/components/core/layouts/Grid.tsx b/apps/home/src/components/core/layouts/Grid.tsx
index e01c5c2..93265ce 100644
--- a/apps/home/src/components/core/layouts/Grid.tsx
+++ b/apps/home/src/components/core/layouts/Grid.tsx
@@ -1,6 +1,6 @@
-import { Dynamic } from "solid-js/web";
import type { ValidComponent } from "solid-js";
import type { JSX } from "solid-js/jsx-runtime";
+import { Dynamic } from "solid-js/web";
import { twMerge } from "tailwind-merge";
diff --git a/apps/home/src/components/core/navigation/Link.tsx b/apps/home/src/components/core/navigation/Link.tsx
index f9c5650..63da860 100644
--- a/apps/home/src/components/core/navigation/Link.tsx
+++ b/apps/home/src/components/core/navigation/Link.tsx
@@ -1,6 +1,6 @@
+import type { VariantProps } from "class-variance-authority";
import type { JSX } from "solid-js";
import { twMerge } from "tailwind-merge";
-import type { VariantProps } from "class-variance-authority";
import { ButtonConfig } from "@/components/core/inputs/Button.config";
import { LinkConfig } from "@/components/core/navigation/Link.config";
@@ -27,13 +27,12 @@ const BaseLink = (props: LinkProps) => {
};
export const Link = Object.assign(BaseLink, {
- Button: (props: Omit) => (
-
- ),
+ Button: (props: Omit) => ,
});
-export type LinkProps = JSX.AnchorHTMLAttributes &
- (
+export type LinkProps =
+ & JSX.AnchorHTMLAttributes
+ & (
| ({ nature?: "button" } & VariantProps)
| ({ nature?: "link" } & VariantProps)
);
diff --git a/apps/home/src/components/core/utilities/Passthrough.tsx b/apps/home/src/components/core/utilities/Passthrough.tsx
index b4126af..8f7f5b8 100644
--- a/apps/home/src/components/core/utilities/Passthrough.tsx
+++ b/apps/home/src/components/core/utilities/Passthrough.tsx
@@ -1,4 +1,4 @@
-import { Show, type JSX } from "solid-js";
+import { type JSX, Show } from "solid-js";
export const Passthrough = (props: PassthroughProps) => {
return (
diff --git a/apps/home/src/components/interfaces/admin/SubscriberForm.tsx b/apps/home/src/components/interfaces/admin/SubscriberForm.tsx
index c0a8503..7316dab 100644
--- a/apps/home/src/components/interfaces/admin/SubscriberForm.tsx
+++ b/apps/home/src/components/interfaces/admin/SubscriberForm.tsx
@@ -1,16 +1,16 @@
-import { createSignal, onCleanup, Show, type JSX } from "solid-js";
import { createMutation } from "@tanstack/solid-query";
import { Image } from "@unpic/solid";
+import { createSignal, type JSX, onCleanup, Show } from "solid-js";
import { TheHavanaStreetsJPG } from "@/assets";
+import { SubscribeToWebsiteRoute } from "@/libraries/api";
import { request } from "@/libraries/clients";
import type { InferDTOS } from "@/libraries/types";
-import { SubscribeToWebsiteRoute } from "@/libraries/api";
+import { Button, Icon } from "@/components/core";
import { withQueryProvider } from "@/components/providers";
import { twMerge } from "tailwind-merge";
-import { Button, Icon } from "@/components/core";
const INITIAL_FIELDS = { forename: "", email: "" };
@@ -103,9 +103,7 @@ export const SubscriberForm = withQueryProvider(
class="border-none flex-grow rounded-lg"
placeholder="Your first name"
value={fields().forename}
- onInput={(event) =>
- editFields({ forename: event.currentTarget.value })
- }
+ onInput={(event) => editFields({ forename: event.currentTarget.value })}
required
/>
@@ -120,9 +118,7 @@ export const SubscriberForm = withQueryProvider(
class="border-none flex-grow rounded-lg"
placeholder="Your email address"
value={fields().email}
- onInput={(event) =>
- editFields({ email: event.currentTarget.value })
- }
+ onInput={(event) => editFields({ email: event.currentTarget.value })}
required
/>
diff --git a/apps/home/src/components/interfaces/layouts/SocialLinksLayout.tsx b/apps/home/src/components/interfaces/layouts/SocialLinksLayout.tsx
index c48f19b..6768359 100644
--- a/apps/home/src/components/interfaces/layouts/SocialLinksLayout.tsx
+++ b/apps/home/src/components/interfaces/layouts/SocialLinksLayout.tsx
@@ -2,7 +2,7 @@ import { twMerge } from "tailwind-merge";
import { AppManifest } from "@/configs";
-import { Link, Icon } from "@/components/core";
+import { Icon, Link } from "@/components/core";
export const SocialLinksLayout = (props: SocialLinksLayoutProps) => {
return (
diff --git a/apps/home/src/components/interfaces/music/MusicArtistEntry.tsx b/apps/home/src/components/interfaces/music/MusicArtistEntry.tsx
index 4a5f7b4..96104bf 100644
--- a/apps/home/src/components/interfaces/music/MusicArtistEntry.tsx
+++ b/apps/home/src/components/interfaces/music/MusicArtistEntry.tsx
@@ -3,8 +3,8 @@ import { twJoin } from "tailwind-merge";
import type { MusicArtistSchema } from "@/libraries/schemas";
-import { Passthrough } from "@/components/core";
import { ProjectPlaceholderPNG } from "@/assets";
+import { Passthrough } from "@/components/core";
import { AppManifest } from "@/configs";
export const MusicArtistEntry = (props: MusicArtistEntryProps) => {
@@ -25,11 +25,9 @@ export const MusicArtistEntry = (props: MusicArtistEntryProps) => {
{!!props.artist?.covers.length && (
{
class="text-gray-500 font-light text-sm truncate"
title={props.artist?.genres?.join(", ") || undefined}
>
- {props.artist?.genres.length
- ? props.artist?.genres.join(", ")
- : "no genres listed"}
+ {props.artist?.genres.length ?
+ props.artist?.genres.join(", ") :
+ "no genres listed"}
{
remaining: !data.remaining ? data.remaining : data.remaining + 1000,
}));
}, 1000);
- const songEndTimeout = setTimeout(() => {
- queryClient.invalidateQueries({ queryKey: currentPlayingQueryKey });
- }, currentPlayingQuery.data?.duration -
- currentPlayingQuery.data.remaining);
+ const songEndTimeout = setTimeout(
+ () => {
+ queryClient.invalidateQueries({ queryKey: currentPlayingQueryKey });
+ },
+ currentPlayingQuery.data?.duration -
+ currentPlayingQuery.data.remaining,
+ );
onCleanup(() => {
- clearInterval(songProgressInterval);
+ // FIXME for some reason this is needed here
+ clearInterval(songProgressInterval as NodeJS.Timeout);
clearTimeout(songEndTimeout);
});
}
@@ -135,11 +130,9 @@ export const MusicCurrentlyPlayingPane = withQueryProvider(() => {
{
@@ -205,9 +200,7 @@ export const MusicCurrentlyPlayingPane = withQueryProvider(() => {
- }
+ fallback={}
>
{(url) => (
{
Check back later
- }
+ fallback={Check back later
}
>
(
diff --git a/apps/home/src/components/interfaces/music/MusicFeelingLuckyButton.tsx b/apps/home/src/components/interfaces/music/MusicFeelingLuckyButton.tsx
index c59580e..1dcff0f 100644
--- a/apps/home/src/components/interfaces/music/MusicFeelingLuckyButton.tsx
+++ b/apps/home/src/components/interfaces/music/MusicFeelingLuckyButton.tsx
@@ -2,11 +2,11 @@ import { createSignal, Show } from "solid-js";
import { AppManifest } from "@/configs";
+import { MusicImFeelingLuckyRoute } from "@/libraries/api";
import { request } from "@/libraries/clients";
import { astroNavigate } from "@/libraries/utilities";
-import { MusicImFeelingLuckyRoute } from "@/libraries/api";
-import { Button, Icon, type ButtonProps } from "@/components/core";
+import { Button, type ButtonProps, Icon } from "@/components/core";
import { twMerge } from "tailwind-merge";
export const MusicFeelingLuckyButton = (
diff --git a/apps/home/src/components/interfaces/music/MusicPostStickyPane.tsx b/apps/home/src/components/interfaces/music/MusicPostStickyPane.tsx
index 3d1edb0..c258d08 100644
--- a/apps/home/src/components/interfaces/music/MusicPostStickyPane.tsx
+++ b/apps/home/src/components/interfaces/music/MusicPostStickyPane.tsx
@@ -1,13 +1,13 @@
-import { Show, For, batch, type JSX } from "solid-js";
+import { batch, For, type JSX, Show } from "solid-js";
import { createStore } from "solid-js/store";
import { twJoin, twMerge } from "tailwind-merge";
-import { useQueryParams } from "@/libraries/hooks";
-import { MusicPostRatingMap } from "@/libraries/constants";
import { FetchMusicPostsRoute } from "@/libraries/api";
+import { MusicPostRatingMap } from "@/libraries/constants";
+import { useQueryParams } from "@/libraries/hooks";
import type { InferDTOS } from "@/libraries/types";
-import { Popover, Select, Button, Icon } from "@/components/core";
+import { Button, Icon, Popover, Select } from "@/components/core";
export const MusicPostStickyPane = (props: MusicPostStickyPaneProps) => {
const [query, setQuery] = useQueryParams(FetchMusicPostsRoute.dtos.query);
@@ -150,11 +150,9 @@ export const MusicPostStickyPane = (props: MusicPostStickyPaneProps) => {
{(level) => (
- {
- MusicPostRatingMap[
- level as keyof typeof MusicPostRatingMap
- ]
- }
+ {MusicPostRatingMap[
+ level as keyof typeof MusicPostRatingMap
+ ]}
)}
@@ -182,9 +180,9 @@ export const MusicPostStickyPane = (props: MusicPostStickyPaneProps) => {
onSubmit={handleSearchSubmission}
class={twJoin(
"flex items-center gap-1 pl-2 flex-grow",
- !configIsDirty() && !configIsClearable()
- ? "rounded-r-lg border-r-0"
- : "border-b md:border-r md:border-b-0 border-slate-200",
+ !configIsDirty() && !configIsClearable() ?
+ "rounded-r-lg border-r-0" :
+ "border-b md:border-r md:border-b-0 border-slate-200",
)}
>
diff --git a/apps/home/src/components/interfaces/navigation/_Footer/BackToTopButton.tsx b/apps/home/src/components/interfaces/navigation/_Footer/BackToTopButton.tsx
index 955af9a..823abfd 100644
--- a/apps/home/src/components/interfaces/navigation/_Footer/BackToTopButton.tsx
+++ b/apps/home/src/components/interfaces/navigation/_Footer/BackToTopButton.tsx
@@ -11,8 +11,7 @@ export const BackToTopButton = () => {
class="font-heading flex items-center gap-1 hover:text-blue-500 transition duration-500"
onClick={goToTop}
>
- Back to top{" "}
-
+ Back to top
);
};
diff --git a/apps/home/src/components/pages/music/[music]/MusicLinksPane.tsx b/apps/home/src/components/pages/music/[music]/MusicLinksPane.tsx
index 9827e96..150b03a 100644
--- a/apps/home/src/components/pages/music/[music]/MusicLinksPane.tsx
+++ b/apps/home/src/components/pages/music/[music]/MusicLinksPane.tsx
@@ -2,7 +2,7 @@ import { Show } from "solid-js";
import type { MusicPostSchema } from "@/libraries/schemas";
-import { Icon, Link, Popover, type IconProps } from "@/components/core";
+import { Icon, type IconProps, Link, Popover } from "@/components/core";
import { AppManifest } from "@/configs";
export const MusicLinksPane = (props: MusicLinksPaneProps) => {
@@ -10,14 +10,14 @@ export const MusicLinksPane = (props: MusicLinksPaneProps) => {
const generateSpotifyLinks = () => {
return {
- ...(firstArtist
- ? {
- artistLink: AppManifest.links.external["spotify:directive"](
- "artist",
- firstArtist.spotifyId,
- ),
- }
- : {}),
+ ...(firstArtist ?
+ {
+ artistLink: AppManifest.links.external["spotify:directive"](
+ "artist",
+ firstArtist.spotifyId,
+ ),
+ } :
+ {}),
musicLink: AppManifest.links.external["spotify:directive"](
props.post.type === "ALBUM" ? "album" : "track",
props.post.spotifyId,
@@ -27,13 +27,13 @@ export const MusicLinksPane = (props: MusicLinksPaneProps) => {
const generateAppleLinks = () => {
return {
- ...(firstArtist
- ? {
- artistLink: AppManifest.links.external["apple-music:search"](
- firstArtist.name,
- ),
- }
- : {}),
+ ...(firstArtist ?
+ {
+ artistLink: AppManifest.links.external["apple-music:search"](
+ firstArtist.name,
+ ),
+ } :
+ {}),
musicLink: AppManifest.links.external["apple-music:search"](
`${firstArtist.name || ""} - ${props.post.name}`.trim(),
),
@@ -42,13 +42,13 @@ export const MusicLinksPane = (props: MusicLinksPaneProps) => {
const generateSoundCloudLinks = () => {
return {
- ...(firstArtist
- ? {
- artistLink: AppManifest.links.external["soundcloud:search"](
- firstArtist.name,
- ),
- }
- : {}),
+ ...(firstArtist ?
+ {
+ artistLink: AppManifest.links.external["soundcloud:search"](
+ firstArtist.name,
+ ),
+ } :
+ {}),
musicLink: AppManifest.links.external["soundcloud:search"](
`${firstArtist.name || ""} - ${props.post.name}`.trim(),
),
diff --git a/apps/home/src/components/pages/music/artists/MusicArtistsView.tsx b/apps/home/src/components/pages/music/artists/MusicArtistsView.tsx
index 92cc764..3710567 100644
--- a/apps/home/src/components/pages/music/artists/MusicArtistsView.tsx
+++ b/apps/home/src/components/pages/music/artists/MusicArtistsView.tsx
@@ -1,17 +1,17 @@
-import { createSignal, For, Match, Show, Switch } from "solid-js";
-import { createInfiniteQuery } from "@tanstack/solid-query";
import { createIntersectionObserver } from "@solid-primitives/intersection-observer";
+import { createInfiniteQuery } from "@tanstack/solid-query";
+import { createSignal, For, Match, Show, Switch } from "solid-js";
import { twJoin } from "tailwind-merge";
+import { FetchMusicArtistsRoute } from "@/libraries/api";
import { request } from "@/libraries/clients";
import { useQueryParams } from "@/libraries/hooks";
-import { queryParams } from "@/libraries/utilities";
-import { FetchMusicArtistsRoute } from "@/libraries/api";
import type { InferDTOS } from "@/libraries/types";
+import { queryParams } from "@/libraries/utilities";
+import { Button } from "@/components/core";
import { MusicArtistEntry } from "@/components/interfaces";
import { withQueryProvider } from "@/components/providers";
-import { Button } from "@/components/core";
type MusicArtistsResponse = InferDTOS<
typeof FetchMusicArtistsRoute.responses
@@ -36,20 +36,20 @@ export const MusicArtistsView = withQueryProvider(
},
initialPageParam: query()?.page || 1,
getPreviousPageParam: (firstPage) => {
- return firstPage.pagination.previous
- ? firstPage.pagination.page - 1
- : undefined;
+ return firstPage.pagination.previous ?
+ firstPage.pagination.page - 1 :
+ undefined;
},
getNextPageParam: (lastPage) => {
- return lastPage.pagination.next
- ? lastPage.pagination.page + 1
- : undefined;
+ return lastPage.pagination.next ?
+ lastPage.pagination.page + 1 :
+ undefined;
},
initialData: {
pages: props.initial || [],
- pageParams: query().page
- ? [query().page]
- : props.initial?.map((page) => page.pagination.page) || [],
+ pageParams: query().page ?
+ [query().page] :
+ props.initial?.map((page) => page.pagination.page) || [],
},
stateTime: 1000,
enabled: queryInitialised(),
@@ -109,13 +109,11 @@ export const MusicArtistsView = withQueryProvider(
- setTargets((currentTargets) => [...currentTargets, element])
- }
+ ref={(element) => setTargets((currentTargets) => [...currentTargets, element])}
/>
Loading...
diff --git a/apps/home/src/components/pages/music/genres/MusicGenreView.tsx b/apps/home/src/components/pages/music/genres/MusicGenreView.tsx
index c075661..64fd16b 100644
--- a/apps/home/src/components/pages/music/genres/MusicGenreView.tsx
+++ b/apps/home/src/components/pages/music/genres/MusicGenreView.tsx
@@ -1,6 +1,6 @@
+import { encode } from "qss";
import { createSignal, For, Show } from "solid-js";
import { twJoin } from "tailwind-merge";
-import { encode } from "qss";
import { useOnDebounce } from "@/libraries/hooks";
import { astroNavigate } from "@/libraries/utilities";
@@ -29,9 +29,7 @@ export const MusicGenreView = (props: MusicGenreViewProps) => {
const loweredSearch = debouncedSearch().toLowerCase();
- return props.genres.filter((genre) =>
- genre.toLowerCase().includes(loweredSearch),
- );
+ return props.genres.filter((genre) => genre.toLowerCase().includes(loweredSearch));
};
const handleGenreToggle = (genre: string) => {
@@ -111,7 +109,7 @@ export const MusicGenreView = (props: MusicGenreViewProps) => {
>
Search
- {(amount) => ({amount()})}
+ {(amount) => ({amount()})}
{