mirror of
https://github.com/makeplane/plane.git
synced 2026-05-01 21:49:37 -05:00
[WEB-1728] Chore: Preload apis required to bootstrap the application (#5026)
* chore: prefetch apis * chore: implemented cache-control * Preload links with credentials * chore: updated time in the cache and handled it based on cookie * chore: make cache private --------- Co-authored-by: gurusainath <gurusainath007@gmail.com>
This commit is contained in:
@@ -5,6 +5,8 @@ import "@/styles/globals.css";
|
||||
import "@/styles/command-pallette.css";
|
||||
import "@/styles/emoji.css";
|
||||
import "@/styles/react-day-picker.css";
|
||||
// helpers
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
// local
|
||||
import { AppProvider } from "./provider";
|
||||
|
||||
@@ -36,6 +38,17 @@ export default function RootLayout({ children }: { children: React.ReactNode })
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/favicon/favicon-16x16.png" />
|
||||
<link rel="manifest" href="/site.webmanifest.json" />
|
||||
<link rel="shortcut icon" href="/favicon/favicon.ico" />
|
||||
{/* preloading */}
|
||||
<link rel="preload" href={`${API_BASE_URL}/api/instances/`} as="fetch" crossOrigin="use-credentials" />
|
||||
<link rel="preload" href={`${API_BASE_URL}/api/users/me/ `} as="fetch" crossOrigin="use-credentials" />
|
||||
<link rel="preload" href={`${API_BASE_URL}/api/users/me/profile/ `} as="fetch" crossOrigin="use-credentials" />
|
||||
<link rel="preload" href={`${API_BASE_URL}/api/users/me/settings/ `} as="fetch" crossOrigin="use-credentials" />
|
||||
<link
|
||||
rel="preload"
|
||||
href={`${API_BASE_URL}/api/users/me/workspaces/`}
|
||||
as="fetch"
|
||||
crossOrigin="use-credentials"
|
||||
/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="context-menu-portal" />
|
||||
|
||||
Reference in New Issue
Block a user