Skip to content

Commit

Permalink
Merge branch 'main' of github.com:Solvro/web-juwenalia into feat/fb-p…
Browse files Browse the repository at this point in the history
…osts-page
  • Loading branch information
kguzek committed Dec 14, 2024
2 parents 1fbc506 + 538dcc4 commit 33de3fe
Show file tree
Hide file tree
Showing 6 changed files with 99 additions and 47 deletions.
92 changes: 46 additions & 46 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
"@tanstack/react-query": "^5.60.5",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"date-fns": "^4.1.0",
"leaflet": "^1.9.4",
"leaflet-defaulticon-compatibility": "^0.1.2",
"leaflet-geosearch": "^4.0.0",
"lucide-react": "^0.460.0",
"date-fns": "^4.1.0",
"next": "^15.0.3",
"prettier": "^3.4.0",
"react": "^18.3.1",
Expand Down
18 changes: 18 additions & 0 deletions queryClient.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
"use client";

import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import React from "react";

const queryClient = new QueryClient({
defaultOptions: {
queries: {
gcTime: 1000 * 60 * 60 * 24
},
},
});

export default function QueryProvider({children,}: { children: React.ReactNode; }) {
return (
<QueryClientProvider client={queryClient}>{children}</QueryClientProvider>
);
}
26 changes: 26 additions & 0 deletions src/components/ui/NoDataInfo.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
"use client";

import { NoDataInfoProps } from "@/lib/types";
import { Button } from "./button";

const NoDataInfo = ({ errorTitle, errorMessage }: NoDataInfoProps) => {
const handleReload = () => {
window.location.reload();
};

return (
<div className="align-center flex flex-col items-center">
<h3 className="mb-5 text-lg font-bold">{errorTitle}</h3>
<p className="sm:w-90 mb-5 w-80 text-center">{errorMessage}</p>
<Button
className="rounded-[100px] border-black font-medium"
variant="outline"
onClick={handleReload}
>
odśwież
</Button>
</div>
);
};

export { NoDataInfo };
5 changes: 5 additions & 0 deletions src/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ export interface DayProps {
date: Date | string;
}

export interface NoDataInfoProps {
errorTitle: string;
errorMessage: string;
}

// #region --- Facebook API-related definitions ---

interface FacebookAttachments {
Expand Down
3 changes: 3 additions & 0 deletions tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ export default {
'gradient-main': 'radial-gradient(circle at top left, hsl(var(--primary)), hsl(var(--secondary)))',
'gradient-secondary': 'radial-gradient(circle at bottom right, hsl(var(--primary)), hsl(var(--secondary)))',
},
spacing: {
'90': '22rem'
}
},
},
plugins: [require("tailwindcss-animate")],
Expand Down

0 comments on commit 33de3fe

Please sign in to comment.