Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: reduce dashboard requests from seeded data#13034

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
kylecarbs merged 9 commits intomainfromredundantreqs
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
Debug
  • Loading branch information
@kylecarbs
kylecarbs committedApr 22, 2024
commit60fed57a3d767c69607fcbb01c0b7088e3929182
6 changes: 3 additions & 3 deletionssite/src/api/queries/entitlements.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,12 +5,12 @@ import { getMetadataAsJSON } from "utils/metadata";
import { cachedQuery } from "./util";

const initialEntitlementsData = getMetadataAsJSON<Entitlements>("entitlements");
constENTITLEMENTS_QUERY_KEY = ["entitlements"] as const;
constentitlementsQueryKey = ["entitlements"] as const;

export const entitlements = (): UseQueryOptions<Entitlements> => {
return {
...cachedQuery,
queryKey:ENTITLEMENTS_QUERY_KEY,
queryKey:entitlementsQueryKey,
queryFn: () => API.getEntitlements(),
initialData: initialEntitlementsData,
};
Expand All@@ -21,7 +21,7 @@ export const refreshEntitlements = (queryClient: QueryClient) => {
mutationFn: API.refreshEntitlements,
onSuccess: async () => {
await queryClient.invalidateQueries({
queryKey:ENTITLEMENTS_QUERY_KEY,
queryKey:entitlementsQueryKey,
});
},
};
Expand Down
6 changes: 3 additions & 3 deletionssite/src/utils/metadata.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
export const getMetadataAsJSON = <T extends NonNullable<unknown>>(
property: string,
): T | undefined => {
constappearance = document.querySelector(`meta[property=${property}]`);
constmetadata = document.querySelector(`meta[property=${property}]`);

if (appearance) {
const rawContent =appearance.getAttribute("content");
if (metadata) {
const rawContent =metadata.getAttribute("content");

if (rawContent) {
try {
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp