Skip to content

Commit

Permalink
chore: migrate website to astro ^4 (#31)
Browse files Browse the repository at this point in the history
* chore: upgrade astro and its integrations

* chore: upgrade tanstack query

* fix: avoid rest destructuring usequery

* chore: upgrade turbo
  • Loading branch information
stefanofa authored Feb 19, 2024
1 parent 33f0f63 commit e187719
Show file tree
Hide file tree
Showing 5 changed files with 2,092 additions and 1,239 deletions.
19 changes: 10 additions & 9 deletions apps/website/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,10 @@ import starlight from "@astrojs/starlight";
import tailwind from "@astrojs/tailwind";
import { defineConfig } from "astro/config";
import compress from "astro-compress";
import { generateAPI } from "starlight-openapi";
import starlightOpenAPI, { openAPISidebarGroups } from "starlight-openapi";
import { FileSystemIconLoader } from "unplugin-icons/loaders";
import Icons from "unplugin-icons/vite";

const { openAPISidebarGroups, starlightOpenAPI } = await generateAPI([
{
base: "docs/api",
label: "API",
schema: "https://api.folksrouter.io/v1/docs-json",
},
]);

// https://astro.build/config
export default defineConfig({
site: "https://blockchain-italia.github.io",
Expand Down Expand Up @@ -76,6 +68,15 @@ export default defineConfig({
},
customCss: ["./src/tailwind.css"],
favicon: "/favicon.png",
plugins: [
starlightOpenAPI([
{
base: "docs/api",
label: "API",
schema: "https://api.folksrouter.io/v1/docs-json",
},
]),
],
}),
tailwind({ applyBaseStyles: false }),
react(),
Expand Down
22 changes: 11 additions & 11 deletions apps/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@
"lint": "eslint ."
},
"dependencies": {
"@astrojs/react": "^3.0.4",
"@astrojs/starlight": "^0.11.2",
"@astrojs/starlight-tailwind": "^2.0.0",
"@astrojs/tailwind": "^5.0.2",
"@astrojs/react": "^3.0.10",
"@astrojs/starlight": "^0.19.0",
"@astrojs/starlight-tailwind": "^2.0.1",
"@astrojs/tailwind": "^5.1.0",
"@fontsource/poppins": "^5.0.8",
"@tanstack/react-query": "^5.0.0",
"@tanstack/react-query-devtools": "^5.0.1",
"@tanstack/react-query": "^5.21.7",
"@tanstack/react-query-devtools": "^5.21.7",
"@tremor/react": "^3.8.1",
"@types/react": "^18.0.21",
"@types/react-dom": "^18.0.6",
"astro": "^3.4.0",
"astro-compress": "^2.1.6",
"astro-seo": "^0.8.0",
"astro": "^4.4.0",
"astro-compress": "^2.2.10",
"astro-seo": "^0.8.2",
"clsx": "^2.0.0",
"graphql": "^16.8.1",
"graphql-request": "^6.1.0",
Expand All @@ -33,7 +33,7 @@
"sharp": "^0.32.5",
"shiki": "^0.14.4",
"spin-delay": "^1.2.0",
"starlight-openapi": "^0.3.1",
"starlight-openapi": "^0.5.0",
"tailwind-merge": "^1.14.0",
"tailwindcss": "^3.3.3",
"ts-pattern": "^5.0.5"
Expand All @@ -42,7 +42,7 @@
"@iconify-json/lucide": "^1.1.128",
"@svgr/core": "^8.1.0",
"@svgr/plugin-jsx": "^8.1.0",
"@tanstack/eslint-plugin-query": "^5.0.0",
"@tanstack/eslint-plugin-query": "^5.20.1",
"@typescript-eslint/eslint-plugin": "^6.7.0",
"@typescript-eslint/parser": "^6.7.0",
"eslint": "^8.49.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ const getFolksRouterAssets = async () => {
};

export const useFolksRouterAssets = () => {
const { data: folksRouterAssets, ...rest } = useQuery({
const {
data: folksRouterAssets,
isPending,
isError,
} = useQuery({
queryKey: ["folks-router-assets"],
queryFn: async () => {
const {
Expand All @@ -47,5 +51,5 @@ export const useFolksRouterAssets = () => {
refetchInterval: 30 * 60 * 1000, // 30 minutes
});

return { folksRouterAssets, ...rest };
return { folksRouterAssets, isPending, isError };
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"prettier": "^3.1.0",
"prettier-plugin-astro": "^0.12.2",
"tsconfig": "workspace:*",
"turbo": "^1.11.2"
"turbo": "^1.12.4"
},
"packageManager": "[email protected]"
}
Loading

0 comments on commit e187719

Please sign in to comment.